/* Sailing Billabong - Main Styles */

/* ===== MODERN SAILING COLOR SCHEME ===== */
:root {
  /* Primary Navy Blues */
  --navy-dark: #1a365d;      /* Deep navy for headers and primary elements */
  --navy-primary: #2c5aa0;   /* Main navy blue for buttons and accents */
  --navy-light: #4a90b8;     /* Lighter navy for hover states */
  
  /* Light Blues & Backgrounds */
  --light-blue: #e6f3ff;     /* Very light blue for sections */
  --blue-accent: #87ceeb;    /* Sky blue for highlights */
  --background-light: #f8fafc; /* Off-white background */
  --white: #ffffff;
  
  /* Greys */
  --grey-light: #f1f5f9;     /* Light grey backgrounds */
  --grey-medium: #64748b;    /* Medium grey for muted text */
  --grey-dark: #334155;      /* Dark grey for body text */
  
  /* Text Colors */
  --text-primary: #1a365d;   /* Navy for headings */
  --text-body: #334155;      /* Dark grey for body text */
  --text-muted: #64748b;     /* Medium grey for secondary text */
  --text-light: #ffffff;     /* White for dark backgrounds */
  
  /* Interactive States */
  --hover-navy: #1e4a72;     /* Darker navy for hover */
  --active-blue: #3b82f6;    /* Bright blue for active states */
  
  /* Shadows & Effects */
  --shadow-light: 0 1px 3px rgba(26, 54, 93, 0.1);
  --shadow-medium: 0 4px 12px rgba(26, 54, 93, 0.15);
  --shadow-heavy: 0 8px 25px rgba(26, 54, 93, 0.2);
  --shadow-blue: 0 4px 20px rgba(44, 90, 160, 0.3);
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--background-light);
  overflow-x: hidden;
}

/* ===== MODERN TYPOGRAPHY HIERARCHY ===== */
h1 {
  font-size: 2rem; /* 32px */
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.75rem; /* 28px */
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  position: relative;
}

h3 {
  font-size: 1.5rem; /* 24px */
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  position: relative;
}

h4 {
  font-size: 1.25rem; /* 20px */
  font-weight: 500;
  color: var(--text-body);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* ===== LINKABLE HEADERS ===== */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
  scroll-margin-top: 100px; /* Account for fixed header */
  cursor: pointer;
  transition: color 0.3s ease;
}

h1[id]:hover, h2[id]:hover, h3[id]:hover, h4[id]:hover, h5[id]:hover, h6[id]:hover {
  color: var(--navy-primary);
}

/* Link icon that appears on hover */
h1[id]:hover::after, h2[id]:hover::after, h3[id]:hover::after {
  content: "🔗";
  font-size: 0.7em;
  margin-left: 0.5rem;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

/* Smooth scroll behavior for anchor links */
html {
  scroll-behavior: smooth;
}

p {
  font-size: 1rem; /* 16px */
  margin-bottom: 1rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* Dark background text variants */
.dark-bg h1,
.dark-bg h2,
.dark-bg h3,
.dark-bg h4,
.dark-bg p {
  color: var(--text-light);
}

/* Muted text variant */
.text-muted {
  color: var(--text-muted) !important;
}

/* ===== FLOATING HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-light);
  z-index: 1000;
  padding: 0.75rem 0;
  transition: all 0.3s ease;
}

/* Desktop rounded header panel - matches content width */
@media (min-width: 1024px) {
  .header {
    left: 50%;
    right: auto;
    top: 1rem;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 1200px;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
  }
  
  .header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-heavy);
  }
}

/* Switch to full-width when screen gets close to header edges */
@media (max-width: 1280px) and (min-width: 769px) {
  .header {
    left: 1rem;
    right: 1rem;
    top: 1rem;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
  }
}

/* Full-width header for mobile and small tablets */
@media (max-width: 768px) {
  .header {
    left: 0;
    right: 0;
    top: 0;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: var(--shadow-light);
  }
}




.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

/* Logo */
.logo {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav a, .nav-dropdown {
  text-decoration: none;
  color: var(--navy-dark);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Add separators only between buttons (not after the last one) */
.nav > *:not(:last-child) {
  border-right: 1px solid rgba(26, 54, 93, 0.15);
}

/* Consistent highlight for all nav items */
.nav > *:hover {
  background: rgba(26, 54, 93, 0.08);
}


/* All inner elements get consistent styling */
.nav > *:hover a, .nav > *:hover .nav-dropdown-toggle {
  color: var(--navy-primary);
  background: transparent !important;
  text-shadow: none;
}

.nav-dropdown:hover > .nav-dropdown-toggle {
  color: var(--navy-primary);
  background: transparent !important;
  text-shadow: none;
}

.nav-dropdown:hover {
  background: rgba(26, 54, 93, 0.08);
}

/* Navigation Dropdown Styles */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown .nav-dropdown-toggle {
  border-radius: 4px;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  padding: 0;
  background: none;
  border: none;
  text-shadow: inherit;
  transition: inherit;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-medium);
  border-radius: 0 0 4px 4px;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
  border: 1px solid rgba(26, 54, 93, 0.15);
  border-top: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown:hover .nav-dropdown-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 1px solid rgba(26, 54, 93, 0.15);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--navy-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 0;
  background: none;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  transform: none;
  border-bottom: 1px solid rgba(26, 54, 93, 0.08);
}

.nav-dropdown-menu a:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(26, 54, 93, 0.08);
  color: var(--navy-primary);
  text-shadow: none;
  transform: translateX(2px);
}

.nav a.active, .nav-dropdown.active > .nav-dropdown-toggle {
  color: var(--navy-primary);
  text-shadow: none;
  font-weight: 700;
  position: relative;
}

.nav a.active::after, .nav-dropdown.active > .nav-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, var(--navy-primary) 0%, var(--blue-accent) 100%);
  border-radius: 1px;
}

/* Language Selector */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--navy-primary);
  background: transparent;
  color: var(--navy-primary);
  text-decoration: none;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.lang-btn:hover,
.lang-btn.active {
  background: var(--navy-primary);
  color: var(--text-light);
  box-shadow: var(--shadow-light);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--navy-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-image: url('../images/header.jpg');
  background-size: cover;
  background-position: center center;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-medium);
  padding: 1rem;
  border-bottom: 2px solid var(--blue-accent);
}

.mobile-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(135, 206, 235, 0.9);
  z-index: -1;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: var(--navy-dark);
  border-bottom: 1px solid rgba(26, 54, 93, 0.2);
  transition: all 0.3s ease;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.mobile-nav a:hover {
  background: rgba(26, 54, 93, 0.8);
  color: var(--text-light);
  text-shadow: none;
}

/* ===== MAIN CONTENT ===== */
.main {
  /* No padding-top for hero - header floats over hero */
}

/* Add padding only to sections after hero */
.section:not(.hero) {
  padding-top: 4rem;
}

/* ===== MODERN RESPONSIVE HERO SECTION ===== */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(26, 54, 93, 0.4), rgba(44, 90, 160, 0.3));
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
  color: var(--text-light);
  position: relative;
  z-index: 2;
}

/* Scroll down indicator - Performance optimized */
.scroll-down-indicator {
  position: absolute;
  bottom: 2rem;
  right: 25%;
  z-index: 3;
  cursor: pointer;
  will-change: transform;
  animation: subtleBounce 3s ease-in-out infinite;
}

.scroll-icon {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  color: rgba(26, 54, 93, 0.8);
}

.scroll-icon:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: var(--navy-primary);
}

.scroll-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

/* Bouncy animation - GPU optimized */
@keyframes subtleBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-12px);
  }
  60% {
    transform: translateY(-6px);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scroll-down-indicator {
    right: 1.5rem;
    bottom: 1.5rem;
  }
  
  .scroll-icon {
    width: 42px;
    height: 42px;
  }
  
  .scroll-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .scroll-down-indicator {
    animation: none;
  }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-light);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.cta-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--blue-accent);
  color: var(--navy-dark);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-medium);
  border: none;
  cursor: pointer;
}

.cta-btn:hover {
  background: var(--navy-light);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.cta-btn.secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.cta-btn.secondary:hover {
  background: var(--text-light);
  color: var(--navy-dark);
}

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  /* Header adjustments */
  .nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .header-container {
    padding: 0 1rem;
  }
  
  .lang-selector {
    gap: 0.25rem;
  }
  
  .lang-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  /* Hero adjustments */
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  /* Typography adjustments */
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .section {
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .cta-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}
