html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Mobile responsiveness improvements */
.hero-phone {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .hero-section {
    text-align: center !important;
  }
  
  .hero-section .display-4 {
    font-size: 2rem !important;
  }
  
  .hero-section .lead {
    font-size: 1rem !important;
  }
  
  .hero-phone {
    max-height: 300px !important;
  }
  
  .card img {
    max-width: 100%;
    height: auto;
  }
  
  .navbar-brand img {
    max-height: 28px !important;
  }
  
  /* Admin responsive improvements */
  .admin-area .table-responsive {
    font-size: 0.875rem;
    border: none;
  }
  
  .admin-area .table-responsive table {
    border: 1px solid #dee2e6;
  }
  
  .admin-area .card-header {
    padding: 0.75rem 1rem;
  }
  
  .admin-area .card-body {
    padding: 1rem;
  }
  
  .admin-area .btn-group-vertical .btn {
    margin-bottom: 0.25rem;
  }
  
  .admin-area .form-group {
    margin-bottom: 1rem;
  }
  
  .admin-area .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  
  .admin-area .input-group-text {
    padding: 0.375rem 0.5rem;
  }
  
  .admin-area .badge {
    font-size: 0.75rem;
  }
  
  .admin-area .text-break {
    word-break: break-word;
  }
  
  .admin-area .flex-wrap {
    flex-wrap: wrap !important;
  }
  
  .admin-area .gap-2 {
    gap: 0.5rem !important;
  }
  
  /* Make tables stack on mobile */
  .admin-area .table-responsive-stack tbody,
  .admin-area .table-responsive-stack tr,
  .admin-area .table-responsive-stack td {
    display: block;
    width: 100%;
  }
  
  .admin-area .table-responsive-stack tr {
    border: 1px solid #dee2e6;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
  }
  
  .admin-area .table-responsive-stack td {
    border: none;
    padding: 0.25rem 0;
    text-align: left;
  }
  
  .admin-area .table-responsive-stack td::before {
    content: attr(data-label) ": ";
    font-weight: bold;
    display: inline-block;
    width: 40%;
  }
  
  /* Form improvements */
  .admin-area .form-floating > label {
    font-size: 0.875rem;
  }
  
  .admin-area .form-control {
    font-size: 1rem;
  }
  
  .admin-area .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  
  .admin-area .btn-sm {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}

/* Modal fix - NO BACKDROP, HIGH Z-INDEX */
.modal-backdrop {
    display: none !important;
}

.modal {
    background: rgba(0,0,0,0.7) !important;
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 89vh !important;
}

/* Force modal to show when it has the 'show' class */
.modal.show {
    display: flex !important;
}

/* When modal is not shown, hide it */
.modal:not(.show) {
    display: none !important;
}

.modal .modal-dialog {
    z-index: 100000 !important;
    position: relative !important;
    margin: 0 !important;
}

.modal .modal-content {
    z-index: 100001 !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    border: none !important;
}

/* Ensure everything in modal is clickable */
.modal input, .modal button, .modal .form-control, .modal .btn {
    position: relative !important;
    z-index: auto !important;
}

/* Hide admin header and sidebar when modal is open */
.modal-open .sidebar,
.modal-open .main-header {
    z-index: 1 !important;
}

.modal-open .main-content {
    z-index: 1 !important;
}

/* Hero title text color fix */
.hero-title {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-section h1 {
    color: #ffffff !important;
}

.hero-description {
    color: rgba(255, 255, 255, 0.95) !important;
}