/* ======================================================================
   Megolabs — design system (v2)
   Bolder pass: the deep navy / teal / gold used in the footer now carries
   through the header, hero, testimonials and every icon/badge on the
   site, rounded-pill chips and soft shadows replace the razor-sharp,
   flat Laterite-style cards, and a small gold accent bar marks every
   section heading as a Megolabs signature.
   ====================================================================== */

:root {
    /* The four colors below are sampled directly from the Megolabs logo —
       every other color in this file is a tint/shade mixed from these. */
    --ink: #162d50;    /* logo navy */
    --teal: #216778;   /* logo teal */
    --gold: #aa8800;   /* logo gold */
    --pure-white: #ffffff;

    --ink-soft: #425b78;     /* navy, lightened — secondary dark text */
    --ink-deep: #0e1e38;     /* navy, darkened — footer, so it reads as its own band even after a navy section */
    --text-light: #7f8c9f;   /* navy, lightened further — muted body copy */
    --teal-pale: #cfe6e6;    /* teal, lightened — badges, rings, chips */
    --teal-mist: #f5f9f9;    /* teal, lightened near-white — section backgrounds */
    --off-white: #f5f9f9;    /* alias of teal-mist, kept for readability below */
    --border-light: #e1ebec; /* teal, lightened — hairline borders */

    --text-dark: #162d50;
    --shadow-dark: rgba(22, 45, 80, 0.08);
    --shadow-teal: rgba(33, 103, 120, 0.12);
    --section-padding: 100px 0;
    --transition: all 0.25s ease;
    --radius: 3px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    line-height: 1.65;
    color: var(--text-dark);
    background: var(--pure-white);
    overflow-x: hidden;
    scroll-behavior: smooth;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Sticky footer: on short pages (like Technology), the footer still sits
   flush with the bottom of the viewport instead of leaving a white gap
   below it. */
main {
    flex: 1 0 auto;
}

/* Explanatory/body text (paragraphs, subtitles, descriptions) uses the
   admin-chosen body font — headings keep the brand font (Poppins). */
p {
    font-family: var(--font-body, Verdana, Geneva, sans-serif);
    font-weight: 400;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

a {
    color: inherit;
}

/* Small uppercase "eyebrow" label above section headings */
.eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-family: Verdana, Geneva, sans-serif;
    font-weight: 400;
    color: var(--teal);
    margin-bottom: 0.85rem;
}

/* ======================================================================
   Header / Navigation — solid navy, like the footer
   ====================================================================== */

header {
    background: linear-gradient(180deg, var(--pure-white) 0%, var(--teal-mist) 100%);
    border-bottom: 3px solid var(--gold);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-scrolled {
    box-shadow: 0 2px 16px rgba(22, 45, 80, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    height: 80px;
}

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

.logo:hover {
    opacity: 0.85;
}

.logo-img {
    height: 54px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 10px 14px;
    display: inline-block;
}

.nav-links a:hover {
    color: var(--teal);
}

.nav-links a[aria-current="page"] {
    font-weight: 700;
    color: var(--gold);
}

.nav-links a[aria-current="page"]::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 5px;
    height: 2px;
    background: var(--gold);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ink);
    cursor: pointer;
    z-index: 1001;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    font: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 10px 14px;
}

.dropdown-toggle:hover {
    color: var(--teal);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--pure-white);
    min-width: 190px;
    box-shadow: 0 10px 24px rgba(22, 45, 80, 0.12);
    border-radius: var(--radius);
    padding: 0.4rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
}

.dropdown:hover .dropdown-menu,
.dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.65rem 1.25rem;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--teal-mist);
}

/* Mobile menu panel */
.mobile-menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(300px, 80vw);
    background: var(--pure-white);
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 1rem 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(22, 45, 80, 0.15);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ink);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    display: block;
}

.mobile-nav-links a[aria-current="page"] {
    font-weight: 700;
    color: var(--teal);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 45, 80, 0.4);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ======================================================================
   Buttons
   ====================================================================== */

.btn {
    padding: 13px 26px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--ink);
    color: var(--pure-white);
    border-color: var(--ink);
}

.btn-primary:hover {
    background: var(--ink-soft);
    border-color: var(--ink-soft);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 2px solid var(--ink);
}

.btn-secondary:hover {
    background: var(--ink);
    color: var(--pure-white);
}

/* ======================================================================
   Hero (full-bleed photo with a navy overlay card, like the footer)
   ====================================================================== */

.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    padding: 160px 0 90px;
    background: linear-gradient(rgba(22, 45, 80, 0.25), rgba(22, 45, 80, 0.25)),
        url('https://images.unsplash.com/photo-1516026672322-bc52d61a55d5?auto=format&fit=crop&w=1920&q=80') center / cover no-repeat;
    color: var(--pure-white);
}

.hero-grid {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-overlay-card {
    background: var(--ink);
    max-width: 720px;
    padding: 2.75rem 2.75rem 3rem;
}

.hero-overlay-card .eyebrow {
    color: var(--gold);
}

.hero-content h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--pure-white);
}

.hero-content .subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 1.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 1.5rem;
}

.stat-item {
    min-width: 90px;
}

.stat-number {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--gold);
    display: block;
}

.stat-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-overlay-card .btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
}

.hero-overlay-card .btn-primary:hover {
    background: var(--pure-white);
    border-color: var(--pure-white);
}

.hero-overlay-card .btn-secondary {
    color: var(--pure-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-overlay-card .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--pure-white);
}

/* ======================================================================
   Section header — left-aligned, with a small gold accent bar
   ====================================================================== */

.section-header {
    text-align: left;
    margin-bottom: 3.5rem;
    max-width: 720px;
}

.section-title {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light);
}

/* A plain alternate-background section wrapper for one-off homepage blocks */
.alt-section {
    padding: var(--section-padding);
    background: var(--off-white);
}

/* ======================================================================
   "Why Megolabs" differentiators + featured testimonial pull-quote
   ====================================================================== */

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem 2.5rem;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.why-item {
    border-top: 3px solid var(--gold);
    padding-top: 1.25rem;
}

.why-item .why-icon {
    color: var(--teal);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    display: block;
}

.why-item h3 {
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.why-item p {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.6;
}

.home-quote {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid var(--border-light);
}

.home-quote blockquote {
    font-size: clamp(1.15rem, 2.8vw, 1.5rem);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.5;
    margin: 0;
}

.home-quote blockquote::before {
    content: '\201C';
    display: block;
    font-size: 3.5rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.home-quote cite {
    display: block;
    margin-top: 1.5rem;
    font-style: normal;
    font-size: 0.95rem;
    color: var(--text-light);
}

.home-quote cite strong {
    color: var(--ink);
}

/* ======================================================================
   Capability cards (Data / Research / Analytics) — the whole card is a
   link, not just a button inside it.
   ====================================================================== */

.capability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.capability-card {
    display: block;
    background: var(--pure-white);
    padding: 2.25rem 1.75rem;
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.capability-card:hover {
    border-color: var(--ink);
}

.capability-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.capability-card h3 {
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.capability-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.capability-card-link {
    color: var(--teal);
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.capability-card:hover .capability-card-link {
    color: var(--ink);
    gap: 0.6rem;
}

/* ======================================================================
   About
   ====================================================================== */

.about {
    padding: var(--section-padding);
    background: var(--pure-white);
}

.about-content {
    max-width: 760px;
}

.about-content + .about-content {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-light);
}

.about-icons {
    display: flex;
    gap: 1rem;
    margin: 0 0 1.75rem;
}

.about-icons i {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--teal);
}

.about-content h2 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.about-content p {
    font-size: clamp(1rem, 2vw, 1.05rem);
    color: var(--text-light);
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

/* ======================================================================
   Partners / Collaborators logo grid (About page)
   ====================================================================== */

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem 3rem;
    margin-top: 3rem;
}

.partner-logo {
    display: block;
    height: 56px;
}

.partner-logo img {
    height: 100%;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ======================================================================
   Resources (About page) — downloadable documents + picture gallery
   ====================================================================== */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--pure-white);
    border: 1px solid var(--border-light);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.resource-card:hover {
    border-color: var(--ink);
}

.resource-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--ink);
    color: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.resource-info h4 {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.resource-info p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0;
}

.resource-meta {
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.picture-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.picture-gallery-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--ink);
}

.picture-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.picture-gallery-item:hover img {
    transform: scale(1.05);
}

/* ======================================================================
   Technology
   ====================================================================== */

.technology {
    padding: var(--section-padding);
    background: var(--off-white);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.tech-category {
    background: var(--pure-white);
    color: var(--ink);
    padding: 2.25rem;
    border: 1px solid var(--border-light);
}

.tech-category h3 {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    margin-bottom: 1.5rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.tech-category h3 i {
    color: var(--teal);
}

.tech-tools {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.tool-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--teal-mist);
    color: var(--ink);
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 500;
}

.tool-item i {
    font-size: 0.7em;
    opacity: 0.6;
}

.tool-item:hover {
    background: var(--ink);
    color: var(--pure-white);
}

/* ======================================================================
   Projects (full-bleed photo tiles)
   ====================================================================== */

.projects {
    padding: var(--section-padding);
    background: var(--pure-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 3rem;
}

.project-card {
    display: block;
    background: var(--pure-white);
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-photo {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: var(--ink);
}

.project-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-photo img {
    transform: scale(1.05);
}

.project-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22, 45, 80, 0) 45%, rgba(22, 45, 80, 0.78) 100%);
}

.project-photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem;
}

.project-photo-caption h3 {
    color: var(--pure-white);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.project-status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gold);
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
}

.project-details {
    padding: 1.5rem;
}

.project-details p {
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tag {
    background: var(--teal);
    color: var(--pure-white);
    padding: 0.3rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.project-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--teal);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.project-card:hover .project-read-more {
    color: var(--gold);
}

.project-read-more i {
    transition: transform 0.2s ease;
}

.project-card:hover .project-read-more i {
    transform: translateX(3px);
}

/* ======================================================================
   Testimonials — navy section, white cards (bold, footer-style contrast)
   ====================================================================== */

.testimonials {
    padding: var(--section-padding);
    background: var(--ink);
}

.testimonials .eyebrow {
    color: var(--gold);
}

.testimonials .section-title {
    color: var(--pure-white);
}

.testimonials .section-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.testimonials-container {
    max-width: 1100px;
}

.testimonial-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 1rem 0 1.5rem;
    scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    min-width: 400px;
    scroll-snap-align: start;
    background: var(--pure-white);
    padding: 2.25rem;
    border: 1px solid var(--border-light);
}

.testimonial-content {
    color: var(--ink-soft);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 32px;
    font-size: clamp(0.95rem, 2vw, 1.02rem);
}

.testimonial-content::before {
    content: '\201C';
    font-size: 3rem;
    color: var(--gold);
    opacity: 0.6;
    position: absolute;
    top: -14px;
    left: -8px;
    line-height: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.author-info h4 {
    color: var(--ink);
    margin-bottom: 0.15rem;
    font-size: 1rem;
}

.author-info p {
    color: var(--text-light);
    font-size: 0.88rem;
}

/* ======================================================================
   Services
   ====================================================================== */

.services {
    padding: var(--section-padding);
    background: var(--pure-white);
}

.services-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.services-intro {
    position: sticky;
    top: 120px;
}

.services-intro h3 {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    color: var(--ink);
    margin-bottom: 1rem;
    font-weight: 700;
}

.services-intro p {
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: 2rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.services-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem 2rem;
}

.service-item {
    border-top: 3px solid var(--gold);
    padding-top: 1.25rem;
}

.service-item h4 {
    color: var(--ink);
    font-size: clamp(1rem, 2vw, 1.15rem);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.service-item p {
    color: var(--text-light);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.service-icon {
    color: var(--teal);
    font-size: 1.1rem;
}

/* ======================================================================
   Team
   ====================================================================== */

.team {
    padding: var(--section-padding);
    background: var(--off-white);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

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

.member-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 4px solid var(--gold);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h3 {
    color: var(--ink);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.member-position {
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.member-bio {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pure-white);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--pure-white);
}

/* ======================================================================
   Community Engagement
   ====================================================================== */

.community {
    padding: var(--section-padding);
    background: var(--teal-mist);
}

.get-involved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.get-involved-card {
    background: var(--pure-white);
    padding: 2.25rem 1.75rem;
    text-align: left;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.get-involved-card:hover {
    border-color: var(--ink);
}

.get-involved-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: var(--ink);
    color: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.get-involved-card h3 {
    color: var(--ink);
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.get-involved-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.community-posts-header {
    margin-bottom: 2rem;
}

.community-posts-header h3 {
    color: var(--ink);
    font-size: 1.5rem;
    font-weight: 700;
}

.community-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-bottom: 3.5rem;
}

.community-post-card {
    background: var(--pure-white);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.community-post-card:hover {
    border-color: var(--ink);
}

.community-post-image {
    height: 180px;
    overflow: hidden;
    background: var(--ink);
}

.community-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-post-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.community-post-category {
    display: inline-block;
    align-self: flex-start;
    background: var(--teal);
    color: var(--pure-white);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    margin-bottom: 0.9rem;
}

.community-post-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.community-post-body h4 {
    color: var(--ink);
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.community-post-body p {
    color: var(--text-light);
    line-height: 1.6;
    flex-grow: 1;
}

.community-post-link {
    margin-top: 1rem;
    color: var(--teal);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.community-post-link:hover {
    color: var(--ink);
}

.community-newsletter {
    background: var(--ink);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--pure-white);
}

.community-newsletter h3 {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    color: var(--pure-white);
    font-weight: 700;
}

.community-newsletter p {
    color: rgba(255, 255, 255, 0.75);
    max-width: 520px;
    margin: 0 auto 1.75rem;
}

.newsletter-form {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--border-light);
    background: var(--pure-white);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    border-radius: var(--radius);
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--text-light);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--gold);
}

.newsletter-form button {
    flex: 0 0 auto;
    white-space: nowrap;
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
}

.newsletter-form button:hover {
    background: var(--pure-white);
    border-color: var(--pure-white);
}

.community-newsletter-alt-link {
    margin-top: 1.25rem;
    margin-bottom: 0;
}

.community-newsletter-alt-link a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
}

.community-newsletter-alt-link a:hover {
    color: var(--gold);
}

@media (max-width: 480px) {
    .newsletter-form {
        flex-wrap: wrap;
    }
}

/* ======================================================================
   Blog
   ====================================================================== */

.blog {
    padding: var(--section-padding);
    background: var(--pure-white);
}

.blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.blog-filter-pill {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border: 1.5px solid var(--border-light);
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.blog-filter-pill:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.blog-filter-pill.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--pure-white);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.blog-card {
    background: var(--pure-white);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.blog-card:hover {
    border-color: var(--ink);
}

.blog-card-image {
    position: relative;
    display: block;
    height: 190px;
    overflow: hidden;
    background: var(--ink);
    text-decoration: none;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, var(--ink), var(--teal));
}

.blog-card-category {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    background: var(--gold);
    color: var(--ink);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
}

.blog-card-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.blog-card-body h3 a {
    color: var(--ink);
    text-decoration: none;
}

.blog-card-body h3 a:hover {
    color: var(--teal);
}

.blog-card-body p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-read-more {
    color: var(--teal);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-read-more:hover {
    color: var(--ink);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 3rem;
}

.pagination-status {
    color: var(--text-light);
    font-size: 0.9rem;
}

.blog-article {
    padding: 150px 0 100px;
}

.blog-article-cover {
    height: 420px;
    overflow: hidden;
    background: var(--ink);
    margin-bottom: 3rem;
}

.blog-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-article-header {
    max-width: 760px;
    margin: 0 auto 2.5rem;
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.blog-back-link:hover {
    color: var(--ink);
}

.blog-article-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.blog-article-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--ink-soft);
}

.blog-article-content p {
    margin-bottom: 1.5rem;
}

.blog-related {
    max-width: 1100px;
    margin: 4rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid var(--border-light);
}

.blog-related h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1.75rem;
}

/* ======================================================================
   Capability page content blocks (admin-built: text, images, tables,
   quotes, stats — added in any order under Capability Pages in the admin)
   ====================================================================== */

.capability-blocks {
    padding: var(--section-padding);
    background: var(--pure-white);
}

.capability-blocks .container {
    max-width: 900px;
}

.block {
    margin-bottom: 3rem;
}

.block:last-child {
    margin-bottom: 0;
}

.block-heading {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--ink);
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.block-text p {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--ink-soft);
    margin-bottom: 1.25rem;
}

.block-image img {
    width: 100%;
    height: auto;
    display: block;
}

.block-image-caption {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: var(--text-light);
    text-align: center;
}

.block-table-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1rem;
}

.block-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-light);
}

.block-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.block-table th {
    background: var(--ink);
    color: var(--pure-white);
    text-align: left;
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

.block-table td {
    padding: 0.85rem 1.1rem;
    color: var(--ink-soft);
    border-top: 1px solid var(--border-light);
}

.block-table tr:nth-child(even) td {
    background: var(--off-white);
}

.block-quote {
    background: var(--teal-mist);
    border-left: 4px solid var(--gold);
    padding: 2rem 2.25rem;
}

.block-quote blockquote {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.5;
    margin: 0;
}

.block-quote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-size: 0.9rem;
    color: var(--text-light);
}

.block-stat {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    background: var(--ink);
    padding: 2rem 2.25rem;
}

.block-stat .stat-number {
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: var(--gold);
}

.block-stat .stat-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
}

.block-link {
    display: flex;
    justify-content: flex-start;
}

.block-file .resource-card {
    max-width: 420px;
}

.block-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--ink);
    overflow: hidden;
}

.block-video-wrap iframe,
.block-video-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.block-video-caption {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: var(--text-light);
    text-align: center;
}

.project-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ======================================================================
   Contact
   ====================================================================== */

.contact {
    padding: var(--section-padding);
    background: var(--off-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    margin-bottom: 2rem;
    color: var(--ink);
    font-weight: 700;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--pure-white);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.contact-method:hover {
    border-color: var(--ink);
}

.contact-icon {
    width: 46px;
    height: 46px;
    background: var(--ink);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--pure-white);
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 0.25rem;
    color: var(--ink);
    font-weight: 600;
}

.contact-details p {
    color: var(--text-light);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.contact-form {
    background: var(--pure-white);
    padding: 2.5rem;
    border: 1px solid var(--border-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--ink);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    background: var(--off-white);
    color: var(--ink);
    font-family: inherit;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    transition: var(--transition);
    border-radius: var(--radius);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ink);
    background: var(--pure-white);
}

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

.submit-btn {
    width: 100%;
    background: var(--ink);
    color: var(--pure-white);
    padding: 14px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius);
}

.submit-btn:hover {
    background: var(--ink-soft);
}

/* ======================================================================
   Footer
   ====================================================================== */

footer {
    background: var(--ink-deep);
    color: var(--pure-white);
    flex-shrink: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding: 3.5rem 0;
}

.footer-column h3 {
    color: var(--gold);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pure-white);
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-registration {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: -1rem;
}

.footer-links {
    display: inline-grid;
    grid-template-columns: repeat(3, max-content);
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    column-gap: 1.5rem;
    row-gap: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
}

.footer-contact p i {
    color: var(--teal-pale);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pure-white);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--teal);
}

/* Inside the (dark) footer itself, use a translucent circle instead of a
   solid ink one so it reads against the ink background. */
footer .footer-social a {
    background: rgba(255, 255, 255, 0.1);
}

footer .footer-social a:hover {
    background: var(--gold);
    color: var(--ink);
}

.footer-bottom {
    text-align: left;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(0.8rem, 2vw, 0.85rem);
}

/* ======================================================================
   Scroll-to-top button
   ====================================================================== */

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--gold);
    color: var(--ink);
}

/* ======================================================================
   Django messages
   ====================================================================== */

.site-messages {
    position: fixed;
    top: 95px;
    right: 20px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 90vw;
}

.site-message {
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--pure-white);
    background: var(--ink);
    border-radius: var(--radius);
}

.site-message.error {
    background: var(--gold);
    color: var(--ink);
}

/* ======================================================================
   Responsive
   ====================================================================== */

@media (max-width: 1024px) {
    .services-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .services-list {
        grid-template-columns: 1fr;
    }

    .services-intro {
        position: static;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-overlay-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .tech-tools {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        min-height: 560px;
        padding: 140px 0 70px;
    }

    .hero-overlay-card {
        padding: 2rem;
    }

    .blog-article-cover {
        height: 260px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        gap: 1.25rem;
    }

    .stat-item {
        min-width: 80px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .tech-tools {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }
}
