/* =========================
   MOBILE NAV (STRUCTURE CLEANED — DESIGN UNCHANGED)
========================= */

/* Stop sideways scroll */
html, body {
  overflow-x: hidden !important;
  width: 100%;
}

/* Media safe */
img, video, svg {
  max-width: 100%;
  height: auto;
}

/* Hide burger on desktop */
.mobile-toggle {
  display: none !important;
}

/* Base slide behavior */
.nav-menu {
  right: -100% !important;
}
.nav-menu.active {
  right: 0 !important;
}

@media (max-width: 768px) {

  /* Header spacing */
  .main-header .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    gap: 12px;
  }

  /* ===== BURGER BUTTON ===== */
  .mobile-toggle {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 10px !important;
    transform: translateX(-12px);
    z-index: 1002;
    flex-shrink: 0;
  }

  .toggle-bar {
    width: 28px;
    height: 2px;
    background: #0a0c12;
    transition: all 0.3s ease;
    border-radius: 2px;
  }

  .mobile-toggle.active .toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: #c7b27c;
  }
  .mobile-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle.active .toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: #c7b27c;
  }

  /* ===== MOBILE MENU PANEL - FIXED ===== */
  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    left: auto !important;

    width: 85% !important;
    max-width: 380px !important;
    height: 100vh !important;

    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important; /* Changed from default */

    /* FIXED: Better padding for menu items */
    padding: 100px 25px 28px !important; /* Increased top padding to clear header */

    gap: 4px !important;
    transition: right 0.3s ease !important;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important;
    overflow-y: auto !important;
  }

  /* Links - Adjusted for better visibility */
  .nav-link {
    font-size: 1.2rem;
    padding: 14px 20px !important; /* Slightly reduced padding */
    margin: 2px 0;
    color: #0a0c12;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-align: left;
    border: 1px solid transparent;
    font-weight: 500;
    display: block; /* Ensure full width */
    width: 100%;
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(199, 178, 124, 0.1);
    border-color: rgba(199, 178, 124, 0.3);
    color: #c7b27c;
    transform: translateX(5px);
  }

  .nav-link::after {
    display: none;
  }

  /* CTA Button - Now visible at bottom */
  .nav-cta {
    margin-top: auto !important; /* Pushes to bottom */
    margin-bottom: 20px !important;
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    text-align: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #c7b27c 0%, #d4c29d 100%);
    color: #0a0c12;
    font-weight: 700;
    border: none;
    box-shadow: 0 10px 20px rgba(199, 178, 124, 0.3);
    display: block;
  }

  /* LOGO (UNCHANGED) */
  .nav-logo {
    display: flex;
    align-items: center;
    height: auto;
    padding: 0;
    max-width: calc(100vw - 120px);
    overflow: hidden;
  }

  .logo-icon {
    height: 75px !important;
  }

  .logo-wordmark {
    height: 200px !important;
    margin-left: -48px !important;
    margin-top: 23px !important;
  }

  /* Prevent body scroll when open */
  body.menu-open {
    overflow: hidden;
  }

  /* Top bar untouched */
  .top-navbar { padding: 2px 0 !important; }

  .top-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px !important;
    padding: 4px 0 !important;
  }

  .insurance-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  .insurance-badge,
  .change-location,
  .phone,
  .hours {
    font-size: 0.65rem !important;
    white-space: nowrap;
  }

  .underwritten,
  .location span:not(.change-location) {
    display: none !important;
  }

  .top-nav-utils {
    display: flex;
    justify-content: center;
    gap: 12px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .nav-menu {
    width: 90% !important;
    padding: 90px 20px 20px !important; /* Adjusted for smaller screens */
  }
  
  .nav-link {
    font-size: 1.1rem;
    padding: 12px 16px !important;
  }
}

/* =========================
   WHY SECTION - MOBILE ONLY
   This ONLY applies when screen width is mobile AND element has mobile-why class
========================= */

@media (max-width: 768px) {
  
  /* Target only sections with BOTH classes */
  section.why-section.mobile-why .why-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 40px 20px !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.96) !important;
  }
  
  section.why-section.mobile-why .why-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    margin-bottom: 30px !important;
  }
  
  section.why-section.mobile-why .why-item {
    text-align: center !important;
    width: 100% !important;
  }
  
  section.why-section.mobile-why .why-item h3 {
    font-size: 1.2rem !important;
    margin-bottom: 10px !important;
    color: #0a0c12 !important;
  }
  
  section.why-section.mobile-why .why-item p {
    font-size: 0.95rem !important;
    color: #4a5468 !important;
    line-height: 1.6 !important;
    max-width: 300px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  section.why-section.mobile-why .why-actions .btn {
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    margin-top: 10px !important;
  }
  
  section.why-section.mobile-why .why-title {
    font-size: 2rem !important;
    margin-bottom: 15px !important;
  }
  
  section.why-section.mobile-why .why-subtitle {
    font-size: 1rem !important;
    margin-bottom: 30px !important;
    padding: 0 10px !important;
  }
}

@media (max-width: 480px) {
  section.why-section.mobile-why .why-card {
    padding: 30px 15px !important;
  }
  
  section.why-section.mobile-why .why-item p {
    max-width: 260px !important;
  }
}

/* =========================
   iPhone Specific Fixes
========================= */

/* iPhone SE, 5, 6, 7, 8, X, 11, 12, 13, 14, 15 */
@media only screen and (max-width: 390px) {
  section.why-section.mobile-why .why-card {
    padding: 30px 15px !important;
  }
  
  section.why-section.mobile-why .why-title {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
  }
  
  section.why-section.mobile-why .why-subtitle {
    font-size: 0.95rem !important;
    padding: 0 5px !important;
  }
  
  section.why-section.mobile-why .why-item {
    margin-bottom: 25px !important;
  }
  
  section.why-section.mobile-why .why-item h3 {
    font-size: 1.1rem !important;
    margin-bottom: 8px !important;
  }
  
  section.why-section.mobile-why .why-item p {
    font-size: 0.9rem !important;
    max-width: 260px !important;
    line-height: 1.5 !important;
  }
  
  section.why-section.mobile-why .why-actions .btn {
    padding: 14px 20px !important;
    font-size: 0.95rem !important;
  }
}

/* Force all mobile styles to apply to iPhone - WITHOUT the red border */
@media only screen and (max-width: 768px) {
  section.why-section.mobile-why .why-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 40px 20px !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.96) !important;
    /* REMOVED: border: 2px solid red !important; */
  }
  
  section.why-section.mobile-why .why-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }
  
  section.why-section.mobile-why .why-item {
    text-align: center !important;
    width: 100% !important;
  }
  
  section.why-section.mobile-why .why-item p {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* =========================
   ADDITIONAL PAGES MOBILE STYLES
   (About, Coverage, FAQ, Contact, Quote)
========================= */

@media (max-width: 768px) {
  
  /* ===== ABOUT PAGE ===== */
  .about-hero {
    height: auto !important;
    min-height: 350px !important;
    padding: 60px 20px !important;
  }
  
  .about-overlay {
    padding: 30px 20px !important;
  }
  
  .about-overlay h1 {
    font-size: 2.2rem !important;
  }
  
  .about-section {
    padding: 60px 0 !important;
  }
  
  .about-section .container {
    padding: 0 20px !important;
  }
  
  .about-parallax {
    padding: 80px 0 !important;
    background-attachment: scroll !important;
  }
  
  .offer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* ===== COVERAGE PAGE ===== */
  .coverage-header, 
  .page-header {
    padding: 40px 20px !important;
    text-align: center !important;
  }
  
  .coverage-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 0 20px !important;
  }
  
  .coverage-item {
    text-align: center !important;
    padding: 30px 20px !important;
    margin-bottom: 20px !important;
  }
  
  /* ===== FAQ PAGE ===== */
  .faq-header {
    padding: 40px 20px !important;
    text-align: center !important;
  }
  
  .faq-section {
    padding: 40px 0 !important;
  }
  
  .faq-item {
    padding: 20px 15px !important;
    margin-bottom: 15px !important;
    border-radius: 12px !important;
  }
  
  .faq-question {
    font-size: 1.1rem !important;
    margin-bottom: 10px !important;
  }
  
  .faq-answer {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }
  
  /* ===== CONTACT PAGE ===== */
  .contact-header {
    padding: 40px 20px !important;
    text-align: center !important;
  }
  
  .contact-section {
    padding: 40px 0 !important;
  }
  
  .contact-form {
    padding: 30px 20px !important;
    margin: 0 20px !important;
    width: auto !important;
  }
  
  .form-group {
    margin-bottom: 20px !important;
    width: 100% !important;
  }
  
  .form-input, 
  .form-textarea {
    width: 100% !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }
  
  .form-row {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .contact-info-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 0 20px !important;
  }
  
  /* ===== QUOTE PAGE ===== */
  .quote-header {
    padding: 40px 20px !important;
    text-align: center !important;
  }
  
  .quote-section {
    padding: 40px 0 !important;
  }
  
  .quote-form {
    padding: 30px 20px !important;
    margin: 0 20px !important;
    width: auto !important;
  }
  
  .quote-form .form-row {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .quote-form .form-group {
    width: 100% !important;
  }
}

/* ===== EXTRA SMALL DEVICES (iPhones) ===== */
@media (max-width: 480px) {
  .about-overlay h1 {
    font-size: 1.8rem !important;
  }
  
  .coverage-item h2,
  .faq-item h2,
  .contact-form h2,
  .quote-form h2 {
    font-size: 1.5rem !important;
  }
  
  .faq-question {
    font-size: 1rem !important;
  }
  
  .form-input, 
  .form-textarea {
    padding: 10px !important;
  }
}