@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;700&display=swap');

:root {
  /* COLOR PALETTE */
  --color-bg: #FFFBF0;        /* light cream - site background (LIGHT) */
  --color-bg-alt: #FBEFD7;     /* alternating section bg (slightly warmer) */
  --color-bg-card: #FFFFFF;     /* card background (kept white for contrast) */
  --color-primary: #0A7A70;     /* tropical teal (brand primary) */
  --color-secondary: #B8860B;   /* sandy gold (accent) */
  --color-accent: #7A5A2A;      /* additional warm gold accent */

  --color-text: #2D1F0A;        /* body text on light backgrounds */
  --color-text-muted: #5C4A2A;  /* muted text on light backgrounds */
  --color-text-on-primary: #FFFFFF; /* text on dark/primary surfaces (white) */

  --color-border: rgba(0,0,0,0.15);
  --color-shadow: 0 6px 16px rgba(0,0,0,0.25);

  /* SHAPES & SIZING */
  --radius: 12px;
  --gap: 1rem;

  /* TYPOGRAPHY */
  --font-family: 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base:  1rem;
  --font-size-md:   1.125rem;
  --font-size-lg:   1.25rem;
  --font-size-xl:   1.5rem;
  --font-size-2xl:  2rem;
  --font-size-3xl:  2.75rem;
  --font-size-hero: 3.5rem;
  --line-height-tight: 1.2;
  --line-height-base:  1.6;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold:   700;
}

/* RESET / BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }

/* LAYOUT ELEMENTS & UTILITY BASES */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.section {
  padding: 3.5rem 0;
  background: var(--color-bg);
  color: var(--color-text);
}

.section:nth-child(even) {
  background: var(--color-bg-alt);
}

.text-center { text-align: center; }

/* SITE HEADER & NAVIGATION (MOBILE-FIRST) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  background: var(--color-bg);
  /* no fixed height; content dictates height */
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  /* margin auto handled by .container at all breakpoints */
  justify-content: flex-start;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
}

.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* HAMBURGER NAV (CSS-ONLY) */
.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  z-index: 200;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  border: 1.5px solid rgba(255,255,255,0.7);
}

.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

/* Right side navigation (collapsed on mobile, visible on tablet+) */
.site-nav {
  display: none; /* mobile hidden by default */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-bg);
  z-index: 500;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.nav-list {
  display: flex;
  flex-direction: column; /* mobile-first: vertical nav */
  gap: 0;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
}

.nav-item { }

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-xs);
  color: var(--color-text);
  transition: color 0.2s ease;
  border-bottom: 1px solid var(--color-border);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Dropdowns in mobile */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1.25rem;
  width: 100%;
  border-bottom: none;
}
.nav-dropdown-menu .nav-link:hover {
  background: var(--color-bg-alt);
}

/* Desktop/tablet nav layout overrides */
@media (min-width: 768px) {
  .site-header .container {
    justify-content: center;
    gap: 2rem;
  }

  /* Hide hamburger on tablet+. Show horizontal nav */
  .nav-toggle-label { display: none !important; }

  .site-nav {
    display: flex;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  /* NAV LAYOUT (tablet+) */
  .nav-list {
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }

  .nav-link {
    font-size: var(--font-size-sm);
    padding: 0.25rem 0.5rem;
    border-bottom: none;
  }

  /* HEADER CENTERED Nav Layout (per NAV LAYOUT) */
  .site-header .container {
    justify-content: center;
  }
  .site-nav { align-items: center; }

  /* Tablet/narrow/Desktop hero tweaks & card grid adjustments will follow in their sections below */
}

/* Hero component (variant with reverse layout available via helper classes) */
.hero {
  min-height: 50vh;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-on-primary); /* dark on light by default, overridden for hero on dark bg via class if needed */
  background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(18,6,38,0.85) 60%, rgba(0,0,0,0.9) 100%);
  /* dark gradient to ensure white text as per MAGIC rules */
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
.hero-inner--reverse { display:flex; align-items:center; gap:3rem; flex-direction: row-reverse; }
.hero-text { flex: 1 1 50%; }
.hero-media { flex: 1 1 45%; }
.hero-img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 480px;
  display: block;
}
.hero-badge {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Hero headings & text scale */
.hero h1 {
  margin: 0 0 0.5rem 0;
  font-size: var(--font-size-hero);
  line-height: var(--line-height-tight);
}
.hero p { margin: 0; font-size: var(--font-size-base); }

/* HEADING DEPENDENT ON VIEWPORTS (hero scales) */
@media (max-width: 767px) {
  .hero { min-height: 50vh; }
  .hero h1 { font-size: var(--font-size-2xl); }
  .hero-inner--reverse { flex-direction: column; }
  .hero-media { width: 100%; }
}
@media (min-width: 768px) {
  .hero { min-height: 60vh; }
  .hero h1 { font-size: var(--font-size-hero); }
}
@media (min-width: 1024px) {
  .hero { min-height: 70vh; }
}

/* HERO TEXT CARD OVERRIDE FOR DARK BACKGROUNDS (ensures legibility if a light panel sits in hero) */
.hero .hero-text-card,
.hero .card {
  color: var(--color-text);
}
.hero .hero-text-card h1,
.hero .hero-text-card p {
  color: var(--color-text);

/* CARD COMPONENTS (GRID CARDS) */
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-card);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.card-img-wrap { overflow: hidden; }

/* CARD IMAGE (mandatory) */
.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  /* Top corners rounded to match card top border radius */
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-body {
  padding: 1rem 1.25rem;
}
.card > :not(img) { padding: 1rem 1.25rem; }

/* Card content typography */
.card h3, .card h4 { margin-top: 0; margin-bottom: 0.5rem; }
.card p { margin: 0; line-height: var(--line-height-base); color: var(--color-text-muted); }

/* Card grid layout (auto-fill) */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  width: 100%;
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* SECTION & LAYOUT / NAVAID
   (CONFORM to alternating backgrounds and spacing)
*/
.btn {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: none;
  cursor: pointer;
  transition: filter 0.2s ease, background 0.2s ease;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  text-align: center;
}
.btn:hover { filter: brightness(0.95); }

/* Primary/Secondary button styles (contrast rules) */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn:focus { outline: 2px solid var(--color-border); outline-offset: 2px; }

/* FOOTER */
.site-footer {
  background: var(--color-bg-alt);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-footer a { color: var(--color-text); }

/* FORMS */
label { display: block; font-size: var(--font-size-xs); margin-bottom: 0.25rem; color: var(--color-text); }
input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
input::placeholder, textarea::placeholder { color: var(--color-text-muted); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10,122,112,0.15);
}

/* TABLES */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.5rem; border-bottom: 1px solid var(--color-border); }

/* UTILITY SPACING (mt-1 to mt-4) */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* HIDE HELPER */
.hidden { display: none !important; }

/* RESPONSIVE REQUIREMENTS */
/* Base mobile-first tweaks already applied above. */

/* Tablet (≥ 768px) - NAV LAYOUT (all-centered) and typography tweaks */
@media (min-width: 768px) {
  /* Centered header content per NAV LAYOUT
     - container centers content; nav laid out horizontally and centered */
  .site-header .container {
    justify-content: center;
    gap: 2rem;
  }

  /* NAV LINK sizing on tablet/desktop */
  .nav-link { font-size: var(--font-size-sm); }

  /* NAV LAYOUT tweaks for tablet */
  .site-nav { align-items: center; }

  /* Ensure logo height remains within design bounds on tablet */
  .site-logo img { height: 40px; max-width: 140px; }
  /* Make the hero text readable on light backgrounds by default; override per design if needed */
  .hero { color: var(--color-text-on-primary); }
}

/* Desktop (≥ 1024px) tweaks */
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; margin: 0 auto; }

  .hero { min-height: 70vh; }

  .hero h1 { font-size: var(--font-size-hero); }

  /* Card grid density expands on large screens */
  .card-grid { gap: 1.25rem; }
}