/* ==========================================================================
   Secondary pages: Guides, Partner Directory, Insurance/Inspections, About
   Reuses --sd-navy etc. from model-review.css :root — load that first.
   ========================================================================== */

/* ---------- Shared hero pattern (guides/partners/lead-gen/about) ---------- */
.guides-hero, .partners-hero, .lead-gen-hero, .about-hero {
    background: var(--sd-navy);
    color: #fff;
    text-align: center;
    padding: 2.5rem 1rem;
    margin: 0 -1rem 2rem;
}

.guides-hero h1, .partners-hero h1, .lead-gen-hero h1, .about-hero h1 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.guides-index-intro, .partners-index-intro, .lead-gen-intro, .about-intro {
    color: #C7D2E0;
    font-size: 0.95rem;
    max-width: 32rem;
    margin: 0 auto;
}

.guides-index, .partners-index, .about-page {
    max-width: 960px;
    margin: 0 auto;
}

/* ---------- Guides grid ---------- */
.guides-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem 2rem;
}

.guide-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--sd-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(11, 37, 69, 0.08);
}

.guide-card-thumb {
    aspect-ratio: 16 / 9;
    background: var(--sd-bg);
    overflow: hidden;
}

.guide-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guide-card-body {
    padding: 0.9rem 1rem;
}

.guide-card-body h3 {
    font-size: 1rem;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
}

.guide-card-excerpt {
    font-size: 0.85rem;
    color: var(--sd-text-secondary);
    margin-bottom: 0.5rem;
}

.guide-card-date {
    font-size: 0.75rem;
    color: var(--sd-text-secondary);
}

.guides-pagination {
    padding: 0 1rem 2rem;
    text-align: center;
}

/* ---------- Single guide article ---------- */
.guide-article {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.guide-header h1 {
    color: var(--sd-navy);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.guide-meta {
    color: var(--sd-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.guide-hero-image img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.guide-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a1a;
}

.guide-content p {
    margin-bottom: 1.2rem;
}

.guide-embedded-models {
    margin: 2rem 0;
    padding: 1.25rem;
    background: var(--sd-bg);
    border-radius: 10px;
}

.guide-embedded-models h2 {
    font-size: 1rem;
    color: var(--sd-navy);
    margin-bottom: 1rem;
}

.embedded-model-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.embedded-model-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: 8px;
    overflow: hidden;
}

.embedded-model-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #F2F4F7;
    overflow: hidden;
}

.embedded-model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.embedded-model-body {
    padding: 0.75rem 0.9rem;
}

.embedded-model-body h4 {
    font-size: 0.9rem;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
}

.embedded-model-verdict {
    margin-bottom: 0.5rem;
}

.embedded-model-snapshot {
    font-size: 0.8rem;
    color: var(--sd-text-secondary);
}

/* ---------- Partner directory ---------- */
.partners-filters-card {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(11, 37, 69, 0.1);
    padding: 1.25rem;
    margin: -3rem 1rem 1.5rem;
    position: relative;
    z-index: 2;
}

.partners-filters-card .filters-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.partners-filters-card select {
    padding: 0.6rem;
    border: 1px solid var(--sd-border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--sd-text-secondary);
}

.partners-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem 2rem;
}

.partner-card {
    display: flex;
    gap: 1rem;
    border: 1px solid var(--sd-border);
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
}

.partner-card-logo {
    flex: 0 0 60px;
    height: 60px;
    background: var(--sd-bg);
    border-radius: 6px;
    overflow: hidden;
}

.partner-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.partner-card-body h3 {
    font-size: 1rem;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
}

.partner-category-tag {
    display: inline-block;
    background: rgba(200, 16, 46, 0.08);
    color: var(--sd-red);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}

.partner-cities {
    font-size: 0.8rem;
    color: var(--sd-text-secondary);
    margin-bottom: 0.4rem;
}

.partner-description {
    font-size: 0.85rem;
    color: var(--sd-text-secondary);
    margin-bottom: 0.6rem;
}

/* ---------- Lead-gen forms (Insurance / Inspections) ---------- */
.lead-gen-form-card {
    max-width: 480px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.lead-gen-form {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(11, 37, 69, 0.08);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lead-gen-prefill-note {
    background: var(--sd-bg);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--sd-navy);
}

.lead-gen-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sd-navy);
}

.lead-gen-form input[type="text"],
.lead-gen-form input[type="email"],
.lead-gen-form input[type="tel"],
.lead-gen-form textarea,
.lead-gen-form select {
    padding: 0.65rem;
    border: 1px solid var(--sd-border);
    border-radius: 6px;
    font-weight: 400;
    font-size: 0.9rem;
    font-family: var(--sd-font-body);
}

.lead-gen-form textarea {
    resize: vertical;
}

.lead-gen-form .field-hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--sd-text-secondary);
}

.lead-gen-form button {
    border: none;
    cursor: pointer;
}

/* ---------- Owner Reviews (archive, single, and the wider form card) ---------- */
.owner-review-submit-page .lead-gen-form-card,
.owner-review-form-section {
    max-width: 560px; /* slightly wider than the other lead-gen forms —
        this one has several longer textareas, a narrower column would
        make them cramped */
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.owner-reviews-archive {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.owner-reviews-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.owner-reviews-intro {
    color: var(--sd-text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

.owner-review-model-tag {
    display: inline-block;
    background: var(--sd-bg);
    color: var(--sd-red);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.owner-review-byline {
    font-size: 0.85rem;
    color: var(--sd-text-secondary);
    margin: 0 0 0.5rem;
}

/* Single Owner Review page */
.owner-review-single {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.owner-review-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.owner-review-gallery {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.owner-review-gallery-item {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--sd-bg);
    /* resets — these are <button> elements (for proper keyboard/screen
       reader accessibility as interactive controls), not <div>s, so
       browser default button chrome needs stripping to look like a
       plain image tile */
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
}

.owner-review-gallery-item:hover img {
    opacity: 0.85; /* subtle cue that the photo is clickable */
}

.owner-review-gallery-item img {
    width: 100%;
    transition: opacity 0.15s ease;
    height: 100%;
    object-fit: cover;
}

/* ---------- Lightbox (reusable — see lightbox.js) ---------- */
.sd-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sd-lightbox.sd-lightbox-open {
    opacity: 1;
    pointer-events: auto;
}

.sd-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.sd-lightbox-close,
.sd-lightbox-prev,
.sd-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.sd-lightbox-close {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
}

.sd-lightbox-prev,
.sd-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 28px;
}

.sd-lightbox-prev {
    left: 16px;
}

.sd-lightbox-next {
    right: 16px;
}

.sd-lightbox-close:hover,
.sd-lightbox-prev:hover,
.sd-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
    /* Smaller nav buttons on mobile, but never below the standard
       44px minimum comfortable tap-target size */
    .sd-lightbox-prev,
    .sd-lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .sd-lightbox-close {
        width: 44px;
        height: 44px;
    }
}

@media (min-width: 500px) {
    .owner-review-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.owner-review-content {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.owner-review-pros-cons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    background: var(--sd-bg);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.owner-review-pros h3,
.owner-review-cons h3 {
    font-size: 0.95rem;
    margin: 0 0 0.4rem;
}

.owner-review-pros h3 {
    color: var(--sd-green, #1E8E3E);
}

.owner-review-cons h3 {
    color: var(--sd-red);
}

@media (min-width: 640px) {
    .owner-review-pros-cons {
        grid-template-columns: 1fr 1fr;
    }
}

.owner-review-disclosure {
    font-size: 0.75rem;
    color: var(--sd-text-secondary);
    text-align: center;
    border-top: 1px solid var(--sd-border);
    padding-top: 1rem;
}

/* ---------- About page ---------- */
/* ---------- Fallback (index.php) — search results, 404, misc archives ---------- */
.fallback-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1rem 3rem;
}

.fallback-title {
    color: var(--sd-navy);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.fallback-intro {
    color: var(--sd-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.fallback-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--sd-border);
}

.fallback-item h2 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.fallback-item h2 a {
    color: var(--sd-navy);
    text-decoration: none;
}

.fallback-excerpt {
    font-size: 0.9rem;
    color: var(--sd-text-secondary);
}

.fallback-pagination {
    margin-top: 1.5rem;
    text-align: center;
}

.about-section {
    padding: 0 1rem 2rem;
    max-width: 720px;
    margin: 0 auto;
}

.about-section h2 {
    color: var(--sd-navy);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.about-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1a1a1a;
}

.placeholder-note {
    color: var(--sd-text-secondary);
    font-style: italic;
}

/* ==========================================================================
   Tablet and up
   ========================================================================== */
@media (min-width: 640px) {
    .guides-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .partners-filters-card .filters-row {
        grid-template-columns: 1fr 1fr auto;
        align-items: center;
    }

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

@media (min-width: 1024px) {
    .guides-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Single Partner page additions ----------
   Sits on top of the shared .about-page/.about-hero/.about-section
   styles, plus .partner-category-tag/.partner-cities already defined
   above for the archive card — only the genuinely new pieces (hero
   logo, booking CTA spacing, back link) need their own rules. */
.partner-hero-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.partner-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.partner-booking-cta {
    text-align: center;
}

.partner-back-link {
    text-align: center;
    margin-top: 2rem;
}

.partner-back-link a {
    color: var(--sd-navy);
    font-weight: 600;
    text-decoration: none;
}

.partner-back-link a:hover {
    text-decoration: underline;
}

/* ---------- Team grid (About page) ---------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

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

.team-card-photo {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--sd-bg);
    margin: 0 auto 0.75rem;
    max-width: 140px;
}

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

.team-card h3 {
    font-size: 1rem;
    margin: 0 0 0.15rem;
}

.team-card-role {
    font-size: 0.8rem;
    color: var(--sd-red);
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.team-card-bio {
    font-size: 0.85rem;
    color: var(--sd-text-secondary);
    margin: 0;
}

@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Search results & 404 page ---------- */
.search-results-page,
.not-found-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.search-results-header,
.not-found-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-results-header h1,
.not-found-header h1 {
    margin-bottom: 0.5rem;
}

.search-results-meta {
    color: var(--sd-text-secondary);
    margin-bottom: 1.25rem;
}

.search-results-form,
.not-found-search-form {
    display: flex;
    max-width: 420px;
    margin: 0 auto;
    gap: 0.5rem;
}

.search-results-form input,
.not-found-search-form input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--sd-border);
    border-radius: 6px;
    font-family: var(--sd-font-body);
}

.search-results-form button,
.not-found-search-form button {
    background: var(--sd-navy);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.search-results-grid,
.not-found-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.search-result-card {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--sd-border);
    border-radius: 8px;
    overflow: hidden;
    padding: 0.75rem;
}

.search-result-thumb {
    flex: 0 0 100px;
    aspect-ratio: 4/3;
    background: var(--sd-bg);
    border-radius: 6px;
    overflow: hidden;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sd-red);
}

.search-result-body h3 {
    margin: 0.2rem 0 0.3rem;
    font-size: 1.05rem;
}

.search-result-excerpt {
    font-size: 0.85rem;
    color: var(--sd-text-secondary);
    margin: 0;
}

.search-no-results {
    text-align: center;
    color: var(--sd-text-secondary);
}

.not-found-actions {
    margin-top: 2.5rem;
    text-align: center;
}

.not-found-actions .cta-button {
    display: inline-block;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .search-results-grid,
    .not-found-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}