/* ==========================================================================
   1. Design Tokens & Core Layout
   ========================================================================== */

:root {
    --review-font: "Montserrat", system-ui, -apple-system, sans-serif;
    --review-maxwidth: 1200px;
    --review-ink: #0f1115;
    --review-muted: #5b6270;
    --review-accent: #1a1a2e;
    --review-headerbackgroundcolor: #ffffff;
    --review-footerbackgroundcolor: #f9f9f9;
    --review-textblockbackgroundcolor: #f9f9f9;
    --review-affiliategroupbackgroundcolor: #f8fafc;
    --review-affiliatelinkcolor: #982d14;
    /* Custom Blue Styling Palette */
    --review-link-color: #0284c7;
    --review-link-hover: #0369a1;
    --review-focusring: #2563eb;
    --review-focusbg: rgba(37, 99, 235, 0.08);
    --review-card-border-width: 3px; /* hover/focus border thickness */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--review-font);
    color: var(--review-ink);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* Safety net: no image can ever be wider than its container */
img {
    max-width: 100%;
    height: auto;
}

/* Premium Colored Geometric Gradient Separators */
.header-separator,
.meta-separator,
.footer-separator {
    border: 0;
    max-width: var(--review-maxwidth);
    height: 2px;
    margin: clamp(16px, 3vw, 24px) auto;
    background-image: linear-gradient(to right, rgba(2, 132, 199, 0) 0%, rgba(2, 132, 199, 0.4) 20%, var(--review-link-color) 50%, rgba(2, 132, 199, 0.4) 80%, rgba(2, 132, 199, 0) 100%);
    opacity: 0.85;
}

.header-separator,
.meta-separator {
    margin-top: 0;
}

.footer-separator {
    margin-bottom: 0;
}

/* Links */
a {
    color: var(--review-link-color);
    text-decoration: underline;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    padding: 1px 4px;
    margin: -1px -4px;
}

    a:hover {
        color: var(--review-link-hover);
        background-color: rgba(3, 105, 161, 0.05);
    }

    a:focus-visible {
        outline: 2px solid var(--review-focusring);
        outline-offset: 1px;
        background-color: var(--review-focusbg);
    }

/* ==========================================================================
   2. Home Page: Sections & Card Grids
   ========================================================================== */

.home-section {
    padding: clamp(24px, 5vw, 48px) 0;
    border-bottom: 1px solid rgba(15, 17, 21, 0.05);
}

.home-section_title {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 700;
    margin: 0 0 clamp(16px, 3vw, 24px) 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: relative;
    text-align: center;
}

/* minmax(0, 1fr) lets columns shrink below the intrinsic width of their content */
.filtered-grid,
.featured-grid,
.latest-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(16px, 3vw, 32px);
}

    /* The <a> wrapping each card is the real grid item */
    .filtered-grid > a,
    .featured-grid > a,
    .latest-grid > a {
        margin: 0;
        padding: 0;
        color: inherit;
        text-decoration: none;
        border-radius: 12px;
    }

        .filtered-grid > a:hover,
        .featured-grid > a:hover,
        .latest-grid > a:hover {
            background-color: transparent;
        }

        .filtered-grid > a:focus-visible,
        .featured-grid > a:focus-visible,
        .latest-grid > a:focus-visible {
            outline: none;
            background-color: transparent;
        }


/* ==========================================================================
   3. Review Card Layout (Controlled by Top-Level Layout Utility Classes)
   ========================================================================== */

.review-card {
    display: grid;
    width: 100%;
    height: 100%;
    overflow: hidden; /* clips content to the rounded corners */
    border-radius: 12px;
    background-color: #fff;
    /* Same width at rest and on hover (transparent -> blue) so the layout never shifts */
    border: var(--review-card-border-width) solid rgba(15, 17, 21, 0.04);
    box-shadow: 0 1px 2px rgba(15, 17, 21, 0.04), 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Use Case 1: Vertical Layout (Image top [4 parts], Header bottom [1 part]) */
.review-card-vertical {
    grid-template-rows: 4fr 1fr;
    grid-template-columns: 1fr;
    max-height: min(100%, 800px);
}

    .review-card-vertical .review-card_image {
        grid-row: 1;
    }

    .review-card-vertical .review-card_header {
        grid-row: 2;
    }

        .review-card-vertical .review-card_header .review-card_title {
            text-align: center;
        }

        .review-card-vertical .review-card_header .review-card_subtitle {
            text-align: left;
        }

/* Use Case 2: Horizontal Layout (20% Image Left / 80% Header Right) */
.review-card-horizontal {
    grid-template-columns: 1fr 4fr;
    grid-template-rows: 1fr;
    max-width: min(100%, var(--review-maxwidth));
}

    .review-card-horizontal .review-card_image {
        grid-column: 1;
    }

    .review-card-horizontal .review-card_header {
        grid-column: 2;
        justify-items: center; /* Aligns grid internal components to center */
    }

        .review-card-horizontal .review-card_header .review-card_title {
            text-align: center;
        }

        .review-card-horizontal .review-card_header .review-card_subtitle {
            text-align: center;
        }

/* Hover / keyboard focus: soft lift + thin blue ring + gentle glow.
   Only on devices that really hover, so touch screens don't get a "stuck" state. */
@media (hover: hover) {
    .filtered-grid > a:hover .review-card,
    .featured-grid > a:hover .review-card,
    .latest-grid > a:hover .review-card {
        transform: translateY(-4px);
        border-color: var(--review-link-color);
        box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12), 0 12px 32px rgba(3, 105, 161, 0.18);
    }

    .filtered-grid > a:hover .review-card_image img,
    .featured-grid > a:hover .review-card_image img,
    .latest-grid > a:hover .review-card_image img {
        transform: scale(1.03);
    }
}

.filtered-grid > a:focus-visible .review-card,
.featured-grid > a:focus-visible .review-card,
.latest-grid > a:focus-visible .review-card {
    border-color: var(--review-focusring);
    box-shadow: 0 0 0 4px var(--review-focusbg), 0 12px 32px rgba(3, 105, 161, 0.18);
}

.review-card_header {
    display: grid; /* Enables local container item controls */
    padding: clamp(8px, 0.8vw, 14px);
    align-content: center;
    gap: 8px;
}

.review-card_title {
    margin-bottom: clamp(6px, 1vw, 12px);
    font-size: clamp(20px, 2.5vw, 26px);
    line-height: 1.25;
    font-weight: 700;
    text-wrap: auto;
    overflow-wrap: anywhere;
}

.review-card_subtitle {
    margin: 0;
    font-size: clamp(14px, 1.6vw, 16px);
    font-weight: 400;
}

/* Umbraco raw image wrapper: fills remaining card height, centres the image */
.review-card_image {
    overflow: hidden; /* clips the hover zoom to the image area */
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* Targets the CMS-generated <img> inside firstImageBlock.ImageHtml.
       Always fits the full width, keeps its ratio, never cropped. */
    .review-card_image img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        transition: transform 0.4s ease;
    }

/* ==========================================================================
   4. Site Header & Navigation
   ========================================================================== */

.site-header {
    max-width: var(--review-maxwidth);
    justify-self: center;
    background-color: #fff;
    position: relative;
    width: 100%;
}

.header-container {
    margin: 0 auto;
    padding: 16px max(16px, 2vw);
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
    text-align: center;
    background-color: var(--review-headerbackgroundcolor);
}

.site-logo {
    display: inline-block;
    max-width: 180px;
}

    .site-logo a {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        padding: 0;
        margin: 0;
    }

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

.site-nav {
    width: 100%;
    align-self: end;
}

    .site-nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        gap: clamp(12px, 2vw, 24px);
    }

    .site-nav a {
        font-size: clamp(20px, 1.5vw, 24px);
        color: var(--review-ink);
        text-decoration: none;
        font-weight: 700;
    }

        .site-nav a:hover {
            color: var(--review-link-color);
        }

.site-subheading p {
    font-size: clamp(15px, 1.8vw, 18px);
    color: var(--review-muted);
    margin: 0 auto;
    text-wrap: pretty;
    font-style: italic;
    line-height: 1.5;
}

/* ==========================================================================
   5. Review Page: Body, Header & Meta
   ========================================================================== */

.body {
    max-width: var(--review-maxwidth);
    margin: 0 auto;
}

.review {
    margin: 0 auto;
    padding: 0 max(16px, 2vw);
}

.review-header {
    padding: clamp(32px, 6vw, 48px) 0 clamp(24px, 4vw, 32px);
    text-align: center;
}

.review-header_title {
    font-size: clamp(30px, 5vw, 36px);
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 12px;
    text-wrap: auto;
}

.review-header_subtitle {
    font-size: clamp(16px, 2.5vw, 18px);
    color: var(--review-muted);
    margin: 0 auto 24px;
}

/* Horizontal Bullet List */
.horizontal-bullet-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 24px;
    padding: 0;
    margin: 0 0 24px 0;
    list-style: none;
}

    .horizontal-bullet-list li {
        font-size: clamp(14px, 1.8vw, 18px);
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--review-muted);
        display: inline-flex;
        align-items: center;
    }

        .horizontal-bullet-list li:not(:first-child)::before {
            content: "\2022";
            margin-right: 24px;
            color: var(--review-muted);
        }

/* Meta & Dates */
.review-header_meta {
    padding-top: 16px;
}

.review-header_author {
    font-weight: 700;
    font-size: clamp(16px, 2vw, 18px);
    margin: 0 0 8px 0;
}

.review-header_dates {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    font-size: clamp(14px, 1.8vw, 16px);
    color: var(--review-muted);
    margin: 0;
}

.review-header_disclaimer {
    display: inline-block;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    text-decoration: underline;
    font-size: clamp(14px, 1.8vw, 16px);
    color: var(--review-affiliatelinkcolor);
    margin-top: clamp(24px, 5vw, 40px);
}

    .review-header_disclaimer:focus-visible {
        outline-color: var(--review-affiliatelinkcolor);
        background-color: rgba(152, 45, 20, 0.08);
    }

/* ==========================================================================
   6. Review Page: Fluid Grid & Content Blocks
   ========================================================================== */

.review-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(16px, 3vw, 24px);
    padding: clamp(24px, 4vw, 32px) 0;
    border-bottom: 1px solid rgba(15, 17, 21, 0.05);
}

    .review-section hgroup {
        text-align: center;
    }

.review-section_title {
    font-size: clamp(26px, 4vw, 30px);
    font-weight: 700;
    margin: 0 0 16px;
}

.review-section > div {
    grid-column: 1 / -1;
    width: 100%;
}

.imageblock {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .review-section img,
    .imageblock img {
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 8px;
    }

.embedblock {
    display: flex;
    justify-content: center;
    align-items: center;
}

.textblock p {
    font-size: clamp(15px, 2.2vw, 16px);
    line-height: 1.7;
    margin: 0 0 16px;
    text-align: justify;
    overflow-wrap: break-word;
    text-wrap: pretty;
}

    .textblock p:last-child {
        margin-bottom: 0;
    }

.textblock h3 {
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 700;
    margin: 24px 0 12px;
}

/* ==========================================================================
   7. Affiliate Blocks
   ========================================================================== */

.review-section_affiliategroups {
    background-color: var(--review-affiliategroupbackgroundcolor);
    border-left: 4px solid var(--review-link-color);
    padding: clamp(16px, 3vw, 24px);
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    text-align: justify;
}

.review-section_affiliategroup-heading {
    font-size: clamp(14px, 1.8vw, 16px);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.5;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

    .review-section_affiliategroup-heading p {
        margin: 0 0 8px;
    }

        .review-section_affiliategroup-heading p:last-child {
            margin-bottom: 0;
        }

.review-section_affiliatelinks {
    margin: 0;
    padding-left: 20px;
    list-style-type: square;
}

    .review-section_affiliatelinks li {
        margin-bottom: 16px;
        color: #334155;
        font-size: clamp(14px, 2vw, 15px);
        line-height: 1.6;
    }

        .review-section_affiliatelinks li p {
            margin: 0;
        }

    .review-section_affiliatelinks a {
        color: var(--review-link-color);
        font-weight: 600;
    }

        .review-section_affiliatelinks a:focus-visible {
            outline: 2px solid var(--review-affiliatelinkcolor);
            background-color: rgba(152, 45, 20, 0.06);
        }

.review-section_affiliatelinks_disclaimer {
    font-size: clamp(11px, 1.5vw, 12px);
    color: var(--review-affiliatelinkcolor);
    font-style: italic;
    margin-left: 6px;
    display: inline-block;
}

/* ==========================================================================
   8. Footer & Newsletter
   ========================================================================== */

.home-footer {
    padding: clamp(32px, 6vw, 48px) 0;
    background-color: var(--review-footerbackgroundcolor);
    border-top: 1px solid rgba(15, 17, 21, 0.05);
}

.newsletter-box {
    max-width: 450px;
    margin: clamp(24px, 5vw, 48px) auto;
    padding: clamp(20px, 4vw, 32px);
    background-color: var(--review-textblockbackgroundcolor, #f9f9f9);
    border-radius: 8px;
    border: 1px solid rgba(15, 17, 21, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    font-family: var(--review-font, sans-serif);
    color: var(--review-ink, #0f1115);
    text-align: center;
}

    .newsletter-box h3 {
        font-size: clamp(20px, 3vw, 24px);
        font-weight: 700;
        margin: 0 0 8px 0;
        text-align: center;
    }

    .newsletter-box p {
        font-size: 15px;
        color: var(--review-muted, #5b6270);
        margin: 0 0 20px 0;
        text-align: center;
        line-height: 1.5;
    }

    .newsletter-box .status-message-ok {
        color: green;
    }

    .newsletter-box .status-message-error {
        color: red;
    }

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    .newsletter-form input {
        width: 100%;
        padding: 12px 16px;
        font-family: var(--review-font, sans-serif);
        font-size: 15px;
        color: var(--review-ink, #0f1115);
        background-color: #ffffff;
        border: 1px solid rgba(15, 17, 21, 0.15);
        border-radius: 6px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .newsletter-form input:focus {
            outline: none;
            border-color: var(--review-focusring, #2563eb);
            box-shadow: 0 0 0 3px var(--review-focusbg, rgba(37, 99, 235, 0.08));
        }

    .newsletter-form button {
        width: 100%;
        padding: 14px;
        font-family: var(--review-font, sans-serif);
        font-size: 15px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        white-space: nowrap;
        color: #ffffff;
        background-color: var(--review-accent, #1a1a2e);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: background-color 0.2s ease, transform 0.1s ease;
    }

        .newsletter-form button:hover {
            background-color: var(--review-ink, #0f1115);
        }

        .newsletter-form button:active {
            transform: scale(0.99);
        }

    .newsletter-form .gdpr-text {
        font-size: 13px;
        line-height: 1.4;
        color: var(--review-muted, #5b6270);
        margin: 0;
        text-align: left;
    }

.status-message {
    margin: 0;
    font-size: 14px;
    text-align: center;
}

.footer-copy {
    text-align: center;
    font-size: 13px;
    color: var(--review-muted);
    margin: 0;
}

/* ==========================================================================
   9. Desktop Viewports (768px and wider)
   ========================================================================== */

@media (min-width: 768px) {

    /* Two cards side by side */
    .featured-grid,
    .latest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Header: logo left, nav + subheading right */
    .header-container {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "logo nav"
            "logo subheading";
        justify-items: start;
        align-items: center;
        text-align: left;
        gap: 8px 32px;
    }

    .site-logo {
        grid-area: logo;
        max-width: 200px;
    }

    .site-nav {
        grid-area: nav;
        align-self: end;
    }

    .site-subheading {
        grid-area: subheading;
        align-self: center;
        justify-self: center;
    }

    /* Review page 12-column grid */
    .review-section {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 32px;
    }

        .review-section hgroup,
        .review-section aside {
            grid-column: 1 / -1;
        }

        .review-section > div {
            grid-column: span var(--columns, 12);
            grid-row: span var(--rows, 1);
        }
}

/* ==========================================================================
   10. Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .review-card,
    .review-card_image img {
        transition: none;
    }

    .featured-grid > a:hover .review-card,
    .latest-grid > a:hover .review-card,
    .featured-grid > a:hover .review-card_image img,
    .latest-grid > a:hover .review-card_image img {
        transform: none;
    }
}

/* Pagination controls styling */
.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.pagination-btn, .pagination-page {
    padding: 0.5rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background: var(--card-bg);
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

    .pagination-btn:not(.disabled):hover, a.pagination-page:hover {
        border-color: var(--accent-color);
        color: var(--accent-color);
        background: #f7fafc;
    }

    .pagination-btn.disabled {
        color: var(--text-muted);
        background: #edf2f7;
        cursor: not-allowed;
        opacity: 0.6;
    }

.pagination-pages {
    display: flex;
    gap: 0.5rem;
}

.pagination-page.active {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}



.searchForm {
    display: flex; /* Places items side-by-side */
    width: 100%; /* Forces the container to fill the entire row width */
}

    .searchForm input {
        flex: 1; /* Stretches the input to occupy all available space */
        box-sizing: border-box; /* Ensures padding/borders don't cause overflow */
    }

    .searchForm button {
        box-sizing: border-box;
        white-space: nowrap; /* Prevents button text from wrapping into two lines */
    }


/* Cookie Consent Banner Styling */
.cookie-consent-bar {
    background-color: #222222;
    color: #ffffff;
    padding: 15px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    z-index: 9999;
    font-family: sans-serif;
    font-size: 14px;
}

    .cookie-consent-bar span {
        margin-right: 15px;
    }

.cookie-btn {
    padding: 6px 12px;
    margin: 0 4px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.cookie-btn-accept {
    background-color: #4caf50;
    color: #ffffff;
}

    .cookie-btn-accept:hover {
        background-color: #45a049;
    }

.cookie-btn-decline {
    background-color: #f44336;
    color: #ffffff;
}

    .cookie-btn-decline:hover {
        background-color: #da190b;
    }
