/* ===============================
   Frost Saga Awards - Modern Bold CSS
   Role: Senior CSS Developer & UI Designer
   Style: modern_bold (bold fonts, bright colors, geometric shapes, high contrast)
   Layout: STRICTLY FLEXBOX ONLY
   =============================== */

/* -------------------------------
   Reset & Base Normalize
--------------------------------- */
* { box-sizing: border-box; }
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; vertical-align: baseline; }
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section { display: block; }
body { line-height: 1.5; }
ol, ul { list-style: none; padding-left: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; background: none; border: none; }

/* -------------------------------
   Theme Variables (with fallbacks)
--------------------------------- */
:root {
  --color-primary: #0B1F3A; /* Navy */
  --color-secondary: #1F7A8C; /* Teal */
  --color-accent: #F0F5FF; /* Icy light */
  --color-bg: #FFFFFF;
  --color-ink: #0B1F3A;
  --color-ink-inverse: #FFFFFF;
  --color-muted: #E6EEF7;
  --color-outline: #A7C5D8;
  --color-electric: #15C6E6; /* Bright highlight within brand vibe */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(11,31,58,0.12);
  --shadow-md: 0 8px 20px rgba(11,31,58,0.18);
  --shadow-lg: 0 20px 40px rgba(11,31,58,0.22);
  --speed-fast: 150ms;
  --speed: 250ms;
  --speed-slow: 400ms;
}

/* -------------------------------
   Typography - Modern Bold Scale
--------------------------------- */
body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: "Trebuchet MS", Verdana, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  letter-spacing: 0.5px;
  color: var(--color-ink);
}

h1 { font-size: 40px; line-height: 1.15; }
h2 { font-size: 28px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; }

p, li { font-size: 16px; }
strong { font-weight: 800; }
em { font-style: italic; }

/* Spacing rhythm */
p + p, p + ul, p + ol, ul + p, ol + p, .text-section > * + * { margin-top: 12px; }
section + section { margin-top: 24px; }

/* Links */
a { color: var(--color-secondary); transition: color var(--speed) ease; }
a:hover { color: var(--color-electric); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--color-electric); outline-offset: 2px; border-radius: 6px; }

/* -------------------------------
   Containers & Flex Layouts (Flexbox only)
--------------------------------- */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  max-width: 1200px;
}

.content-wrapper {
  display: flex; /* FLEX ONLY */
  flex-direction: column;
  gap: 20px;
}

/* Mandatory spacing & alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* -------------------------------
   Header & Navigation
--------------------------------- */
header {
  position: sticky; top: 0; z-index: 999;
  background: var(--color-bg);
  border-bottom: 4px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.logo img { height: 40px; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a {
  font-weight: 800;
  color: var(--color-primary);
  padding: 10px 12px;
  border-radius: 8px;
  transition: background var(--speed) ease, color var(--speed) ease, transform var(--speed) ease;
}
.main-nav a:hover { background: var(--color-accent); color: var(--color-secondary); transform: translateY(-1px); }

/* Primary CTA in header */
header .button.primary { display: none; }

/* Mobile menu controls */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--color-primary);
  color: var(--color-ink-inverse);
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) ease, background var(--speed) ease;
}
.mobile-menu-toggle:hover { transform: translateY(-2px); background: #0A2B52; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--color-primary);
  color: var(--color-ink-inverse);
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 16px;
  padding: 20px;
  transform: translateX(100%);
  opacity: 0; pointer-events: none;
  transition: transform var(--speed-slow) ease, opacity var(--speed) ease;
}
.mobile-menu[aria-hidden="false"] { transform: translateX(0); opacity: 1; pointer-events: auto; }
.mobile-menu-close {
  align-self: flex-end; width: 40px; height: 40px; border-radius: 10px;
  background: var(--color-secondary); color: #fff;
}
.mobile-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.mobile-nav a {
  padding: 14px 12px; border-radius: 10px; background: rgba(255,255,255,0.06);
  color: #fff; font-weight: 800; letter-spacing: 0.2px;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.14); }

/* -------------------------------
   Buttons
--------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 12px;
  font-weight: 900; letter-spacing: 0.3px; text-transform: none;
  transition: transform var(--speed) ease, box-shadow var(--speed) ease, background var(--speed) ease, color var(--speed) ease;
  border: 2px solid transparent; white-space: nowrap;
}
.button.primary { background: var(--color-secondary); color: #fff; box-shadow: var(--shadow-sm); }
.button.primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #186676; }
.button.secondary { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.button.secondary:hover { background: var(--color-accent); transform: translateY(-2px); }
.button:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* -------------------------------
   Hero Section (bold, high-contrast)
--------------------------------- */
.hero { position: relative; background: var(--color-primary); color: var(--color-ink-inverse); overflow: hidden; }
.hero .content-wrapper { padding: 40px 0; }
.hero h1 { color: #fff; text-transform: none; }
.hero p { color: #EAF2FF; }

/* Geometric decorative shapes - decorative only */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; opacity: 0.12;
  width: 260px; height: 260px; border-radius: 20px; background: var(--color-secondary);
}
.hero::before { top: -60px; right: -40px; transform: rotate(18deg); }
.hero::after { bottom: -80px; left: -50px; transform: rotate(-12deg); background: var(--color-electric); }
.hero .container, .hero .content-wrapper, .hero * { position: relative; z-index: 1; }

.trust-badges { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-md); padding: 12px 14px; }
.trust-badges p { font-size: 14px; color: #DDE9FF; }

.key-stats ul { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.key-stats li {
  background: #0D274B; color: #fff; border-radius: 14px; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.14);
}

/* -------------------------------
   Section Defaults & Text Blocks
--------------------------------- */
main section { padding: 24px 0; }
main section h2 { color: var(--color-primary); }
.text-section { display: flex; flex-direction: column; gap: 12px; }
.text-section ul { display: flex; flex-direction: column; gap: 8px; padding-left: 0; }
.text-section ol { display: flex; flex-direction: column; gap: 8px; padding-left: 18px; }
.text-section ol li { list-style: decimal; }
.text-section ul li { position: relative; padding-left: 14px; }
.text-section ul li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 2px; background: var(--color-secondary);
}

/* Testimonials - light background with dark text for readability */
.testimonial-card {
  background: var(--color-accent);
  border: 2px solid var(--color-outline);
  border-left: 8px solid var(--color-secondary);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.testimonial-card p { margin: 0; }
.testimonial-card p + p { margin-top: 6px; }

/* Map placeholder */
.map-placeholder {
  display: flex; align-items: center; justify-content: center; min-height: 180px;
  background: #fff; border: 2px dashed var(--color-outline); border-radius: var(--radius-md); color: var(--color-primary);
}

/* Footer */
footer { background: var(--color-primary); color: #DDE7F6; margin-top: 20px; }
footer .content-wrapper { padding: 24px 0; }
footer .content-wrapper:first-child { border-bottom: 1px solid rgba(255,255,255,0.12); }
footer h3 { color: #fff; font-size: 16px; text-transform: uppercase; letter-spacing: 0.6px; }
footer nav { display: flex; flex-direction: column; gap: 8px; }
footer a { color: #EAF2FF; }
footer a:hover { color: var(--color-electric); }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { height: 36px; filter: brightness(100%); }
.footer-contact p img { width: 16px; height: 16px; vertical-align: middle; margin-right: 6px; display: inline-block; }
footer .social { display: flex; flex-wrap: wrap; gap: 8px; }

/* Layout for footer columns */
footer .content-wrapper { flex-direction: column; }
@media (min-width: 900px) {
  footer .content-wrapper:first-child { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 24px; }
  .footer-brand, .footer-links, .footer-legal, .footer-contact { flex: 1 1 220px; }
}

/* -------------------------------
   Forms & Inputs (generic)
--------------------------------- */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--color-outline);
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease; background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--color-secondary); box-shadow: 0 0 0 4px rgba(31,122,140,0.15); outline: none; }
label { font-weight: 800; color: var(--color-primary); margin-bottom: 6px; display: inline-block; }

/* -------------------------------
   Cards (general purpose)
--------------------------------- */
.card { border: 2px solid var(--color-muted); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* -------------------------------
   Responsive Rules (Mobile-first)
--------------------------------- */
@media (min-width: 600px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
}

@media (min-width: 768px) {
  /* Show desktop nav */
  .main-nav { display: flex; }
  header .button.primary { display: inline-flex; }
  .mobile-menu-toggle { display: none; }
  
  /* Balanced section padding */
  main section { padding: 36px 0; }
  .hero .content-wrapper { padding: 64px 0; }
  .logo img { height: 48px; }
  
  /* Text-image utility */
  .text-image-section { flex-direction: row; }
}

@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

@media (min-width: 1024px) {
  h1 { font-size: 56px; }
  .container { padding: 0 24px; }
}

/* -------------------------------
   Lists & Content Grouping as Flex
--------------------------------- */
.content-grid > * { flex: 1 1 280px; }
.card-container > .card { flex: 1 1 280px; }

/* -------------------------------
   Accessibility & Micro-interactions
--------------------------------- */
::selection { background: var(--color-electric); color: #00212E; }
[aria-hidden="true"] { visibility: visible; }

/* -------------------------------
   Mobile Menu & Header Z-index
--------------------------------- */
header { box-shadow: var(--shadow-sm); }

/* -------------------------------
   Additional Page-specific Enhancements
--------------------------------- */
/* Hero on legal/utility pages: keep contrast but calmer paddings already set */

/* Key links in hero CTA on dark bg */
.hero .button.secondary { background: transparent; color: #fff; border-color: #fff; }
.hero .button.secondary:hover { background: rgba(255,255,255,0.12); }

/* Inline icon alignment for thank-you page */
.text-section img[alt="Confirmed"] { width: 18px; height: 18px; display: inline-block; vertical-align: middle; margin-right: 6px; }

/* -------------------------------
   Cookie Consent Banner & Modal
--------------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  background: #FFFFFF; color: var(--color-primary);
  box-shadow: 0 -8px 24px rgba(11,31,58,0.18);
  border-top: 4px solid var(--color-secondary);
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; 
  transform: translateY(110%);
  opacity: 0; pointer-events: none;
  transition: transform var(--speed-slow) ease, opacity var(--speed) ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-banner .cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .button { padding: 10px 14px; border-radius: 10px; }
.cookie-banner .button.accept { background: var(--color-secondary); color: #fff; }
.cookie-banner .button.reject { background: #fff; color: var(--color-primary); border: 2px solid var(--color-primary); }
.cookie-banner .button.settings { background: var(--color-accent); color: var(--color-primary); border: 2px solid var(--color-outline); }

/* Cookie modal */
.cookie-overlay {
  position: fixed; inset: 0; z-index: 2100; background: rgba(11,31,58,0.66);
  opacity: 0; pointer-events: none; transition: opacity var(--speed) ease;
}
.cookie-overlay.is-visible { opacity: 1; pointer-events: auto; }
.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, 60%);
  z-index: 2200; width: min(680px, 92vw);
  background: #fff; color: var(--color-primary);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 2px solid var(--color-muted);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
  opacity: 0; pointer-events: none; transition: transform var(--speed-slow) ease, opacity var(--speed) ease;
}
.cookie-modal.is-visible { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.cookie-modal header { border: none; background: transparent; position: static; box-shadow: none; }
.cookie-modal h3 { font-size: 20px; color: var(--color-primary); }
.cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--color-muted); border-radius: 12px; }
.cookie-row p { margin: 0; font-size: 14px; color: var(--color-primary); }

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 8px; }
.toggle input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .switch {
  width: 48px; height: 28px; border-radius: 99px; background: var(--color-muted); border: 2px solid var(--color-outline);
  position: relative; transition: background var(--speed) ease, border-color var(--speed) ease;
}
.toggle .switch::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; left: 3px; box-shadow: var(--shadow-sm); transition: transform var(--speed) ease;
}
.toggle input[type="checkbox"]:checked + .switch { background: var(--color-secondary); border-color: var(--color-secondary); }
.toggle input[type="checkbox"]:checked + .switch::after { transform: translateX(20px); }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-actions .button { padding: 10px 14px; }
.cookie-actions .button.save { background: var(--color-secondary); color: #fff; }
.cookie-actions .button.cancel { background: #fff; border: 2px solid var(--color-primary); color: var(--color-primary); }

/* -------------------------------
   Utility Classes
--------------------------------- */
.hidden { display: none !important; }
.center { display: flex; align-items: center; justify-content: center; }
.max-w-800 { max-width: 800px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* -------------------------------
   Page-specific tweaks
--------------------------------- */
/* Hero spacing adjustments by page context */
.index .hero .content-wrapper,
.services .hero .content-wrapper,
.awards-catalog .hero .content-wrapper,
.portfolio .hero .content-wrapper,
.pricing .hero .content-wrapper,
.about .hero .content-wrapper,
.contact .hero .content-wrapper,
.privacy-policy .hero .content-wrapper,
.gdpr .hero .content-wrapper,
.cookies-policy .hero .content-wrapper,
.terms-of-use .hero .content-wrapper,
.thank-you .hero .content-wrapper { gap: 16px; }

/* Ensure adequate spacing between repeated testimonial cards */
main .testimonial-card + .testimonial-card { margin-top: 12px; }

/* -------------------------------
   Desktop layouts for repeated blocks using Flex
--------------------------------- */
@media (min-width: 900px) {
  /* Distribute content within generic section wrappers */
  main .content-wrapper { flex-direction: column; }
  /* If columns are desired, use .content-grid or .card-container utilities (flex) */
}

/* -------------------------------
   Compliance: Ensure no overlap & spacing
--------------------------------- */
section .container .content-wrapper > * { margin-left: 0; margin-right: 0; }
main .content-wrapper > * + * { margin-top: 8px; }

/* -------------------------------
   Print Basics
--------------------------------- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-overlay, .cookie-modal { display: none !important; }
  a:after { content: " (" attr(href) ")"; font-size: 12px; }
}
