/* Hero Section Styles */
#hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0;
  background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.2)),
              url('../images/sea-horizon.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-content {
  max-width: 600px;
  animation: fadeInUp 1s ease-out;
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.hero-content h2::after {
  width: 80px;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
  color: var(--color-neutral-200);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero-content h2 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.15rem;
  }
}

/* Universal mobile/tablet fix - catches all touch devices */
@media (hover: none) and (pointer: coarse) {
  #hero {
    background-attachment: scroll !important;
  }
}

/* Fallback for devices that don't support hover/pointer queries */
@media (max-width: 1024px), (max-height: 600px) {
  #hero {
    background-attachment: scroll !important;
  }
}

/* Large tablets (iPad Pro 12.9" landscape: 1366x1024) */
@media (min-width: 1025px) and (max-width: 1366px) and (max-height: 1024px) {
  #hero {
    background-attachment: scroll;
  }
}

/* Standard tablets portrait (iPad: 768x1024) */
@media (min-width: 768px) and (max-width: 1024px) {
  #hero {
    min-height: 600px;
    background-attachment: scroll;
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }
}

/* Mobile landscape (most phones: 667-926px wide) */
@media (max-width: 926px) and (max-height: 428px) and (orientation: landscape) {
  #hero {
    min-height: 100vh;
    background-attachment: scroll !important;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
}

/* Mobile portrait (most phones: 375-428px wide) */
@media (max-width: 768px) and (orientation: portrait) {
  #hero {
    min-height: 100vh;
    background-attachment: scroll;
  }

  .hero-content h2 {
    font-size: 2.25rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  #hero {
    min-height: 100vh;
  }

  .hero-content h2 {
    font-size: 1.75rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
}

/* Very small devices (older iPhones, small Android) */
@media (max-width: 375px) {
  .hero-content h2 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }
}

/* Foldable devices (Samsung Galaxy Fold, etc.) */
@media (max-width: 280px) {
  .hero-content h2 {
    font-size: 1.35rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }
}

/* CTA Button + Banner Wrapper */
.hero-cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.hero-cta-wrapper .btn {
  width: auto;
  margin-bottom: 1.7rem;
}

/* Free Consultation Banner - FIXED FOR TABLETS */
.free-consultation-hero-banner {
  background-color: #B3D8F3;
  color: #222222;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 1rem;
  max-width: 480px;
  width: 100%;
  padding: 0 1rem;
  text-align: center;
  margin: 0; /* Reset any margins */
  position: relative; /* Ensure proper positioning */
}

.free-consultation-hero-banner p {
  margin: 0;
  line-height: 1.2;
  width: 100%;
  text-align: center;
}

/* Force color override if needed */
.free-consultation-hero-banner p,
.free-consultation-hero-banner p strong {
  color: #222222 !important;
  font-weight: 700;
  opacity: 1 !important;
}

@media (max-width: 480px) {
  .free-consultation-hero-banner {
    font-size: 0.9rem;
    height: auto;
    padding: 0.75rem;
  }
}

/* TABLET-SPECIFIC FIXES - Updated with proper alignment */
@media screen and (min-width: 768px) and (max-width: 1280px) and (-webkit-min-device-pixel-ratio: 1) {
  #hero {
    padding-top: 120px !important;
    background-attachment: scroll !important;
  }
  
  .hero-content {
    margin-top: 2rem;
  }
  
  .hero-content h2 {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  
  .hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
  }
  
  .hero-cta-wrapper {
    margin-top: 2rem;
    gap: 1.5rem;
    align-items: center; /* Ensure center alignment */
  }
  
  .free-consultation-hero-banner {
    margin: 0 !important; /* Remove all margins */
    max-width: 450px;
    font-size: 0.95rem;
    height: 50px;
    display: flex !important; /* Force flex display */
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  
  .free-consultation-hero-banner p {
    margin: 0 !important;
    text-align: center !important;
    width: 100%;
  }
}

/* Additional catch for Galaxy Tab specific resolutions */
@media screen and (min-width: 800px) and (max-width: 1280px) and (min-height: 600px) and (max-height: 900px) {
  #hero {
    padding-top: 140px !important;
    min-height: calc(100vh - 80px);
  }
  
  .hero-content {
    max-width: 550px;
    margin-top: 1rem;
  }
  
  .hero-cta-wrapper {
    align-items: center !important;
  }
  
  /* Ensure consultation banner is properly positioned and aligned */
  .free-consultation-hero-banner {
    margin: 0 !important;
    position: relative;
    top: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  
  .free-consultation-hero-banner p {
    text-align: center !important;
    margin: 0 !important;
  }
}

/* Samsung Galaxy Tab A/S series common resolutions */
@media screen and (width: 1280px) and (height: 800px),
       screen and (width: 800px) and (height: 1280px),
       screen and (width: 1024px) and (height: 768px),
       screen and (width: 768px) and (height: 1024px) {
  #hero {
    padding-top: 120px !important;
    background-attachment: scroll !important;
  }
  
  .hero-content {
    margin-top: 1.5rem;
  }
  
  .hero-cta-wrapper {
    align-items: center !important;
  }
  
  .free-consultation-hero-banner {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  
  .free-consultation-hero-banner p {
    text-align: center !important;
    margin: 0 !important;
  }
}

/* Chrome on Android tablets - broader catch */
@media screen and (min-width: 768px) and (max-width: 1366px) and (pointer: coarse) {
  #hero {
    padding-top: 100px !important;
  }
  
  .hero-content {
    margin-top: 1rem;
  }
  
  .hero-cta-wrapper {
    margin-top: 1.5rem;
    align-items: center !important;
  }
  
  .free-consultation-hero-banner {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  
  .free-consultation-hero-banner p {
    text-align: center !important;
    margin: 0 !important;
  }
}