/*
Theme Name: Guida Telecamere Review
Theme URI: https://wordpress.org/
Author: Codex
Description: A product review theme for camera, webcam, dashcam and security camera guides. Built to display structured review posts from AI Auto Article Publisher.
Version: 1.1.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: review-lab-ai
*/

:root {
    --rl-bg: #f5f7f8;
    --rl-surface: #ffffff;
    --rl-surface-soft: #eef3f5;
    --rl-text: #172026;
    --rl-muted: #64717a;
    --rl-border: #d9e1e5;
    --rl-accent: #0d7c86;
    --rl-accent-strong: #095b63;
    --rl-green: #16825d;
    --rl-red: #b43b47;
    --rl-amber: #b27616;
    --rl-violet: #6652a3;
    --rl-shadow: 0 16px 40px rgba(23, 32, 38, 0.08);
    --rl-radius: 8px;
    --rl-content: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--rl-bg);
    color: var(--rl-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.72;
    letter-spacing: 0;
}

a {
    color: var(--rl-accent-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--rl-border);
    backdrop-filter: blur(10px);
}

.site-header__inner,
.site-footer__inner,
.site-main,
.archive-head,
.review-hero,
.review-body {
    width: min(var(--rl-content), calc(100% - 32px));
    margin-inline: auto;
}

.site-header__inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-navigation {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 30;
    width: min(720px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 108px));
    overflow-y: auto;
    padding: 20px;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    box-shadow: var(--rl-shadow);
}

.site-menu {
    position: relative;
}

.site-menu:not([open]) .site-navigation {
    display: none;
}

.site-menu__trigger {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    color: var(--rl-text);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
}

.site-menu__trigger::-webkit-details-marker {
    display: none;
}

.site-menu__icon,
.site-menu__icon::before,
.site-menu__icon::after {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    content: '';
}

.site-menu__icon {
    position: relative;
}

.site-menu__icon::before,
.site-menu__icon::after {
    position: absolute;
    left: 0;
}

.site-menu__icon::before {
    top: -5px;
}

.site-menu__icon::after {
    top: 5px;
}

.site-menu[open] .site-menu__trigger {
    color: #fff;
    background: var(--rl-text);
    border-color: var(--rl-text);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.site-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: var(--rl-radius);
    background: var(--rl-text);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.site-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.site-title a {
    color: var(--rl-text);
    text-decoration: none;
}

.site-description {
    margin: 2px 0 0;
    color: var(--rl-muted);
    font-size: 13px;
    line-height: 1.3;
}

.primary-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-menu a {
    display: inline-block;
    color: var(--rl-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.primary-menu a:hover {
    color: var(--rl-accent-strong);
}

.primary-menu .sub-menu {
    display: grid;
    gap: 5px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.primary-menu .sub-menu a {
    color: var(--rl-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.38;
}

.site-main {
    padding: 34px 0 56px;
}

.front-main {
    width: min(var(--rl-content), calc(100% - 32px));
    margin-inline: auto;
    padding: 28px 0 58px;
}

.front-lead {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
    gap: 28px;
    align-items: stretch;
    border-bottom: 1px solid var(--rl-border);
    padding: 8px 0 30px;
}

.front-lead__media {
    display: block;
    min-height: 360px;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    background: var(--rl-surface-soft);
    overflow: hidden;
}

.front-lead__media img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.front-lead__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    padding: 28px;
    background: var(--rl-surface);
}

.front-lead__title {
    margin: 0;
    font-size: 42px;
    line-height: 1.12;
}

.front-lead__title a {
    color: var(--rl-text);
    text-decoration: none;
}

.front-lead__title a:hover {
    color: var(--rl-accent-strong);
}

.front-lead__excerpt {
    margin: 16px 0 0;
    color: var(--rl-muted);
    font-size: 18px;
}

.front-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 24px;
    align-items: center;
    border-bottom: 1px solid var(--rl-border);
    padding: 26px 0;
}

.front-tools h2,
.section-head h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.22;
}

.front-section {
    padding-top: 28px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.front-empty {
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    padding: 42px 30px;
    background: var(--rl-surface);
}

.front-empty h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.14;
}

.front-empty p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--rl-muted);
    font-size: 18px;
}

.archive-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    padding: 34px 0 6px;
}

.archive-kicker,
.entry-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    color: var(--rl-muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.archive-title {
    margin: 0;
    font-size: 34px;
    line-height: 1.16;
}

.archive-description {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--rl-muted);
}

.search-form {
    display: flex;
    width: min(360px, 100%);
    min-height: 42px;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    background: #fff;
    overflow: hidden;
}

.search-form label {
    flex: 1;
}

.search-field {
    width: 100%;
    height: 100%;
    min-height: 42px;
    border: 0;
    padding: 0 12px;
    color: var(--rl-text);
    font: inherit;
    outline: 0;
}

.search-submit {
    min-width: 78px;
    border: 0;
    border-left: 1px solid var(--rl-border);
    background: var(--rl-text);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.review-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    background: var(--rl-surface);
    box-shadow: var(--rl-shadow);
    overflow: hidden;
}

.review-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--rl-surface-soft);
    overflow: hidden;
}

.review-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.review-card__title {
    margin: 0;
    font-size: 19px;
    line-height: 1.32;
}

.review-card__title a {
    color: var(--rl-text);
    text-decoration: none;
}

.review-card__title a:hover {
    color: var(--rl-accent-strong);
}

.review-card__excerpt {
    margin: 0;
    color: var(--rl-muted);
    font-size: 14px;
    line-height: 1.65;
}

.review-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-top: auto;
    color: var(--rl-muted);
    font-size: 13px;
}

.score-badge {
    display: inline-grid;
    min-width: 54px;
    min-height: 36px;
    place-items: center;
    border-radius: var(--rl-radius);
    background: var(--rl-accent);
    color: #fff;
    font-weight: 900;
    line-height: 1;
}

.score-badge--large {
    min-width: 96px;
    min-height: 78px;
    font-size: 28px;
}

.score-badge--high {
    background: var(--rl-green);
}

.score-badge--mid {
    background: var(--rl-amber);
}

.score-badge--low {
    background: var(--rl-red);
}

.category-pill {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border: 1px solid var(--rl-border);
    border-radius: 999px;
    padding: 0 10px;
    background: #fff;
    color: var(--rl-muted);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.review-cover-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 230px;
    grid-template-rows: 1fr auto;
    padding: 18px;
    background:
        linear-gradient(90deg, rgba(13, 124, 134, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(23, 32, 38, 0.1) 1px, transparent 1px),
        #edf3f5;
    background-size: 22px 22px;
}

.review-cover-fallback__label {
    align-self: start;
    color: var(--rl-accent-strong);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.review-cover-fallback__title {
    align-self: end;
    max-width: 90%;
    margin: 0;
    color: var(--rl-text);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.18;
}

.review-hero-wrap {
    border-bottom: 1px solid var(--rl-border);
    background: var(--rl-surface);
}

.review-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 32px;
    align-items: center;
    padding: 36px 0;
}

.review-hero__media {
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    background: var(--rl-surface-soft);
    overflow: hidden;
}

.review-hero__media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.review-hero__content {
    min-width: 0;
}

.entry-title {
    margin: 0;
    font-size: 42px;
    line-height: 1.12;
}

.entry-summary {
    margin: 16px 0 0;
    color: var(--rl-muted);
    font-size: 18px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 16px;
    color: var(--rl-muted);
    font-size: 14px;
}

.hero-score {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 22px;
}

.hero-score__text {
    color: var(--rl-muted);
    font-size: 14px;
}

.hero-score__text strong {
    display: block;
    color: var(--rl-text);
    font-size: 16px;
}

.review-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    padding: 34px 0 64px;
}

.review-content,
.review-side-panel,
.post-navigation,
.comments-area {
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    background: var(--rl-surface);
}

.review-content {
    padding: 30px;
}

.review-content h2,
.review-content h3 {
    margin: 1.35em 0 0.45em;
    line-height: 1.25;
}

.review-content h2 {
    font-size: 28px;
}

.review-content h3 {
    font-size: 21px;
}

.review-content p {
    margin: 0 0 1em;
}

.review-content blockquote {
    margin: 24px 0;
    border-left: 4px solid var(--rl-accent);
    padding: 6px 0 6px 18px;
    color: var(--rl-muted);
}

.review-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.review-content th,
.review-content td {
    border: 1px solid var(--rl-border);
    padding: 10px 12px;
    text-align: left;
}

.review-content th {
    background: var(--rl-surface-soft);
}

.review-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-side-panel {
    padding: 18px;
}

.review-side-panel h2,
.review-side-panel h3 {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.3;
}

.verdict {
    border-left: 4px solid var(--rl-violet);
    padding-left: 14px;
    color: var(--rl-muted);
}

.pros-cons {
    display: grid;
    gap: 14px;
}

.pros-cons ul,
.spec-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pros-cons li,
.spec-list li {
    display: flex;
    gap: 9px;
    border-top: 1px solid var(--rl-border);
    padding: 10px 0 0;
    color: var(--rl-muted);
    font-size: 14px;
}

.pros-cons li:first-child,
.spec-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.pros-cons__mark {
    display: inline-grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.pros-cons__mark--pro {
    background: var(--rl-green);
}

.pros-cons__mark--con {
    background: var(--rl-red);
}

.spec-list strong {
    flex: 0 0 88px;
    color: var(--rl-text);
}

.post-navigation {
    margin-top: 18px;
    padding: 16px 20px;
}

.nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nav-previous,
.nav-next {
    min-width: 0;
}

.nav-next {
    text-align: right;
}

.page-numbers {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    background: #fff;
    color: var(--rl-text);
    font-weight: 800;
    text-decoration: none;
}

.page-numbers.current {
    background: var(--rl-text);
    color: #fff;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 28px;
}

.site-footer {
    border-top: 1px solid var(--rl-border);
    background: var(--rl-text);
    color: rgba(255, 255, 255, 0.76);
}

.site-footer__inner {
    display: flex;
    min-height: 96px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0;
    font-size: 14px;
}

.site-footer a {
    color: #fff;
}

.empty-state {
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    padding: 26px;
    background: var(--rl-surface);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 960px) {
    .post-grid,
    .front-lead,
    .front-tools,
    .review-hero,
    .review-body,
    .archive-head {
        grid-template-columns: 1fr;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
    }

    .site-navigation {
        width: min(640px, calc(100vw - 32px));
    }

    .review-side {
        order: -1;
    }

    .search-form {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .site-header__inner {
        min-height: 68px;
    }

    .site-description {
        display: none;
    }

    .site-navigation {
        width: calc(100vw - 24px);
        right: -4px;
        padding: 18px;
    }

    .primary-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .site-header__inner,
    .site-footer__inner,
    .front-main,
    .site-main,
    .archive-head,
    .review-hero,
    .review-body {
        width: min(100% - 22px, var(--rl-content));
    }

    .site-title {
        font-size: 17px;
    }

    .archive-title,
    .entry-title,
    .front-lead__title {
        font-size: 30px;
    }

    .front-lead__content {
        padding: 20px;
    }

    .front-lead__media,
    .front-lead__media img {
        min-height: 240px;
    }

    .front-tools h2,
    .section-head h2 {
        font-size: 22px;
    }

    .review-hero {
        padding: 22px 0;
    }

    .review-content {
        padding: 20px;
    }

    .review-content h2 {
        font-size: 23px;
    }

    .nav-links {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
    }
}
