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

:root {
  /* Typography scale */
  --font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, 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;

  /* Radius and shadows */
  --radius: 4px;
  --shadow-strong: 0 8px 24px rgba(0,0,0,.25);
  --shadow-soft: 0 2px 8px rgba(0,0,0,.15);

  /* Color palette (Dark Luxury with Coral Sunrise mood) */
  /* Light background overall (WHITE base) */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F5F0;
  --color-bg-card: #FFFFFF;

  /* Primary brand colors (coral sunrise) */
  --color-primary: #C0321A; /* vivid coral */
  --color-accent: #0F2040;  /* deep navy accent */

  /* Text colors per contrast rules (LIGHT BG) */
  --color-text: #1A0A08;
  --color-text-muted: #6B3020;
  --color-text-on-primary: #F2F2F2; /* since --color-primary is light per rule */
  --color-border: #E7E0D8;
  --color-shadow: rgba(0,0,0,.25);

  /* Utility */
  --container-max: 1200px;
}

*,
*::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;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* Base rule to prevent horizontal scroll on mobile */
}
img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}
* { box-sizing: border-box; }

/* Layout utilities and base containers */
.container {
  width: 100%;
  margin: 0 auto; /* must center at every breakpoint */
  padding: 0 1rem;
}
.section {
  padding: 2rem 0;
}
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 1rem;
  line-height: var(--line-height-tight);
}

/* Header and navigation structure */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 64px; /* NOT fixed height; content dictates height */
  background: var(--color-bg);
  overflow: visible;
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem; /* mobile padding per spec */
}

.site-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
}
.site-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.site-logo { /* ensure height constraint even if parent expands */ }

/* Hamburger nav (mobile) */
.nav-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  left: 0;
  pointer-events: none; /* must rely on label to toggle the input */
}
.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);
  transition: background 0.2s ease;
}
.nav-toggle-label:hover {
  background: rgba(0,0,0,0.55);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff; /* mandatory white bars */
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.site-nav {
  display: none; /* mobile hidden by default */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  padding: 0.25rem 0;
  z-index: 500;
}
.nav-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
}
.nav-item { }
.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--font-size-xs); /* mobile default per breakpoint rule */
  transition: color 0.2s ease, transform 0.2s ease;
  position: relative;
}
.nav-link:hover {
  color: var(--color-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 6px;
  height: 2px;
  width: 0;
  background: var(--color-primary);
  transition: width 0.2s ease;
}
.nav-link:hover::after {
  width: 100%;
}
.nav-item:hover > .nav-link { color: var(--color-primary); }

/* Dropdown navigation (always present in header) */
.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,.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 adjustments for header navigation */
@media (min-width: 768px) {
  /* Tablet layout: center content and show full nav horizontally */
  .site-header .container {
    justify-content: center;
    gap: 2rem;
  }

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

  .site-nav {
    display: flex !important;
    align-items: center;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }

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

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

  /* Dropdown adjustments for desktop */
  .nav-dropdown-menu {
    min-width: 200px;
  }
  .nav-dropdown-menu .nav-link { padding: 0.5rem 1rem; }

  /* Hero tweaks for larger screens */
  .hero { min-height: 60vh; }

  /* Card grid on tablet/desktop */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  /* Section spacing adjustments on larger screens can stay cohesive */
  .footer-inner { text-align: left; }
  .container { margin: 0 auto; }
}

/* Desktop specifics (@media min-width: 1024px) */
@media (min-width: 1024px) {
  .container {
    max-width: var(--container-max);
    padding: 0 2rem;
  }

  .hero {
    min-height: 70vh;
  }
  .hero h1 {
    font-size: var(--font-size-hero);
  }
  .section { padding: 4rem 0; }
  .section-title { font-size: var(--font-size-2xl); }

  /* Card grid sizing stabilizes on wide screens */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  /* Footer alignment remains left; content centered via container on wide screens */
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Typography heavy sections (hero and content) */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #C0321A 0%, #0F2040 100%);
  padding: 4rem 0;
}
.hero-content {
  text-align: center;
}
.hero h1 {
  font-size: var(--font-size-hero);
  margin: 0 0 1rem;
  line-height: var(--line-height-tight);
  color: #fff;
}
.hero p {
  font-size: var(--font-size-base);
  color: #F5F5F5;
  margin: 0 auto;
  max-width: 760px;
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 2rem;
  margin-top: 0.5rem;
}
.hero-stat {
  text-align: center;
  min-width: 80px;
}
.hero-stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}
.hero-stat span {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 767px) {
  .hero-stats { gap: 1.5rem; }
  .hero-stat strong { font-size: 1.5rem; }
  .hero { padding: 3rem 0; }
  .hero h1 { font-size: calc(var(--font-size-hero) * 0.9); }
}

/* Cards and card grids */
.card {
  display: flex;
  flex-direction: column; /* mandatory */
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.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;
}
.card h3 {
  font-size: var(--font-size-lg);
  margin: 0 0 0.5rem;
}
.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 4px; /* 2-4px range as required */
  border: 1px solid transparent;
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn + .btn { margin-left: 0.5rem; }
.btn-primary {
  background: var(--color-primary);
  color: #fff; /* comply with contrast against primary */
  border-color: rgba(0,0,0,.0);
}
.btn-primary:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

/* Headers, lists, and typography adjustments */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5rem;
  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); }

p { margin: 0 0 1rem; }

/* FAQ accordion CSS-only */
.faq-section {
  padding: 2rem 0;
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px var(--color-shadow);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  list-style: none;
  user-select: none;
  color: var(--color-text);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] > .faq-question::after {
  content: "−";
}
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.faq-answer p {
  margin: 0.75rem 0 0;
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}

/* FAQ section heading alignment */
.faq-section .section-title { text-align: left; }

/* Forms */
label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: var(--font-weight-medium);
}
input, textarea, select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(192,50,26,.15);
}
button[type="submit"] {
  cursor: pointer;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
}
th, td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}
th {
  text-align: left;
  font-weight: var(--font-weight-bold);
}
td { vertical-align: top; }

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.hidden { display: none !important; }

/* Responsive adjustments for core elements (mobile-first setup already defined above) */

/* 375px-specific tweaks (optional fine-tuning) - keep mobile-friendly defaults intact */
@media (max-width: 374px) {
  .site-logo img { height: 40px; } /* ensure logo scales down slightly on very small screens */
  .hero h1 { font-size: calc(var(--font-size-hero) * 0.9); }
}

/* 768px breakpoint adjustments (tablet) already covered above but keep explicit here for clarity */
@media (min-width: 768px) {
  /* Hamburger hidden, navigation horizontal is already defined in main rules and tablet adjustments above */
  /* Ensure container remains centered across tablet sizes */
  .container { margin: 0 auto; }
}

/* 1280px (desktop) adjustments already included in 1024px block; keep explicit if needed */
@media (min-width: 1280px) {
  /* Additional desktop niceties could go here if needed in future variants */
}