/* assets/css/style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: #0f172a;
  background: #ffffff;
  overflow-x: hidden;
}

body.home-page {
  /* Reserve space so first content isn't hidden behind fixed header during quick scroll jumps */
  scroll-behavior: smooth;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  height: 140px; /* fixed to avoid layout shift on scroll */
  --logo-scale: 1;
  transition: opacity 0.3s ease, transform 0.3s ease; /* avoid background transition flicker */
}

header.scrolled {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --logo-scale: .55; /* smooth scale without changing layout */
}

/* Solid header variant aligned with internal pages (same tone / blur) but with larger logo retained */
header.header--solid {
  background: rgba(30,41,59,0.95); /* same as how-it-works */
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

/* Minimize flicker: restrict transition to opacity & transform, not background (which caused repaint flashes) */
header, header.header--solid, header.scrolled { transition: opacity .3s ease, transform .3s ease; }

.header-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

header .logo {
  height: 120px; /* intrinsic size reference */
  width: auto;
  transition: transform .45s cubic-bezier(.4,.0,.2,1);
  transform: scale(var(--logo-scale));
  transform-origin: left center;
  margin-left: -60px; /* keep original horizontal offset */
}
/* removed explicit height change to prevent layout reflow flicker */

.language-selector {
  position: absolute;
  left: 1.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: #fff;
  color: #0f172a;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
}

.language-selector select {
  background: transparent;
  border: none;
  font-weight: 600;
  color: #0f172a;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  position: absolute;
  right: 2rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

nav .button {
  padding: 0.5rem 1rem;
  border: 1px solid #fff;
  border-radius: 9999px;
  transition: 0.2s;
}

nav .button:hover {
  background: #fff;
  color: #0f172a;
}

.hero {
  /* JPEG fallback first (served if no image-set / no webp support); ensure matching path root-relative if needed */
  background-image: url('/assets/images/couple-on-the-beach-1.jpg');
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
}
@supports (background-image: image-set(url("") type("image/webp"))) {
  .hero {
    background-image: image-set(
      url('/assets/images/couple-on-the-beach-1.webp') type('image/webp'),
      url('/assets/images/couple-on-the-beach-1.jpg') type('image/jpeg')
    );
  }
}

/* Simplified hero variant - reuse .hero background, left aligned content; ensure image starts at very top behind fixed header */
.hero.hero--home { justify-content: center; align-items: flex-start; padding: 140px 4rem 0; position: relative; }
.hero--home .hero-content { max-width: 640px; text-align: center; }
.hero--home h1, .hero--home p { max-width: 640px; }

.cta-primary {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  background: #000;
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.cta-primary:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

@media (max-width: 768px) { .hero.hero--home { padding: 100px 1.5rem 0; text-align: center; } .hero--home .hero-content { text-align: center; margin: 0 auto; } }

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  background: #3b82f6;
  color: #fff;
  border-radius: 9999px;
  text-decoration: none;
  transition: background 0.2s;
}

.cta-gradient { /* Dark pill for contrast on bright photo */
  background: #0f172a;
  box-shadow: 0 8px 28px -6px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.35);
  font-weight: 600;
  letter-spacing: .25px;
}

.cta-gradient:hover {
  background: #1e293b;
  box-shadow: 0 10px 34px -6px rgba(0,0,0,0.6), 0 4px 10px rgba(0,0,0,0.4);
}

.cta:hover {
  background: #2563eb;
}

.section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  color: #0f172a;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.benefits,
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.benefit,
.testimonial {
  background: #f1f5f9;
  color: #0f172a;
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.benefit img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.benefit.animate {
  transform: scale(1);
  opacity: 1;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.benefit {
  transform: scale(0.9);
  opacity: 0;
  overflow: hidden;
}

.benefit:hover img {
  transform: scale(1.05);
}

.callout {
  text-align: center;
  margin-top: 4rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.callout a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  background: #3b82f6;
  color: #fff;
  border-radius: 9999px;
  text-decoration: none;
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.testimonial:hover {
  transform: scale(1.03);
}

.testimonial::after {
  content: '★★★★★';
  display: block;
  margin-top: 0.75rem;
  font-size: 1.2rem;
  color: gold;
}

footer {
  text-align: center;
  padding: 2rem;
  background: #ffffff;
  font-size: 0.9rem;
  color: #0f172a;
}

footer a {
  color: #0f172a;
  margin: 0 0.5rem;
  text-decoration: none;
}

/* === Hero Android Responsive Fix v1 === */
:root { --vh: 1vh; }
@media (max-width:1023px){
  .hero { height:auto; min-height:min(100svh,100dvh); min-height:calc(var(--vh,1vh)*100); background-position:center top; align-items:flex-start; padding:0 1.5rem; }
  .hero.hero--home { padding:120px 1.5rem 0; }
  .hero .hero-content { margin-top:0; }
}
/* === /Hero Android Responsive Fix v1 === */
