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

:root {
  /* Radius and base sizing */
  --radius: 12px;

  /* Typography scale */
  --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;

  /* Color palette (456bed variant: Midnight Teal / Deep Blues / Amber) */
  --color-bg: #F0F8F8;              /* light silver background */
  --color-bg-alt: #EFF4F6;           /* subtle alt bg for sections */
  --color-bg-card: #FFFFFF;           /* card background */
  --color-border: #C6D7E1;
  --color-shadow: rgba(0,0,0,.18);

  --color-primary: #005060;           /* deep teal (dark) */
  --color-secondary: #C87800;         /* amber accent */
  --color-accent: #C87800;

  --color-text: #001820;              /* body text on light bg (meets contrast) */
  --color-text-muted: #305060;         /* muted text */
  --color-text-on-primary: #FFFFFF;     /* text on primary (light) */

  --color-bg-dark: #001820;

  /* Ensure hero text readability on dark hero backgrounds if used */
  /* Contrast-aware default for non-hero contexts is set by above values */
}

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

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* prevent horizontal scroll on mobile */
  font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

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

* { box-sizing: border-box; }

.container {
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  margin: 0 auto; /* CENTER CONTENT AT EVERY BREAKPOINT */
}

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: 64px; /* DO NOT assign a fixed height; content drives height */
  overflow: visible;
  background: rgba(240,248,248,0.98);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem; /* mobile padding, keeps logo, burger and nav centered */
  width: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
}
.site-logo a { text-decoration: none; color: inherit; display: flex; align-items: center; }
.site-logo img {
  height: 44px;               /* MANDATORY: not larger than 52px, width auto */
  width: auto;
  max-width: 160px;
  object-fit: contain;          /* Prevent distortion */
  display: block;
}

.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; /* ALWAYS white for hamburger bars */
  border-radius: 2px;
  transition: 0.2s ease;
}

.site-nav {
  display: none; /* mobile hidden by default */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-direction: column; /* mobile: vertical menu */
  gap: 0;
}
.nav-item { }

/* Desktop/tablet dropdown logic relies on the rules below */
.nav-dropdown { position: relative; }

/* dropdown trigger in nav */
.nav-dropdown-toggle { cursor: pointer; font-weight: var(--font-weight-bold); }

/* dropdown panel */
.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;
  color: var(--color-text);
  text-decoration: none;
}
.nav-dropdown-menu .nav-link:hover { background: var(--color-bg-alt); }

/* mobile adjustments for dropdown inside vertical nav */
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem; /* indent under the toggle */
  }
  .nav-list { flex-direction: column; }
}

@media (min-width: 768px) {
  /* NAV LAYOUT: logo-left, nav-right */
  .site-header .container {
    justify-content: space-between;
  }

  /* Tablet+ adjustments: hamburger hidden, nav always visible to the right */
  .nav-toggle-label { display: none !important; }

  .site-nav {
    display: flex;               /* tablet+: show nav by default */
    align-items: center;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }

  .nav-list {
    display: flex !important;
    flex-direction: row !important; /* MUST be horizontal on tablet/desktop */
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }

  .nav-link {
    font-size: var(--font-size-sm); /* tablet/desktop: small text in nav */
    padding: 0.4rem 0.75rem;
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
  }

  /* Ensure dropdown still works on tablet/desktop */
  .site-nav .nav-dropdown-menu {
    min-width: 200px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }
  .hero { min-height: 70vh; }
  .hero-headline { font-size: var(--font-size-2xl); text-align: center; }
  .section { padding: 4rem 0; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .footer-inner { flex-direction: row; text-align: left; }
  .site-logo { /* keep logo sizing consistent on large screens if needed */ }
}

@media (max-width: 767px) {
  /* Base mobile-first adjustments */
  html, body { overflow-x: hidden; max-width: 100%; }

  .hero { min-height: 50vh; padding: 2rem 1rem; display: flex; align-items: center; justify-content: center; }\n  .card-grid { grid-template-columns: 1fr; }
  .section { padding: 2rem 0; }
  .hero-poster { margin: 1.5rem auto; }
  .site-nav { display: none; } /* hidden; toggled via input in mobile */
  .nav-link { font-size: var(--font-size-sm); }
}

@media (min-width: 768px) {
  /* Tablet: ensure container centers across breakpoints */
  .container { margin: 0 auto; }
  /* Logo-left, nav-right alignment rules already defined above in tablet section */
  .site-header { box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
}

/* HERO LAYOUT – exact extra rules */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #001820 0%, #003246 60%, #005060 100%);
  color: #fff; /* hero text on dark gradient */
}
.hero h1 {
  font-size: var(--font-size-hero);
  line-height: var(--line-height-tight);
  margin: 0 0 0.75rem;
  color: #fff;
}
.hero p { color: #F7FBFC; margin: 0 0 1rem; }
.hero a { color: #fff; }

.hero-poster {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 500px;
  margin: 1.5rem auto;
}
.hero-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  cursor: pointer;
}
.hero-play svg {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.hero-headline { text-align: center; margin-bottom: 0.75rem; }
.hero-cta { display: flex; justify-content: center; margin-top: 1.5rem; }

/* CARD SYSTEM */
.card {
  display: flex;
  flex-direction: column; /* MANDATORY: vertical card layout */
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 80, 96, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 80, 96, 0.22); /* glow-like lift */
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content {
  padding: 1rem;
  color: var(--color-text);
}
.card h3 {
  font-size: var(--font-size-lg);
  margin: 0 0 0.5rem;
}
.card p { margin: 0; color: var(--color-text-muted); }

/* CARD GRID */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

/* FOOTER */
.site-footer {
  background: var(--color-bg-alt);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; padding: 0 1rem; }
}

/* SECTION & TYPOGRAPHY */
.section {
  padding: 2rem 0;
}
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 1rem;
  color: var(--color-text);
}
h1, h2, h3, h4 { margin: .25rem 0; font-weight: var(--font-weight-bold); color: var(--color-text); }
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

/* LINKS / TEXT */
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* FORM ELEMENTS */
label { display: block; margin-bottom: 0.25rem; font-size: var(--font-size-sm); color: var(--color-text); }
input, textarea, select {
  font-family: inherit;
  font-size: var(--font-size-base);
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  background: #fff;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(0, 80, 96, 0.15);
}
button, input[type="submit"] {
  font-family: inherit;
}
button[type="submit"] {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
button[type="submit"]:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--color-bg-alt); }

/* BUTTON VARIANTS */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: 1px solid rgba(0,0,0,0.0);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.text-center { text-align: center; }

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

/* UTILITIES */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.hidden { display: none; }

/* ANIMATIONS / TRANSITIONS (2+) */
.nav-link { transition: color 0.2s ease, text-decoration-color 0.2s ease; }
.nav-link:hover { color: var(--color-primary); text-decoration: underline; }
.card:hover .card-content { /* subtle lift on card content if needed */ }

/* END OF STYLES */