/* Mobile nav toggle (hamburger) */
.nav-toggle {
    display: none; /* hidden on desktop */
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-light);
    border-radius: 6px;
    padding: 8px;
    margin-left: 12px;
    cursor: pointer;
}

/* Prevent background scroll when mobile menu open */
body.no-scroll { overflow: hidden; }
.nav-toggle:hover { border-color: var(--border-active); box-shadow: 0 0 10px var(--shadow-light); }
.nav-toggle .nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    margin: 4px 0;
    transition: transform 200ms ease, opacity 200ms ease, background-color 200ms ease;
}

/* Animate hamburger to X when open */
.nav-toggle.open .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Variables based on the provided image design --- */
:root {
    --primary-blue: #70b0c9; /* Light blue accent */
    --secondary-blue: #4a7a8d; /* Slightly darker blue */
    --glow-blue: #a0d8ff; /* For more intense glows */
    --text-light: #e0e0e0; /* Main light text */
    --text-muted: #aaaaaa; /* Muted text for descriptions */
    --bg-dark: #1a1a2e; /* Deep dark background */
    --bg-header: #202c3e; /* Header/Footer background */
    --card-bg: #2c2c4a; /* Card background */
    --input-bg: #0d0d1a; /* Input field background */
    --border-subtle: #3a4a60; /* Subtle borders */
    --border-active: #70b0c9; /* Active/hover borders */
    --shadow-dark: rgba(0, 0, 0, 0.4);
    --shadow-light: rgba(112, 176, 201, 0.3);
    --metallic-gradient: linear-gradient(135deg, #b0b0b0 0%, #e0e0e0 40%, #b0b0b0 100%);
    --header-height: 80px; /* approximate sticky header height for viewport calculations */
}

/* Ultra-small devices (e.g., 320–400px wide) */
@media (max-width: 400px) {
    .container { padding: 0 14px; }
    header .container { gap: 10px; }
    .logo span { font-size: 1.2rem; }
    nav ul li { margin-left: 14px; }
    .section { padding: 56px 16px; }
    .grid { gap: 24px; }
    .grid-item { padding: 24px; }
    .hero p { font-size: 0.98rem; }
    .hero { min-height: calc(100svh - 100px); }
}

/* Medium/large desktops: widen safe content width and slightly increase scale */
@media (min-width: 1440px) {
    .container { max-width: 1280px; }
    .hero-content { max-width: 1100px; }
}

/* Very large displays (e.g., 1920px+) */
@media (min-width: 1920px) {
    .container { max-width: 1400px; }
    .hero-content { max-width: 1200px; }
}

/* Light theme overrides */
[data-theme="light"] {
    /* Softer pastel palette for light theme */
    --primary-blue: #7dc5e3;   /* pastel sky blue */
    --secondary-blue: #7fa7d6; /* pastel steel blue */
    --glow-blue: #bfe8fb;      /* soft glow */
    --text-light: #1a1f26;     /* deep grey for readability */
    --text-muted: #5b6b78;     /* muted slate */
    --bg-dark: #f3f7fb;        /* page background in light (soft pastel) */
    --bg-header: #f6f9ff;      /* very light pastel blue */
    --card-bg: #f9fcff;        /* pale blue card surface */
    --input-bg: #f9fcff;       /* pale blue inputs */
    --border-subtle: #e6eef6;  /* lighter border */
    --border-active: #7dc5e3;  /* active border tracks primary */
    --shadow-dark: rgba(0, 0, 0, 0.06);
    --shadow-light: rgba(125, 197, 227, 0.18);
}

/* In light theme, keep hero paragraph text white for strong contrast over the video/background */
[data-theme="light"] .hero p {
    color: #f6fbff; /* soft near-white to avoid pure white */
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* In light theme, make the hero tagline white and bolder for emphasis */
[data-theme="light"] .tagline {
    color: #f6fbff; /* soft near-white */
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Light theme: adjust the rounded-fade image mask as requested */
[data-theme="light"] .rounded-fade-image img {
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 5%, rgba(0,0,0,0) 60%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 5%, rgba(0,0,0,0) 60%);
}

/* Light theme: alternate gentle pastel section backgrounds for visual variety */
[data-theme="light"] .section:nth-of-type(3n+1) { background-color: #f6f9ff; }  /* light pastel blue */
[data-theme="light"] .section:nth-of-type(3n+2) { background-color: #f0f7ff; }  /* lighter pastel blue */
[data-theme="light"] .section:nth-of-type(3n)   { background-color: #fff3e8; }  /* light pastel peach */

/* Light theme: soften cards and content blocks */
[data-theme="light"] .content-block {
    background-color: #f9fcff;
    border: 1px solid #eaf2f8;
    box-shadow: 0 6px 18px var(--shadow-dark);
}

/* Light theme: softer button hover glow */
[data-theme="light"] .btn:hover {
    background-color: var(--primary-blue);
    color: var(--bg-dark);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08), 0 0 12px var(--glow-blue);
}

/* (Removed unused .skip-link styles) */

/* Utility: visually hidden (accessible) */
.visually-hidden {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    overflow: hidden;
    white-space: nowrap;
}

/* --- Base Styles --- */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Make pages fit the viewport: flex layout to push footer to bottom on short pages */
html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100svh; }
main { flex: 1 0 auto; }

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-light);
    margin-top: 0;
}

/* Fluid typography for better scaling across devices */
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
    font-weight: 300;
    color: var(--text-muted);
}

/* --- Global Text Justification (exclude list items) --- */
p,
dd,
dt,
blockquote {
    text-align: justify;
    text-justify: inter-word; /* improves spacing in some browsers */
    hyphens: auto;            /* allow soft hyphenation for better justification */
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
    color: var(--glow-blue);
    text-shadow: 0 0 8px var(--glow-blue);
}

/* Improve focus visibility across interactive elements */
:focus-visible {
    outline: 2px solid var(--glow-blue);
    outline-offset: 2px;
}
button:focus-visible,
a.btn:focus-visible,
button.btn:focus-visible,
.nav-toggle:focus-visible,
.theme-toggle:focus-visible,
nav a:focus-visible,
.cookie-banner button:focus-visible {
    box-shadow: 0 0 0 3px rgba(79, 179, 255, 0.35);
}

/* --- Header --- */
header {
    background-color: var(--bg-header);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 5px 15px var(--shadow-dark);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
}

.logo-large {
    height: 20vh;
}

.rounded-fade-image {
    border-radius: 15px; /* Adjust as desired for more or less rounded corners */
    overflow: hidden; /* Important for rounding if using a pseudo-element for fade */
    position: relative; /* Needed for absolute positioning of pseudo-element */
    display: block; /* Ensures it behaves like a block element for width/height */
    height: auto; /* Maintain aspect ratio */
}

.rounded-fade-image .logo-large {
    max-width: 100%;
    width: auto; /* let height drive size to preserve aspect ratio */
    height: 20vh; /* maintain original behavior */
    box-shadow: 0 5px 20px var(--shadow-dark); /* Keep existing shadow for depth */
}

.rounded-fade-image img {
    height: auto;
    border-radius: 25px; /* Keep soft corners */
    /* Fade out on all sides using a radial gradient mask */
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
    transition: all 0.5s ease; /* Smooth transition for any changes */
}

.logo img {
    height: 40px;
    width: auto; /* ensure intrinsic aspect ratio is preserved */
    margin-right: 10px;
    filter: brightness(0) invert(1); /* visible on dark */
}
[data-theme="light"] .logo img {
    filter: none; /* natural logo on light */
}

.logo span {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

/* About section photo block: replace inline style */
.about-photo-block {
    margin-top: 16px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* allow wrapping on narrow screens */
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-light);
    font-weight: 400;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-transform: uppercase;
    font-size: 0.95rem;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-blue);
    text-shadow: 0 0 8px var(--glow-blue);
}

/* Theme toggle button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-light);
    border-radius: 6px;
    padding: 6px 10px;
    margin-left: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.theme-toggle:hover {
    border-color: var(--border-active);
    box-shadow: 0 0 10px var(--shadow-light);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #000000 100%);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px; /* height is driven by min-height/height below */
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--primary-blue);
    box-shadow: 0 5px 20px var(--shadow-dark);
    /* Always fit the viewport on load: prefer dvh, fall back to svh/vh */
    min-height: calc(100dvh - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
}

/* Background video layer behind the hero content */
.hero .video-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* below ::before overlay and content */
    overflow: hidden;
    pointer-events: none; /* ensure it doesn't block interactions */
}

.hero .video-bg video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: brightness(0.4) saturate(110%);
    animation: videoFadeIn 1200ms ease forwards 300ms;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hero .video-bg video {
        animation: none !important;
        opacity: 0.25; /* keep subtle background without motion */
    }
}

@keyframes videoFadeIn {
    from { opacity: 0; }
    to { opacity: 0.35; }
}

.hero::before { /* Background circuit pattern */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%23383838" stroke-width="0.5"/></pattern><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    opacity: 0.15;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-blue); /* darker blue */
    /* Dark outline using subtle stroke and shadow for cross-browser support */
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.5);
    text-shadow: 0 2px 3px rgba(0,0,0,0.45), 0 0 1px rgba(0,0,0,0.6);
}

.hero p {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 30px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-light); /* increase contrast for readability */
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Add spacing around the hero call-to-action button */
.hero .btn-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
}


/* --- Generic Section Styles --- */
.section {
 padding: 48px 20px; /* reduced from 64px to tighten vertical rhythm */
 text-align: center;
 position: relative;
 overflow: hidden;
 z-index: 5; /* Ensure sections stack correctly */
 /* Ensure anchored scrolling accounts for sticky header */
 scroll-margin-top: calc(var(--header-height) + 12px);
}

/* Utility: make a section fill the viewport (minus sticky header) and vertically center contents */
.section.fit-viewport {
  min-height: calc(100svh - var(--header-height));
  display: flex;
  align-items: center;
}
.section.fit-viewport > .container { width: 100%; }

.section h2 {
font-size: 2.5rem;
margin-bottom: 40px;
font-weight: 700;
color: var(--text-light);
text-shadow: 0 0 1px var(--shadow-light);
}

/* About section: left-align copy and add a little extra bottom padding to separate from Contact */
#about.section {
 text-align: left;
 /* Fill the viewport height (minus sticky header) so Contact isn't visible from About */
 min-height: calc(100svh - var(--header-height));
 display: flex;
 align-items: center;
 padding-bottom: 48px; /* reduced to match tighter spacing */
}

/* Contact section: ensure there is ample top padding so its heading isn't visible from the About page */
#contact.section {
 padding-top: 48px; /* reduced to match tighter spacing */
}

  /* --- Grid Layouts (Services, Team) --- */
  .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 40px;
      margin-top: 50px;
  }
 
 /* Force a 4x2 layout for the Services page on desktop */
 .services-grid {
     grid-template-columns: repeat(4, 1fr);
 }
 @media (max-width: 1024px) {
     .services-grid { grid-template-columns: repeat(2, 1fr); }
 }
 @media (max-width: 600px) {
     .services-grid { grid-template-columns: 1fr; }
 }

.grid-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px var(--shadow-dark);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--card-bg); /* Subtle border for glow effect */
    position: relative;
    overflow: hidden;
}

.grid-item::before { /* Metallic border effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--metallic-gradient) border-box;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.grid-item:hover::before {
    opacity: 0.3;
}

.grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px var(--shadow-dark), 0 0 20px var(--shadow-light);
    border-color: var(--primary-blue);
}

.grid-item i {
    font-size: 3.5rem;
    color: var(--primary-blue);
    margin-bottom: 25px;
    display: block;
    text-shadow: 0 0 1px var(--glow-blue);
}

.grid-item h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-blue);
    text-shadow: 0 0 1px var(--glow-blue);
}

.grid-item p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* --- Content Blocks (About Us) --- */
.content-block {
    max-width: 900px;
    margin: 0 auto 60px;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px var(--shadow-dark);
    text-align: left;
    border: 1px solid var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-dark), 0 0 20px var(--shadow-light);
}

.content-block h3 {
    margin-bottom: 20px;
}

.content-block p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.content-block ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.content-block ul li {
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-light);
}

  .content-block ul li i {
    color: var(--primary-blue);
    margin-right: 10px;
    font-size: 1.2rem;
    text-shadow: 0 0 1px var(--glow-blue);
  }

/* Utility: bulletless list layout outside of .content-block */
.list-plain {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.list-plain li { color: var(--text-light); }

/* (Removed unused Team Grid styles) */

  /* Profile photo in About section */
  .profile-photo {
    display: block;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px auto;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 0 15px var(--shadow-light);
  }

/* (Removed unused Team member and social links styles) */

/* (Removed unused Contact grid/info block styles) */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: calc(100% - 20px);
    padding: 15px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--glow-blue);
    box-shadow: 0 0 10px var(--glow-blue);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- Numbered List for Contact Page --- */
.numbered-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    counter-reset: numbered-list-counter;
}

.numbered-list li {
    position: relative;
    padding-left: 80px; /* Space for the large number */
    margin-bottom: 24px;
    text-align: left;
    min-height: 50px; /* Ensure space for the number */
    display: flex;
    align-items: center;
}

.numbered-list li::before {
    counter-increment: numbered-list-counter;
    content: counter(numbered-list-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem; /* Large number size */
    font-weight: 700;
    color: var(--primary-blue);
    opacity: 0.2;
    line-height: 1;
}

/* --- Social Share Buttons --- */
.social-share {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.social-share h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.social-share .share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-share .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s, border-color 0.3s;
}

.social-share .share-btn:hover {
    background-color: var(--card-bg);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.social-share .share-btn i {
    font-size: 1.2rem;
}

/* (Removed unused map container styles) */

/* --- Call to Action (CTA) Section --- */
.cta-section {
    background: linear-gradient(90deg, var(--bg-dark) 0%, #0d0d1a 100%);
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid var(--secondary-blue);
    border-bottom: 1px solid var(--secondary-blue);
    box-shadow: 0 -3px 10px var(--shadow-dark), 0 3px 10px var(--shadow-dark);
}

.cta-section h2 {
    margin-bottom: 20px;
    color: var(--text-light);
}

.cta-section p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-muted);
}

.btn {
    background-color: var(--primary-blue);
    color: var(--bg-dark); /* Text color needs to be dark on light blue button */
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.1rem);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-dark);
    border: none;
    cursor: pointer;
    display: inline-block; /* For proper button styling if used as <a> */
}

/* Space adjacent buttons nicely (used in About section CTAs) */
.text-content .btn + .btn {
    margin-left: 12px;
}

.btn:hover {
    background-color: var(--glow-blue);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-dark), 0 0 15px var(--glow-blue);
}

/* Sub-navigation (About page) */
.subnav { text-align: center; }
/* (Removed unused .subnav-list styles) */

/* Breadcrumb-style subnav */
.subnav-breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.subnav-breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.subnav-breadcrumb li::after {
    content: '›';
    color: var(--text-muted);
    opacity: 0.75;
}
.subnav-breadcrumb li:last-child::after { content: ''; }
.subnav-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
}
.subnav-breadcrumb a:hover,
.subnav-breadcrumb a:focus-visible {
    color: var(--primary-blue);
    text-decoration: underline;
}
.subnav-breadcrumb [aria-current="page"],
.subnav-breadcrumb [aria-current="true"] {
    color: var(--primary-blue);
    font-weight: 600;
}

/* --- Footer --- */
footer {
    background-color: var(--bg-header);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-subtle);
}

/* --- 404 / Not Found --- */
.not-found {
    /* Fill viewport minus sticky header and center content */
    min-height: calc(100svh - var(--header-height));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.25rem;
    padding: 2rem;
}
.not-found h1 {
    color: var(--primary-blue);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    margin: 0.25rem 0 0.5rem 0;
}
.not-found p {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
}
.not-found p small { color: var(--text-muted); }
.not-found .not-found-icon {
    font-size: 4rem;
    color: var(--primary-blue);
    text-shadow: 0 0 6px var(--shadow-light);
}

/* --- Thank You page --- */
.thanks {
    min-height: calc(100svh - var(--header-height));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem;
}
.thanks h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: var(--primary-blue);
}
.celebration-icon {
    width: 72px;
    height: 72px;
}

/* --- Utilities (replacing inline styles for CSP) --- */
.align-left { text-align: left !important; }
.text-center { text-align: center !important; }
.pb-120 { padding-bottom: 120px !important; }
.max-60ch { max-width: 60ch !important; margin-left: auto !important; margin-right: auto !important; }
.mb-24 { margin-bottom: 1.5rem !important; }
.mb-32 { margin-bottom: 2rem !important; }

/* Sticky footer utility (used on careers page) */
footer.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

footer .footer-links {
    margin-top: 20px;
}

footer .footer-links a {
    color: var(--primary-blue);
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

footer .footer-links a:hover {
    color: var(--glow-blue);
    text-shadow: 0 0 8px var(--glow-blue);
}

/* Footer social share (small icons) */
footer .footer-social {
    margin-top: 10px;
}
footer .footer-social a.footer-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-light);
    margin: 0 6px;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
footer .footer-social a.footer-share:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    box-shadow: 0 0 10px var(--shadow-light);
}
footer .footer-social a.footer-share i { font-size: 2rem; }

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 720px;
    margin: 0 auto;
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    box-shadow: 0 8px 24px var(--shadow-dark);
    padding: 12px 16px;
    display: none; /* shown via JS if needed */
    z-index: 1500;
}
.cookie-banner.show { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-banner p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }
.cookie-banner .cookie-actions { display: flex; gap: 8px; }
.cookie-banner button {
    border: 1px solid var(--border-subtle);
    background: var(--primary-blue);
    color: var(--bg-dark);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.cookie-banner button.secondary {
    background: transparent;
    color: var(--text-light);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    /* Header layout: keep in a row, show hamburger */
    .nav-toggle { display: inline-block; }
    header .container { gap: 10px; }
    /* Mobile dropdown behavior with animation */
    #primaryNav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-header);
        box-shadow: 0 8px 16px var(--shadow-dark);
        border-bottom: 1px solid var(--border-subtle);
        /* animated open/close */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: visibility 0ms linear 200ms, opacity 200ms ease, transform 200ms ease;
        pointer-events: none;
    }
    #primaryNav.open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0ms;
        pointer-events: auto;
    }
    #primaryNav ul { flex-direction: column; gap: 0; padding: 10px 16px; }
    #primaryNav ul li { margin: 6px 0; }
    #primaryNav ul li a { display: block; padding: 10px 6px; }
    /* Ensure header is positioned to anchor dropdown */
    header { position: sticky; }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero {
        min-height: calc(100vh - 100px); /* fallback */
        min-height: calc(100svh - 100px);
    }
    .hero p {
        font-size: 1rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .grid-item {
        padding: 30px;
    }
    .content-block, .team-grid {
        padding: 20px;
        margin-top: 30px;
        gap: 20px;
    }
    .team-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .contact-info-block, .contact-form-block {
        padding: 30px;
    }
    .contact-form input, .contact-form textarea {
        width: calc(100% - 20px);
    }
    .btn {
        align-self: stretch;
    }
    .map-container {
        margin-top: 40px;
    }
    .map-container iframe {
        height: 300px;
    }
}