/* =========================================================
   GLOBAL.CSS
   Oceans2Beaches - Base Styles + Navigation + Hero + Cards
========================================================= */


/* =========================================================
   01 - RESET & BASE
========================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  line-height: 1.6;
  background: #ffffff;
}

:root {
  --space-1: clamp(8px, 1.2vw, 12px);
  --space-2: clamp(12px, 2vw, 20px);
  --space-3: clamp(18px, 3vw, 32px);

  --brand-1: #00b5d1;
  --brand-2: #007794;
  --brand-dark: #003B4A;
  --ink: #003366;
}


/* =========================================================
   02 - HEADER (LAYOUT FIX INCLUDED)
========================================================= */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  padding: 10px 0;
  background: transparent;
  z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}

.site-header.scrolled {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  padding: 6px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-area {
  position: relative;
  height: 80px;
  flex-shrink: 0;
  z-index: 1000;
}

.nav-logo {
  position: absolute;
  top: 0;
  left: 0;
  height: 200px;
  transform-origin: top left;
  transition: height 0.3s ease;
}

.site-header.scrolled .nav-logo {
  height: 70px;
}


/* =========================================================
   03 - NAVIGATION (DESKTOP)
========================================================= */
.nav-right {
  display: flex;
  align-items: center;
  margin-left: auto; /* CRITICAL: forces nav to the right */
}

nav ul {
  display: flex;
  gap: clamp(14px, 2vw, 22px);
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: var(--brand-1);
  font-weight: 600;
  font-size: clamp(0.88rem, 1vw, 1.02rem);
  text-transform: uppercase;
  padding-bottom: 4px;
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease;

  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.85),
     1px -1px 0 rgba(0,0,0,0.85),
    -1px  1px 0 rgba(0,0,0,0.85),
     1px  1px 0 rgba(0,0,0,0.85);
}

nav a:hover {
  color: #ffffff;
  text-shadow: none;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: #ffffff;
  transition: width 0.3s ease;
}

nav a:hover::after { width: 100%; }

/* CTA */
.nav-cta-link {
  background: var(--brand-1);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta-link:hover {
  background: var(--brand-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


/* =========================================================
   04 - HAMBURGER + MOBILE MENU
========================================================= */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;

  padding: 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(2px);

  margin-left: 16px; /* keeps it aligned to right of nav block */
  position: relative;
  z-index: 2000;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #ffffff;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.site-header.scrolled .hamburger {
  background: rgba(255,255,255,0.65);
}

.site-header.scrolled .hamburger span {
  background: var(--brand-2);
  box-shadow: none;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -120%;
  width: 78%;
  max-width: 420px;
  height: 100vh;

  background: #ffffff;
  box-shadow: -4px 0 12px rgba(0,0,0,0.15);
  padding-top: 100px;
  transition: right 0.35s ease;

  z-index: 1500;
  display: none;
}

.mobile-menu.open { right: 0; }

.mobile-menu ul {
  list-style: none;
  padding: 0 30px;
  margin: 0;
}

.mobile-menu li { margin-bottom: 22px; }

.mobile-menu a {
  text-decoration: none;
  color: var(--brand-2);
  font-size: 1.15rem;
  font-weight: 600;
}


/* =========================================================
   05 - RESPONSIVE NAV SWITCH (ROBUST)
========================================================= */
@media (min-width: 981px) {
  nav { display: block; }
  .hamburger { display: none; }
  .mobile-menu { display: none; }
}

@media (max-width: 980px),
       (hover: none) and (pointer: coarse) {
  nav { display: none !important; }
  .hamburger { display: flex !important; }
  .mobile-menu { display: block !important; }
}

/* Prevent logo overlap on phones */
@media (max-width: 600px) {
  .logo-area {
    width: 150px;
    height: 70px;
  }

  .nav-logo {
    height: 120px;
    top: -6px;
  }

  .site-header { height: 72px; }
}


/* =========================================================
   06 - HERO (FLUID + RESPONSIVE)
========================================================= */
.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 360px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  padding-top: 200px;
}

@media (min-width: 1200px) {
  .hero {
    height: 80vh;
    min-height: 520px;
  }
}

@media (min-width: 1600px) {
  .hero {
    height: 90vh;
    min-height: 580px;
  }
}

@media (max-width: 600px) {
  .hero {
    height: 52vh;
    min-height: 320px;
    padding-top: 140px;
  }
}

@media (max-width: 380px) {
  .hero {
    height: 48vh;
    min-height: 300px;
    padding-top: 120px;
  }
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0.10) 45%,
    rgba(0,0,0,0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(92%, 1100px);
  text-align: center;
  color: #ffffff;

  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  transition: opacity 1s ease, transform 1s ease;
}

.hero-content.loaded {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-headline {
  font-family: 'Aclonica', sans-serif;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.05;
  font-size: clamp(2rem, 4.2vw, 4rem);
}

.hero-tagline {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  margin-top: 10px;
  line-height: 1.25;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
}

@media (max-width: 480px) {
  .hero-headline { letter-spacing: 0.09em; }
}


/* =========================================================
   07 - FADE-IN (STATIC CONTENT ONLY)
========================================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .fade-in {
    opacity: 1;
    transform: none;
  }
}


/* =========================================================
   08 - INDEX CONTENT SECTIONS
========================================================= */
.editorial {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}


.editorial h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.editorial p {
  margin: 0;
  color: #555;
  font-size: 1.05rem;
}

/* Home page card grid */
.experience-grid {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;

  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}


/* =========================================================
   09 - EXPERIENCE CARDS
========================================================= */
.card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;

  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.18);
}

.card-image-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-image {
  position: relative;
  overflow: hidden;
  border-radius: 18px 18px 28px 28px;
}

.card-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: inherit;
  transition: transform 0.4s ease;
  display: block;
}

.card:hover .card-image img { transform: scale(1.08); }

.card-image::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.35) 100%);
  z-index: 2;
}

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}

.card:hover .card-gradient { opacity: 1; }

.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;

  background: rgba(0,123,148,0.9);
  color: #ffffff;

  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;

  z-index: 4;
}

.card-body {
  padding: 28px;
  text-align: left;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  color: var(--brand-dark);
}

.card-body p {
  margin: 0 0 20px;
  color: #555;
}

.card-link {
  color: var(--brand-2);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--brand-1);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.card-link:hover {
  color: var(--brand-1);
  border-color: var(--brand-2);
}


/* =========================================================
   10 - WAVE DIVIDER
========================================================= */
.wave-divider svg {
  width: 100%;
  height: 80px;
  display: block;
}

.wave-divider path { fill: var(--brand-dark); }


/* =========================================================
   11 - FOOTER
========================================================= */
.site-footer {
  background: var(--brand-dark);
  color: #ffffff;
  padding: 18px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.footer-inner > * { margin: 6px 0; }

.trust-line {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
}

.modern-clia {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
}

.footer-contact a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.footer-contact a:hover { text-decoration: underline; }

.footer-meta {
  opacity: 0.85;
  font-size: 0.95rem;
}


/* =========================================================
   12 - MOBILE CTA BAR
========================================================= */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--brand-1);
  text-align: center;
  padding: 14px 0;
  z-index: 2000;
}

.mobile-cta-bar a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

@media (min-width: 769px) {
  .mobile-cta-bar { display: none; }
}

/* =========================================================
   13 - MOBILE FIX PATCH (ADD THIS AT BOTTOM)
   Fixes: logo/header overflow, hero padding on phones,
          mobile menu scrolling, CTA covering content
========================================================= */

/* Give the page content room below the fixed header */
body { padding-top: 80px; }
@media (max-width: 600px) { body { padding-top: 72px; } }

/* Make logo fit inside header on phones (critical) */
@media (max-width: 600px) {
  .site-header { height: 72px; padding: 6px 0; }

  .logo-area {
    height: 60px;     /* smaller but consistent */
    width: 150px;
  }

  /* override absolute 120px logo on mobile */
  .nav-logo {
    position: relative;      /* stops absolute overflow */
    height: 60px !important; /* fits inside header */
    width: auto;
    max-width: 150px;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }

  .site-header.scrolled .nav-logo {
    height: 56px !important;
  }
}

/* Mobile menu: allow scrolling and keep above CTA */
@media (max-width: 980px), (hover: none) and (pointer: coarse) {
  .mobile-menu {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 90px; /* room for CTA bar */
  }
}

/* Hero: your padding-top: 200px is huge on phones and causes layout issues */
@media (max-width: 600px) {
  .hero {
    padding-top: 0; /* IMPORTANT: stops the hero from being crushed */
  }
}

/* Prevent CTA bar from covering bottom content */
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
}

/* iOS dynamic viewport height improvement (optional safe enhancement) */
@supports (height: 100dvh) {
  @media (max-width: 600px) {
    .mobile-menu { height: 100dvh; }
  }
}
