body {
    font-family: 'Source Sans Pro', Arial, sans-serif;
}

header {
    color: rgb(0, 0, 0);
    padding: 1%;
    text-align: center;
}

.search-container {
    margin-top: 15px;
    margin-bottom: 10px;
}

.search-container button {
    margin-left: 10px;
    padding: 7px 12px;
    font-size: 14px;
    border-radius: 25px;
    border: 0.5px solid #777777;
    background: #fff;
    color: #000;
    cursor: pointer;
    display: inline-block;
    transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.search-container button:hover {
    background: #000;
    color: #fff;
}

.search-container button:active {
    transform: translateY(1px);
}

.search-container button:focus-visible {
    outline: 0.5px solid rgba(0,0,0,0.12);
}

@media (max-width: 520px) {
    .search-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .search-container button {
        width: 160px;
        margin-left: 0;
    }
}

.site-divider  {
    border: none;
    height: 1px;
    background-color: #777777;
    margin: 12px 0;
    width: 80vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Ad container styles */
.ad-container {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    width: 100%;
}

.ad-placeholder {
    width: 728px;
    max-width: 95%;
    height: 90px;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    background: #fafafa;
}

/* Ad carousel */
.ad-carousel { display:flex; align-items:center; justify-content:center; padding:10px 0; position: relative; }
.ad-viewport { width:728px; max-width:95%; overflow:hidden; position:relative; /* keep natural aspect-ratio for banners */
    aspect-ratio: 728 / 90; }
.ad-viewport .ad-strip { display:flex; width:100%; height:100%; transition: transform 500ms cubic-bezier(.22,.9,.32,1); }
.ad-viewport .ad-item { min-width:100%; height:100%; flex:0 0 100%; display:flex; align-items:center; justify-content:center; }
.ad-viewport { touch-action: pan-y; }
.ad-controls { display:flex; gap:8px; margin-left:12px; }
.ad-controls button { padding:8px 10px; border-radius:8px; border:1px solid rgba(0,0,0,0.08); background:#fff; cursor:pointer; }

/* Pagination dots */
.ad-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    z-index: 30;
}

/* Use a larger clickable button but render a smaller visible dot via ::before so touch targets remain friendly */
.ad-dots button {
    width: 32px; /* hit area */
    height: 32px; /* hit area */
    border-radius: 50%;
    border: none;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ad-dots button:focus { outline: none; }
.ad-dots button::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgb(0, 0, 0);
    display: block;
    transition: transform 260ms cubic-bezier(.2,.9,.3,1), background-color 200ms ease, box-shadow 220ms ease, opacity 200ms ease;
}
.ad-dots button.active::before {
    outline: solid 1px rgb(0, 0, 0);
    background: rgba(255, 255, 255, 0);
    transform: scale(1.35);
    box-shadow: 0 6px 14px rgba(0,0,0,0.16);
    animation: dot-pop 300ms cubic-bezier(.2,.9,.3,1);
}

@keyframes dot-pop {
    0% { transform: scale(0.9); opacity: 0.6; }
    60% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1.35); opacity: 1; }
}
.ad-controls { display:none; }

@media (max-width:600px) {
    .ad-viewport { height:60px; }
    .ad-viewport img, .ad-viewport svg { object-fit:cover; height:60px; width:100%; }
    .ad-dots button { width:12px; height:12px; }
}

.ad-viewport img, .ad-viewport svg { width:100%; height:100%; display:block; }

/* Make images fill viewport while preserving aspect ratio and remaining crisp */
.ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fills area while preserving aspect, crops if needed */
    object-position: center center;
    display: block;
}

/* Consent banner */
.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    top: 0; /* slide down from top */
    transform: translateY(-120%);
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid #e6e6e6;
    padding: 12px 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    transition: transform 360ms cubic-bezier(.22,.9,.32,1), opacity 240ms ease;
}

.consent-inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* visible state */
.consent-banner.show {
    transform: translateY(0%);
    opacity: 1;
    z-index: 1200;
}

.consent-text { font-size: 14px; color: #111; }

.btn-secondary {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.btn-link {
    background: transparent;
    border: none;
    color: #555;
    padding: 8px 12px;
    cursor: pointer;
}

/* Consent banner button colors (user requested):
   - Accept all: green
   - Essential only: blue
   - Decline: dark red
   Use ID-specific selectors so these styles override any global button rules. */
/* Use WCAG-friendly shades and ensure white text contrast on each button. */
.consent-banner #acceptAll,
.consent-banner .btn-primary {
    background: #00a808; /* tweaked green (WCAG-friendly) */
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,122,61,0.14);
    font-weight: 600;
    min-width: 96px;
}
.consent-banner #acceptAll:hover { filter: brightness(0.95); transform: translateY(-1px); }
.consent-banner #acceptAll:active { transform: translateY(1px); }

.consent-banner #acceptEssential,
.consent-banner .btn-secondary {
    border-color: #000000;
    background: #ffffff; 
    color: #000000;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,86,179,0.10);
    font-weight: 600;
    min-width: 96px;
}
.consent-banner #acceptEssential:hover { filter: brightness(0.95); transform: translateY(-1px); }
.consent-banner #acceptEssential:active { transform: translateY(1px); }

.consent-banner #declineCookies,
.consent-banner .btn-link {
    border-color: #000000;
    background: #ffffff; 
    color: #000000;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(165,15,15,0.12);
    font-weight: 600;
    min-width: 96px;
}
.consent-banner #declineCookies:hover { filter: brightness(0.95); transform: translateY(-1px); }
.consent-banner #declineCookies:active { transform: translateY(1px); }

/* Ensure focus outlines are visible and accessible for keyboard users */
.consent-banner .consent-actions button:focus-visible {
    outline: 3px solid #1e90ff; /* stronger, visible blue focus ring */
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(30,144,255,0.12);
}

/* small toast used when user makes a choice */
.cookie-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 240ms ease, transform 240ms ease;
    z-index: 1400;
}
.cookie-toast.show { opacity: 1; transform: translateY(0); }

.consent-actions {
    display: flex;
    gap: 16px; /* comfortable spacing between options */
    align-items: center;
    flex-wrap: wrap; /* allow wrapping on small screens while keeping items inline when space allows */
    justify-content: flex-end; /* keep actions to the right side in wide layouts */
}
.consent-actions button {
    margin: 0; /* spacing provided by gap */
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent; /* individual button rules set backgrounds */
    cursor: pointer;
}

/* Floating action button for suggestions */
/* FAB when placed next to the search input (inline/absolute inside .search-container) */
.search-container { position: relative; display: inline-flex; align-items: center; gap: 8px; }
/* FAB and suggestion-modal CSS removed (feature not in use) */

@media (max-width: 640px) {
    .consent-inner { flex-direction: column; align-items: stretch; }
    .consent-actions { display: flex; justify-content: center; }
}

/* Footer and privacy embed */
.site-footer {
    border: none;
    height: 1px;
    background-color: #777777;
    margin: 12px 0;
    width: 80vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}
.footer-inner {
    font-size: 12px;
    max-width: 980px;
    padding: 6px 12px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
}

.privacy-blurb { color: #333; max-width: 600px; line-height:1.45; }
.footer-links { display:flex; gap:14px; align-items:center; }
.footer-links a { color: #007BFF; text-decoration: none; padding:6px 8px; border-radius:6px; }

@media (max-width: 720px) {
    .footer-inner { flex-direction: column; gap:12px; align-items: stretch; }
    .privacy-embed iframe { width: 100%; height: 220px; }
    .footer-links { justify-content: flex-start; }
}

#searchInput {
    width: 300px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #777777;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    border-color: #000000;
}

main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: flex-start;
    max-width: 800px;
    margin: 0 auto;
}

/* Page-specific overrides for privacy page to remove boxed styling */
.policy-page main {
    display: block;
    max-width: 900px;
    margin: 28px auto;
    padding: 20px;
}
.policy-page ul, .policy-page li {
    list-style: disc inside;
    padding: 0;
    margin: 0 0 12px 0;
    border: none;
    background: none;
}
.policy-page h1, .policy-page h2 {
    color: #000;
}
.policy-page p { color: #222; }

/* Contact page styles */
.contact-main { max-width: 800px; margin: 32px auto; padding: 20px; }

/* Contact card */
.contact-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 26px;
    box-shadow: 0 8px 24px rgba(10,10,10,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}
.contact-card h1 { margin: 0 0 8px 0; font-size: 1.6rem; }
.contact-card .muted { color: #555; margin-bottom: 18px; }

.contact-form .field-row { margin-bottom: 14px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; color: #111; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d6db;
    border-radius: 10px;
    margin: 0;
    box-sizing: border-box;
    background: #fbfcfd;
    transition: box-shadow 120ms ease, border-color 120ms ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #9aa4ad; }
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: #88a2ff;
    box-shadow: 0 6px 18px rgba(136,162,255,0.12);
}

.contact-form textarea { min-height: 260px; resize: vertical; }

.form-actions { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.btn-primary {
    background: linear-gradient(180deg,#111827 0%, #0b1220 100%);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(12,15,26,0.2);
    transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.btn-primary:hover { transform: translateY(-1px); opacity: 0.98; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 520px) {
    .contact-card { padding: 18px; }
    .contact-form textarea { min-height: 200px; }
}

ul {
    list-style: none;
    padding: 15px;
    margin: 0;
    flex: 0 0 calc(33.333% - 14px);
    min-height: 150px;
    border: 0.5px solid #777777;
    border-radius: 8px;
    background-color: #e9e9e960;
    box-sizing: border-box;
}

li {
    margin: 7px 0;
}

a {
    text-decoration: none;
    color: #007BFF;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltiptext {
    visibility: hidden;
    opacity: 0;
    width: 120px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px 0;
    transition: opacity 0.3s;
    position: absolute;
    z-index: 1;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
}

/* No-results message */
.no-results {
    display: none;
    text-align: center;
    padding: 18px;
    color: #333;
    background: #fff3f2;
    border: 1px solid #ffd6d1;
    max-width: 720px;
    margin: 12px auto;
    border-radius: 8px;
}
.no-results[aria-hidden="false"] { display: block; }

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

