/* ==========================================================================
   The Mind Clinic - Premium Mobile & Tablet Responsive Engine
   ========================================================================== */

/* Tablet Optimization (1024px and below) */
@media screen and (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .visual-stack {
    max-width: 600px;
    margin: 0 auto;
  }

  .standards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .booking-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .location-card {
    grid-template-columns: 1fr;
  }

  .map-frame-box {
    min-height: 380px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Mobile & Phablet Screens (768px and below) */
@media screen and (max-width: 768px) {
  /* --- 1. Clean Compact Topbar --- */
  .topbar {
    padding: 8px 0;
    font-size: 0.76rem;
  }

  .topbar-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .topbar-status {
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 62%;
  }

  .topbar-actions {
    gap: 0;
  }

  .topbar-actions span:not(.topbar-phone) {
    display: none; /* Location hide on mobile topbar for zero clutter */
  }

  .topbar-actions .sep {
    display: none;
  }

  .topbar-phone {
    font-size: 0.8rem;
    padding: 3px 8px;
    background: rgba(56, 189, 248, 0.12);
    border-radius: 4px;
  }

  /* --- 2. Premium Navbar & Modern Hamburger --- */
  .navbar {
    padding: 12px 0;
  }

  .nav-wrap {
    position: relative;
  }

  .brand-sub {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-role {
    font-size: 0.74rem;
  }

  /* Modern Pill Hamburger Toggle */
  .mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid var(--border-light);
    gap: 5px;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .mobile-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.25s ease;
  }

  /* Animated Hamburger to X */
  .mobile-toggle.active {
    background: #e2e8f0;
  }

  .mobile-toggle.active span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .mobile-toggle.active span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  /* Navigation Drawer */
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 13px);
    left: -5%;
    width: 110%;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px;
    gap: 14px;
    border-bottom: 2px solid var(--border-light);
    box-shadow: 0 16px 30px rgba(10, 37, 64, 0.08);
    z-index: 1001;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 1px solid #f8fafc;
  }

  /* Explicit Request: Remove Dental Booking CTA from Mobile Menu */
  .nav-btn,
  .nav-links .btn {
    display: none !important;
  }

  /* --- 3. Hero Section Typography & Balance --- */
  .hero-section {
    padding: 34px 0 28px 0;
  }

  .hero-copy h1 {
    font-size: 1.85rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
  }

  .lead-text {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 22px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 26px;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 13px 18px;
    font-size: 0.92rem;
  }

  /* --- 4. Polished 2x2 Grid for Hero Badges --- */
  .hero-footer-badges {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: none;
    padding-top: 0;
    margin-top: 20px;
  }

  .badge-line {
    display: none !important;
  }

  .badge-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  }

  .badge-item:last-child {
    grid-column: span 2; /* Gulistan-e-Johar spans full row */
  }

  .badge-item strong {
    font-size: 0.86rem;
    color: var(--primary);
    margin-bottom: 2px;
  }

  .badge-item span {
    font-size: 0.74rem;
    color: var(--text-light);
    line-height: 1.3;
  }

  /* --- 5. Visual Stack on Mobile --- */
  .visual-stack {
    margin-top: 10px;
    border-radius: 14px;
  }

  .visual-hero-img {
    height: 280px;
  }

  .doctor-highlight-card {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    margin-top: 12px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    box-shadow: none;
    padding: 12px 14px;
  }

  .doctor-highlight-card h4 {
    font-size: 0.9rem;
  }

  .doctor-highlight-card p {
    font-size: 0.76rem;
  }

  /* --- 6. Standards Bar & Spacing --- */
  .standards-bar {
    padding: 28px 0;
  }

  .standards-grid {
    gap: 16px;
  }

  .standard-box {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 16px;
    gap: 12px;
  }

  .icon-circle {
    width: 38px;
    height: 38px;
  }

  .standard-box h3 {
    font-size: 0.92rem;
  }

  .standard-box p {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  /* --- 7. Reviews Section --- */
  .section {
    padding: 44px 0;
  }

  .section-title {
    margin-bottom: 30px;
  }

  .section-title h2 {
    font-size: 1.55rem;
    line-height: 1.25;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .review-card {
    padding: 20px 18px;
  }

  .review-text {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  /* --- 8. Appointment Form --- */
  .form-container {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-group label {
    font-size: 0.76rem;
  }

  .form-group input, 
  .form-group select {
    padding: 11px 12px;
    font-size: 0.88rem;
  }

  .btn-submit {
    padding: 13px;
    font-size: 0.9rem;
  }

  /* --- 9. Map & Location Card --- */
  .location-details {
    padding: 24px 18px;
  }

  .location-details h2 {
    font-size: 1.5rem;
  }

  .map-frame-box {
    min-height: 300px;
  }

  /* --- 10. Footer --- */
  .site-footer {
    padding: 40px 0 20px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 28px;
  }

  .footer-brand p {
    max-width: 100%;
    font-size: 0.82rem;
  }
}

/* Extra Small Phones (380px and below) */
@media screen and (max-width: 380px) {
  .hero-copy h1 {
    font-size: 1.6rem;
  }

  .hero-footer-badges {
    grid-template-columns: 1fr;
  }

  .badge-item:last-child {
    grid-column: span 1;
  }
}