/* Hero Section Full Responsiveness */

/* 1. Define mobile header height CSS variable */
:root {
  --header-height-mobile: 50px; /* Minimal header height to maximize content space */
  --bottom-margin-mobile: 260px; /* Increased space reserved at bottom for button visibility */
}

@media (max-width: 480px) {
  :root {
    --header-height-mobile: 45px; /* Even less space for small devices */
    --bottom-margin-mobile: 280px; /* Increased bottom space for small devices */
  }
}

@media (max-width: 360px) {
  :root {
    --header-height-mobile: 25px; /* Absolute minimal space for 360px devices */
    --bottom-margin-mobile: 200px; /* Reduced to eliminate white space */
  }
}

/* 2. Complete Mobile Layout Fix */
@media (max-width: 768px) {
  /* Ensure body doesn't have unexpected margin */
  body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    padding-bottom: 80px; /* Ensure space for sticky button */
  }
  
  /* Apply fixed height to hero section */
  .hero-section {
    position: relative;
    height: 100vh; /* Full viewport height */
    min-height: 600px; /* Ensure minimum height for content */
    padding: 0; /* Reset padding */
    margin: 0; /* Reset margin */
    overflow: hidden; /* Prevent content overflow */
    display: block; /* Reset display */
  }
  
  /* Set fixed positioning on hero content to place it exactly where needed */
  .hero-content {
    position: absolute;
    top: var(--header-height-mobile); /* Minimal space below header */
    left: 0;
    right: 0;
    bottom: var(--bottom-margin-mobile); /* Maximum space at bottom to ensure buttons are visible */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center;
    text-align: center;
    padding: 1rem;
    z-index: 2; /* Ensure above video background */
  }
  
  /* Style hero elements */
  .hero-title {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 1.25rem; /* Increased spacing after title */
    padding: 0 0.5rem;
    width: 100%;
  }
  
  .hero-subtitle {
    font-size: clamp(0.9rem, 4.5vw, 1.1rem);
    line-height: 1.4;
    margin-top: 1rem; /* Space above subtitle */
    margin-bottom: 1.5rem; /* Space below subtitle */
    padding: 0 0.5rem;
    max-width: 90%;
    font-weight: normal;
  }
  
  /* Place background image */
  .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/img/hero-image-taxi.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    filter: brightness(0.4);
  }
  
  /* Fix buttons & features */
  .hero-cta-buttons {
    width: 100%;
    max-width: 300px;
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .hero-cta-buttons a {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: clamp(0.9rem, 4vw, 1rem);
    border-radius: 30px;
    text-align: center;
  }
  
  .hero-features {
    width: 100%;
    max-width: 300px;
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }
  
  .feature-item {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 30px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  /* Ensure sticky button is always visible - HIGHEST PRIORITY Z-INDEX */
  .sticky-book-button {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000000 !important; /* Ultra-high z-index to ensure it's always on top */
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
    color: white !important;
    padding: 1rem 1.5rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25) !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    font-size: 1rem !important;
    min-height: 60px !important;
  }
  
  /* Ensure floating social buttons don't interfere */
  .floating-social {
    bottom: 80px !important; /* Well above sticky button */
    right: 1rem !important;
    z-index: 98 !important; /* Below sticky button */
  }

}

/* 3. Extra adjustments for very small screens */
@media (max-width: 360px) {
  /* Ensure hero section is tall enough for all content but not too tall */
  .hero-section {
    min-height: 100vh; /* Standard viewport height to prevent white space */
    max-height: 100vh; /* Prevent excessive height */
    margin-bottom: 0 !important; /* Remove any bottom margin */
  }

  /* Optimize content positioning for 360px devices */
  .hero-content {
    bottom: 120px; /* Reduced bottom margin to prevent white space */
    padding-bottom: 0;
    margin-bottom: 0;
  }
  
  .video-controls {
    bottom: 140px; /* Position above floating social for small screens */
    right: 15px;
  }
  
  .video-btn {
    width: 36px;
    height: 36px;
  }
  
  .hero-title {
    font-size: clamp(1.3rem, 6vw, 1.6rem);
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: clamp(0.8rem, 3.5vw, 0.9rem);
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
  }
  
  .hero-features {
    gap: 0.5rem;
    margin-bottom: 0; /* Remove bottom margin */
  }
  
  .feature-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 0; /* Remove any bottom margins */
  }
  
  .hero-cta-buttons {
    margin-bottom: 0; /* Remove bottom margin */
  }
  
  .hero-cta-buttons a {
    padding: 0.7rem 0.9rem;
    margin-bottom: 0; /* Remove bottom margin */
  }
  
  /* Specific fixes for 360px width devices */
  .sticky-book-button {
    padding: 0.9rem 1rem !important;
    font-size: 0.95rem !important;
    min-height: 56px !important;
  }
  
  .floating-social {
    bottom: 70px !important;
    right: 0.75rem !important;
  }
  
  /* Fix any sections that follow hero to prevent white space */
  .services-section,
  .section {
    margin-top: 0 !important;
    padding-top: 1rem;
  }
}

/* 4. Height-specific adjustments */
@media (max-height: 600px) and (max-width: 768px) {
  :root {
    --header-height-mobile: 35px; /* Minimal header spacing on short screens */
    --bottom-margin-mobile: 240px; /* Increased bottom margin for short screens */
  }
  
  .hero-title {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
  }
  
  .hero-subtitle {
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    margin-bottom: 0.5rem;
  }
  
  .hero-features, .hero-cta-buttons {
    gap: 0.4rem;
  }
  
  .feature-item {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* 5. Specific adjustments for very small devices to ensure text visibility */
@media (max-width: 360px) {
  .hero-title {
    font-size: clamp(1.3rem, 6.5vw, 1.9rem);
  }
  .hero-subtitle {
    font-size: clamp(0.8rem, 3.8vw, 1rem);
    margin-bottom: 1.25rem;
  }
  .hero-cta-buttons a {
    font-size: clamp(0.9rem, 3.2vw, 1rem);
  }
  .feature-item {
    font-size: clamp(0.8rem, 2.8vw, 0.95rem);
  }
}

/* 6. Additional safety measures for devices with viewport height issues */
@media (max-width: 390px) and (max-height: 844px) {
  :root {
    --bottom-margin-mobile: 180px; /* Reduced for newer phones to prevent white space */
  }
}

@media (max-width: 375px) and (max-height: 667px) {
  :root {
    --bottom-margin-mobile: 160px; /* iPhone SE and similar devices - prevent white space */
  }
}

/* Special fix for very specific 360x640 viewport */
@media (max-width: 360px) and (max-height: 640px) {
  :root {
    --bottom-margin-mobile: 100px; /* Minimal bottom margin to eliminate white space */
  }
  
  .hero-section {
    min-height: calc(100vh - 20px); /* Slightly reduced to prevent overflow */
  }
  
  .hero-content {
    bottom: 80px; /* Much smaller bottom margin */
  }
  
  /* CRITICAL: Ensure sticky button is ALWAYS visible on 360x640 devices */
  .sticky-book-button {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 56px !important;
    z-index: 10000000 !important; /* Ultra-high z-index */
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0.9rem 1rem !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  
  /* Ensure no other elements can overlay the button */
  .modal,
  .modal-content,
  .close-modal,
  .reviews-section,
  .qa-container,
  .floating-social,
  .video-controls {
    z-index: 9999999 !important; /* Lower than sticky button */
  }
  
  /* Force body to accommodate button */
  body {
    padding-bottom: 60px !important;
    margin-bottom: 0 !important;
  }
  
  /* Fix any potential background overlays */
  .hero-section::after,
  .hero-content::after,
  .services-section::before {
    display: none !important;
  }
}

/* Remove redundant margin overrides from previous attempts */
/* 
@media (max-width: 480px) {
  .hero-content {
    margin-top: calc(var(--header-height-mobile) + 20px);
  }
}

@media (max-width: 360px) {
  .hero-content {
    margin-top: calc(var(--header-height-mobile) + 28px);
  }
}
*/ 