:root {
    --primary: #005a9c;
    --primary-dark: #004474;
    --accent: #00a3d9;
    --bg: #f5f7fa;
    --text: #222;
    --card-bg: #ffffff;
    --border: #dde2ea;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ───── Theme variants (override the CSS variables) ───── */

/* Default / Classic (matches your current palette) */
body.theme-classic {
    --primary: #005a9c;
    --primary-dark: #004474;
    --accent: #00a3d9;
    --bg: #f5f7fa;
    --text: #222;
    --card-bg: #ffffff;
    --border: #dde2ea;
}

/* Midnight – darker cards + brighter accents */
body.theme-midnight {
    --primary: #38bdf8;
    --primary-dark: #0ea5e9;
    --accent: #22c55e;
    --bg: #020617;
    --text: #e5e7eb;
    --card-bg: #020617;
    --border: #111827;
}

/* Workshop – warmer, industrial “shop floor” feel */
body.theme-workshop {
    --primary: #b45309;
    --primary-dark: #92400e;
    --accent: #f97316;
    --bg: #fffbeb;
    --text: #1f2933;
    --card-bg: #ffffff;
    --border: #fed7aa;
}

/* High-contrast accessibility mode */
body.theme-highcontrast {
    --primary: #000000;
    --primary-dark: #000000;
    --accent: #ffbf00;
    --bg: #ffffff;
    --text: #000000;
    --card-bg: #ffffff;
    --border: #000000;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;

    /* Modern equivalent of the old clip technique */
    clip-path: inset(50%);
}
/* Theme switcher bar under the logo */
.theme-switcher {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.theme-switcher-label {
    color: #374151;  /* darker than #6b7280 */
    font-weight: 500;
}

.theme-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.theme-pill {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    padding: 3px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    background: #f9fafb;
    color: #374151;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.theme-pill:hover {
    background: #e5f0ff;
    border-color: var(--primary);
}

.theme-pill.theme-active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.5rem 0.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 0.85rem;
    z-index: 10000;
}

.skip-link:focus {
    left: 0.75rem;
    top: 0.75rem;
}
/* ───────── Header: logo on left, seasonal image on right ───────── */

.top-header {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: none;
}

.header-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex: 0 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Old block color logo (kept in case you want it somewhere else) */
.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary);
}

/* Actual logo image */
.brand-logo-img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #e4f4ff;
    color: var(--primary-dark);
    border: 1px solid #c4e3ff;
}

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #2ecc71;
}

/* If you ever re-add the beta chip */
.chip-below {
    margin-left: 0;
    align-self: flex-start;
}

/* Right side: seasonal artwork fills remaining width, same height as left */
.header-right {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
}

/* Seasonal banner container with frame & shadow like other cards */
.seasonal-banner {
    width: 100%;
    height: 100%;
    max-height: 180px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Seasonal image fills container and is cropped nicely */
.seasonal-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile: stack logo and banner vertically */
@media (max-width: 900px) {
    .top-header {
        flex-direction: column;
    }

    .header-right {
        width: 100%;
    }

    .seasonal-banner {
        max-height: 200px;
    }

    .chip-below {
        margin-left: 0;
    }
}

/* ───────── Section divider for consistent spacing ───────── */

.section-divider {
    border: 0;
    border-bottom: 2px solid #e5e7eb;
    margin: 6px 0;
}

/* ───────── Navigation ───────── */

.main-nav {
    margin-bottom: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(15,23,42,0.06);
    padding: 6px 10px;
}

.main-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.main-nav-list > li {
    position: relative;
}

.main-nav a {
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--text);
}

.main-nav a:hover {
    background: var(--primary);
    color: #fff;
}

/* Dropdowns */
.has-submenu .submenu {
    display: none;
    position: absolute;
    top: 100%;              /* sit directly under the parent item */
    left: 0;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 6px 0;
    margin-top: 4px;        /* tiny visual gap that still keeps hover intact */
    box-shadow: 0 4px 12px rgba(15,23,42,0.12);
    z-index: 1000;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    display: block;
}

.submenu {
    list-style: none;        /* remove bullets */
    margin: 0;
    padding: 6px 0;
}

.submenu li {
    margin: 0;
    padding: 6px 14px;
}

.submenu li a {
    display: block;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.submenu li a:hover {
    background: var(--primary);
    color: #fff;
}

/* Search box in nav */
.main-nav-search input[type="text"] {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
}

/* Mobile: stack nav items */
@media (max-width: 900px) {
    .main-nav-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .has-submenu .submenu {
        position: static;
        box-shadow: none;
        border-radius: 0;
    }

    .has-submenu:hover .submenu {
        display: none; /* later you can add tap-to-toggle JS if you want */
    }
}

/* ───────── Main layout & cards ───────── */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
    gap: 1.0rem;
    align-items: stretch;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .seasonal-banner {
        max-height: 200px;
    }
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    padding: 18px 18px 10px;
    display: flex;
    flex-direction: column;
}

.card h1 {
    margin: 0 0 8px;
    font-size: 1.6rem;
}

.card h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.card p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    line-height: 1.45;
}

.tagline {
    color: #4b5563;
    margin-bottom: 6px;
}

.highlight {
    font-weight: 600;
    color: var(--primary-dark);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 4px;
    padding: 0;
    list-style: none;
}

.pill-list li {
    font-size: 0.8rem;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
}

/* Warning box on Safety Yellow background */
.warning {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 10px 12px;
    margin-top: 8px;
    border-radius: 8px;
    background: #FCE100;
    border: 1px solid #C9A400;
    color: #000000;
}

.warning-icon {
    font-weight: bold;
    margin-top: 1px;
    flex-shrink: 0;
    color: #7C2D12;
}

.warning-body {
    flex: 1;
}

.warning a {
    color: #003399;
    text-decoration: underline;
    font-weight: 500;
}

.warning a:hover,
.warning a:focus {
    color: #00A3D9;
}

.warning--soft {
    background: #FFF9C4;
    border-color: #FACC15;
}

.small-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 14px 0 4px;
}

ul {
    margin: 0 0 8px 18px;
    padding: 0;
    font-size: 0.9rem;
}

li {
    margin-bottom: 4px;
}

.btn-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    font-size: 0.85rem;
    background: #fff;
    text-decoration: none;
    color: #374151;
}

/* Chat container (used on Chillerbot page, harmless elsewhere) */
.chat-container {
    flex: 1;
    min-height: 300px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    position: relative;
}

.chat-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 540px;
    font-size: 0.9rem;
    color: #9ca3af;
    text-align: center;
    padding: 12px;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ───────── About page layout with penguin ───────── */

.about-flex {
    display: flex;
    align-items: center;      /* vertically center text vs penguin */
    gap: 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.05rem;
}

.about-text h2 {
    margin: 0 0 0.5rem;
}

.about-text p {
    margin: 0 0 0.85rem;    /* bottom margin only */
    line-height: 1.55;
}

.about-text p:last-child {
    margin-bottom: 0;       /* tighter end to the block */
}
.penguin-side {
    width: 140px;
    height: auto;
    flex-shrink: 0;           /* don’t let it squish */
    display: block;
    border-radius: 4px;
}

.about-flex .penguin-side {
    width: 140px;
    height: auto;
    flex-shrink: 0;            /* prevent squishing */
    border-radius: 4px;
}

.about-first {
    margin: 0;
    line-height: 1.55;
}

/* Soft highlight at bottom to emphasize the input area */
.chat-container::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 110px;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.35),
        rgba(255, 255, 255, 0.18),
        transparent
    );
    pointer-events: none;
}

/* ───────── Footer card / contact block ───────── */

/* Penguin positioning for About page */
/* Penguin on About page */
.about-intro {
    font-size: 0.95rem;          /* matches other paragraphs */
    line-height: 1.45;
}

.penguin-img {
    float: right;
    margin: 0 0 0.75rem 1rem;    /* space to the left & below */
    max-width: 130px;
    height: auto;
    display: block;
}
footer {
    margin-top: 24px;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}

/* text line above the card */
.footer-meta {
    margin-bottom: 8px;
}

/* Contact / footer card
   Used for the creditcontact include and any .footer-card wrapper */
.creditcontact,
.footer-card {
    max-width: 1200px;
    margin: 1rem auto 1.75rem;      /* slightly tighter above/below */
    padding: 1rem 1.25rem;          /* less padding inside the card */
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10); /* slightly softer shadow */
    text-align: left;
    font-size: 0.8rem;
    color: #4b5563;
}

/* Legacy table layout inside creditcontact.html (still supported) */
.footer-card table {
    width: 100%;
    border-collapse: collapse;
}

.footer-card td {
    padding: 2px 4px;
    vertical-align: top;
}

/* Normalize paragraphs and links inside the footer include */
.footer-card p {
    margin: 0px 0;
}

.footer-card a {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-card a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Flex layout for the two-column footer content */
.footer_box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 6px 0;
    align-items: flex-start;
}

.footer_box_item {
    flex: 1 1 260px;
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 0.8rem;
    color: #4b5563;
    text-align: left;
}

/* Right-hand column: align text to the right on desktop */
.footer_box_item.footer-right {
    text-align: right;
}

.no-wrap {
    white-space: nowrap;
    margin: 2px 0;
}

/* Small heading style to match rest of site */
.footer-heading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0 0 4px;
}

/* Validation / W3C badges row */
.footer-badges {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

/* CSS/HTML badges rendered as colored "chips" */
.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
    letter-spacing: 0.04em;
}

.footer-badge-html {
    background: #e44d26;
    color: #ffffff;
}

.footer-badge-css {
    background: #1572b6;
    color: #ffffff;
}

.footer-badge:hover {
    filter: brightness(1.1);
}

.footer-badge-label {
    text-transform: uppercase;
}

/* Image badges (if any) */
.footer-badges img {
    border: 0;
    max-height: 31px;
}

/* Let lines wrap and simplify layout on small screens */
@media (max-width: 640px) {
    .footer_box {
        gap: 8px 16px;
    }

    .footer_box_item,
    .footer_box_item.footer-right {
        text-align: left;
    }

    .no-wrap {
        white-space: normal;
    }

    .footer-badges {
        justify-content: flex-start;
    }
}

/* ───────── Trustpilot card ───────── */

/* Reserve space for Trustpilot to reduce CLS */
.trustpilot-card {
    min-height: 190px;  /* 150px widget + padding */
}

/* Extra safety: make sure the widget itself has a minimum height */
.trustpilot-card > .trustpilot-widget {
    min-height: 150px;
}
.trustpilot-intro {
    margin-top: 0;
    font-size: 0.85rem;
    color: #4b5563;
    margin: 0 0 0.2rem;
    padding: 0 0px;
}

.trustpilot-wrapper {
    max-width: 1100px;
    margin: 0.0rem auto 0.8rem;
    padding: 0;
}

.trustpilot-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    padding: 1.0rem 1.5rem 0.5rem;     /* Added padding to match site style */
    width: 100%;                 /* Force full width inside wrapper */
    box-sizing: border-box;      /* Ensure padding doesn't shrink width */
}

.trustpilot-card > .trustpilot-widget {
    margin-top:0.25rem;

    border-radius: 12px;
    overflow: hidden;
}

/* Old lower-divider (kept in case you re-use) */
.lower-divider {
    margin-top: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

/* Mobile tweaks for chat height (used on Chillerbot page) */
@media (max-width: 768px) {
    .chat-container {
        height: 85vh;
        min-height: 450px;
    }
}
