/*
Theme Name: Affvidco Child
Theme URI: https://vidcogroup.com/
Description: Child theme for Affvidco Theme. Editorial Indigo & Gold palette on cool slate — visually distinct from the warm Teal+Coral parent.
Author: Vidco Team
Author URI: https://vidcogroup.com/
Template: affvidco
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: affiliatecms-child
*/

/* ==========================================================================
   Affvidco Child — Editorial Indigo Theme
   Override parent design tokens. Higher specificity not needed since the
   stylesheet is enqueued AFTER the parent (see functions.php).
   ========================================================================== */

:root {
    /* Primary — Royal Indigo (replaces parent Teal) */
    --color-primary: #4F46E5;
    --color-primary-hover: #4338CA;
    --color-primary-dark: #3730A3;
    --color-primary-light: #EEF2FF;
    --color-primary-rgb: 79, 70, 229;

    /* Accent — Amber Gold (replaces parent Coral) */
    --color-accent: #F59E0B;
    --color-accent-hover: #D97706;
    --color-accent-light: #FEF3C7;

    /* Neutrals — Cool slate (replaces warm beige) */
    --color-text: #0F172A;
    --color-text-secondary: #334155;
    --color-text-muted: #64748B;
    --color-text-subtle: #94A3B8;

    /* Surfaces — Cool off-white with subtle blue undertone */
    --color-bg: #F8FAFC;
    --color-bg-alt: #F1F5F9;
    --color-surface: #FFFFFF;
    --color-surface-raised: #FFFFFF;
    --color-surface-hover: #F1F5F9;

    /* Borders — Cool gray */
    --color-border: #E2E8F0;
    --color-border-subtle: #EDF2F7;
    --color-border-strong: #CBD5E1;

    /* Overlay */
    --color-overlay: rgba(15, 23, 42, 0.55);

    /* Colored Shadows — Indigo + Amber tint */
    --shadow-primary: 0 4px 14px rgba(79, 70, 229, 0.22);
    --shadow-accent: 0 4px 14px rgba(245, 158, 11, 0.22);

    /* Tighter, editorial radii (parent feels softer) */
    --radius-sm: 0.125rem;  /* 2px */
    --radius-md: 0.25rem;   /* 4px */
    --radius-lg: 0.375rem;  /* 6px */
    --radius-xl: 0.5rem;    /* 8px */
    --radius-2xl: 0.75rem;  /* 12px */
    --radius-3xl: 1rem;     /* 16px */

    /* Editorial type — serif headings for differentiation */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* Dark mode — Cool deep indigo night */
[data-theme="dark"] {
    --color-primary: #818CF8;
    --color-primary-hover: #A5B4FC;
    --color-primary-dark: #6366F1;
    --color-primary-light: rgba(129, 140, 248, 0.15);
    --color-primary-rgb: 129, 140, 248;

    --color-accent: #FCD34D;
    --color-accent-hover: #FBBF24;
    --color-accent-light: rgba(252, 211, 77, 0.15);

    --color-text: #F1F5F9;
    --color-text-secondary: #CBD5E1;
    --color-text-muted: #94A3B8;
    --color-text-subtle: #64748B;

    --color-bg: #0B1020;
    --color-bg-alt: #11172A;
    --color-surface: #161D33;
    --color-surface-raised: #1D2540;
    --color-surface-hover: #232C4A;

    --color-border: #2A3454;
    --color-border-subtle: #1E2742;
    --color-border-strong: #3A4670;

    --shadow-primary: 0 4px 14px rgba(129, 140, 248, 0.3);
    --shadow-accent: 0 4px 14px rgba(252, 211, 77, 0.28);
}

/* ==========================================================================
   Editorial Headings — Serif for h1-h3, sans for body
   Single load of Playfair Display from Google Fonts
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&display=swap');

h1, h2, h3,
.site-title,
.entry-title,
.page-title {
    font-family: var(--font-serif);
    letter-spacing: var(--tracking-tight);
}

/* Subtle gradient underline on primary buttons for an editorial accent */
.btn-primary,
.button-primary,
button.acms-btn-primary {
    background-image: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: 0;
}

.btn-primary:hover,
.button-primary:hover,
button.acms-btn-primary:hover {
    background-image: linear-gradient(135deg, var(--color-primary-hover) 0%, var(--color-primary-dark) 100%);
    transform: translateY(-1px);
}

/* Hairline divider style — editorial magazine feel */
hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(90deg, transparent, var(--color-border-strong) 50%, transparent);
}

/* ==========================================================================
   CleanTech Home additions (cth / bup)
   ========================================================================== */
:root {
    --cth-red: #DC2626;
    --cth-red-hover: #B91C1C;
    --cth-card-bg: #FFFFFF;
    --cth-card-border: #E2E8F0;
    --cth-soft: #F1F5F9;
    --cth-ink: #0F172A;
    --cth-muted: #64748B;
    --cth-pro: #15803D;
    --cth-con: #B91C1C;
}
[data-theme="dark"] {
    --cth-red: #EF4444;
    --cth-red-hover: #DC2626;
    --cth-card-bg: #161D33;
    --cth-card-border: #2A3454;
    --cth-soft: #11172A;
    --cth-ink: #F1F5F9;
    --cth-muted: #94A3B8;
    --cth-pro: #4ADE80;
    --cth-con: #F87171;
}
[data-theme="dark"] img.custom-logo { content: url("/wp-content/uploads/2026/10/logo-cleantech-home-dark.png"); }

/* Buttons & labels */
a.cth-btn, .cth-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.3rem; border-radius: 8px; font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none !important; transition: background .2s, color .2s, border-color .2s; }
a.cth-btn--red, .cth-btn--red { background: var(--cth-red) !important; color: #fff !important; border: 2px solid var(--cth-red); }
a.cth-btn--red:hover { background: var(--cth-red-hover) !important; border-color: var(--cth-red-hover); }
a.cth-btn--ghost { background: transparent; color: var(--cth-ink) !important; border: 2px solid var(--cth-card-border); }
a.cth-btn--ghost:hover { border-color: var(--cth-red); color: var(--cth-red) !important; }
.cth-label { display: inline-block; background: var(--cth-red); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; }
.cth-label--soft { background: rgba(79, 70, 229, .12); color: var(--color-primary); }

/* Hero */
.cth-hero { padding: 3rem 0 2.5rem; background: linear-gradient(180deg, var(--color-primary-light, #EEF2FF) 0%, var(--color-bg, #F8FAFC) 100%); }
.cth-hero__wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.cth-hero__title { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.15; margin: .9rem 0 .8rem; color: var(--cth-ink); }
.cth-hero__desc { color: var(--color-text-secondary, #334155); font-size: 1.05rem; line-height: 1.65; margin: 0 0 1.4rem; }
.cth-hero__btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.cth-hero__note { margin: 1rem 0 0; font-size: .85rem; color: var(--cth-muted); }
.cth-hero__art img, .cth-hero__svg { width: 100%; height: auto; display: block; border-radius: 16px; }

/* Sections */
.cth-latest, .cth-cats { padding: 2.75rem 0; }
.cth-sec-head { margin-bottom: 1.5rem; }
.cth-sec-head--center { text-align: center; }
.cth-sec-title { font-size: clamp(1.5rem, 3vw, 2rem); margin: .5rem 0 0; color: var(--cth-ink); }
.cth-empty { color: var(--cth-muted); }

/* Latest grid */
.cth-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.cth-card { display: flex; flex-direction: column; background: var(--cth-card-bg); border: 1px solid var(--cth-card-border); border-radius: 12px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.cth-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .08); transform: translateY(-2px); }
.cth-card__img { display: block; aspect-ratio: 1200 / 630; background: var(--cth-soft); overflow: hidden; }
.cth-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cth-card__ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #E0E7FF, #FEF3C7); }
.cth-card__body { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; flex: 1; }
.cth-card__title { font-size: 1.05rem; line-height: 1.35; margin: 0; }
.cth-card__title a { color: var(--cth-ink); text-decoration: none; }
.cth-card__title a:hover { color: var(--color-primary); }
.cth-card__meta { font-size: .8rem; color: var(--cth-muted); }
.cth-card__cat { align-self: flex-start; font-size: .75rem; font-weight: 600; color: var(--color-primary); background: rgba(79, 70, 229, .1); padding: .15rem .55rem; border-radius: 999px; text-decoration: none; }
.cth-card__ex { font-size: .9rem; color: var(--color-text-secondary, #334155); line-height: 1.55; margin: 0; flex: 1; }
a.cth-card__more { align-self: flex-start; padding: .5rem 1rem; font-size: .85rem; }
.cth-pagination { margin-top: 2rem; display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.cth-pagination .page-numbers { padding: .5rem .85rem; border: 1px solid var(--cth-card-border); border-radius: 8px; color: var(--cth-ink); text-decoration: none; background: var(--cth-card-bg); }
.cth-pagination .page-numbers.current { background: var(--cth-red); border-color: var(--cth-red); color: #fff; }

/* Category tiles */
.cth-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.cth-cat { display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem; border-radius: 14px; color: #fff !important; text-decoration: none !important; min-height: 160px; transition: transform .2s, box-shadow .2s; }
.cth-cat:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, .18); }
.cth-cat__name { font-weight: 800; font-size: 1.15rem; }
.cth-cat__desc { font-size: .88rem; opacity: .92; line-height: 1.5; flex: 1; }
.cth-cat__go { font-weight: 700; font-size: .9rem; }
.cth-cat--0 { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.cth-cat--1 { background: linear-gradient(135deg, #0EA5E9, #2563EB); }
.cth-cat--2 { background: linear-gradient(135deg, #DC2626, #F97316); }
.cth-cat--3 { background: linear-gradient(135deg, #059669, #10B981); }
.cth-cat--4 { background: linear-gradient(135deg, #D97706, #F59E0B); }
.cth-cat--5 { background: linear-gradient(135deg, #0F766E, #14B8A6); }
.cth-cat--6 { background: linear-gradient(135deg, #7C3AED, #DB2777); }
.cth-cat--7 { background: linear-gradient(135deg, #1E293B, #475569); }

/* Footer */
.cth-footer { background: #0B1020; color: #CBD5E1; padding: 3rem 0 1.5rem; margin-top: 2rem; }
.cth-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.cth-footer__logo img { height: 40px; width: auto; display: block; margin-bottom: 1rem; }
.cth-footer__brand p { font-size: .9rem; line-height: 1.6; margin: 0; color: #94A3B8; }
.cth-footer__title { color: #fff; font-weight: 700; margin: 0 0 .8rem; font-size: .95rem; }
.cth-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cth-footer a { color: #CBD5E1; text-decoration: none; font-size: .9rem; }
.cth-footer a:hover { color: #fff; }
.cth-footer__bottom { border-top: 1px solid #1E2742; margin-top: 2rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #94A3B8; }
.cth-footer__bottom p { margin: 0; }

/* ---------- Article blocks (bup-*) ---------- */
.bup-disc { font-size: .85rem; color: var(--cth-muted); background: var(--cth-soft); border-left: 3px solid var(--color-accent, #F59E0B); padding: .6rem .9rem; border-radius: 6px; margin: 1rem 0 1.5rem; }
a.bup-btn { display: inline-block; background: var(--cth-red) !important; color: #fff !important; font-weight: 700; padding: .65rem 1.2rem; border-radius: 8px; text-decoration: none !important; font-size: .95rem; line-height: 1.2; }
a.bup-btn:hover { background: var(--cth-red-hover) !important; }
.bup-top3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.bup-top3__card { position: relative; display: flex; flex-direction: column; gap: .6rem; border: 1px solid var(--cth-card-border); background: var(--cth-card-bg); border-radius: 12px; padding: 2rem 1rem 1rem; text-align: center; }
.bup-badge { position: absolute; top: -.7rem; left: 50%; transform: translateX(-50%); background: var(--color-primary, #4F46E5); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .25rem .7rem; border-radius: 999px; white-space: nowrap; }
.bup-top3__card img, .bup-prod__img img { max-width: 100%; height: 180px; object-fit: contain; margin: 0 auto; display: block; background: #fff; border-radius: 8px; }
.bup-top3__name { font-weight: 700; font-size: 1rem; color: var(--cth-ink); line-height: 1.35; }
.bup-top3 ul { text-align: left; font-size: .88rem; margin: 0; padding-left: 1.1rem; flex: 1; }
.bup-table-wrap { overflow-x: auto; margin: 1.25rem 0 2rem; }
.bup-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.bup-table th, .bup-table td { border: 1px solid var(--cth-card-border); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.bup-table th { background: var(--cth-soft); font-weight: 700; }
.bup-prod { border: 1px solid var(--cth-card-border); background: var(--cth-card-bg); border-radius: 14px; padding: 1.25rem; margin: 1rem 0 2.25rem; }
.bup-prod__label { display: inline-block; background: rgba(79, 70, 229, .12); color: var(--color-primary, #4F46E5); font-weight: 700; font-size: .8rem; padding: .25rem .7rem; border-radius: 999px; margin-bottom: .75rem; }
.bup-prod__top { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; align-items: start; }
.bup-pc { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bup-pros, .bup-cons { background: var(--cth-soft); border-radius: 10px; padding: .8rem 1rem; }
.bup-pros strong { color: var(--cth-pro); }
.bup-cons strong { color: var(--cth-con); }
.bup-pros ul, .bup-cons ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
.bup-specs { margin: 1rem 0; }
.bup-cta { margin: 1rem 0 .4rem; }
.bup-note { font-size: .8rem; color: var(--cth-muted); margin: .25rem 0 0; }
.bup-faq details { border: 1px solid var(--cth-card-border); border-radius: 10px; padding: .8rem 1rem; margin: .6rem 0; background: var(--cth-card-bg); }
.bup-faq summary { font-weight: 700; cursor: pointer; }
.bup-faq details p { margin: .6rem 0 0; }
.bup-verdict { border: 2px solid var(--color-primary, #4F46E5); border-radius: 14px; padding: 1.25rem; margin: 1.5rem 0; background: var(--cth-card-bg); }
.bup-verdict__btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.bup-related { border-top: 1px solid var(--cth-card-border); margin-top: 2rem; padding-top: 1rem; }
.bup-related ul { columns: 2; column-gap: 2rem; padding-left: 1.1rem; }
.bup-related li { break-inside: avoid; margin-bottom: .4rem; }

@media (max-width: 1024px) {
    .cth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cth-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cth-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .cth-hero__wrap { grid-template-columns: 1fr; }
    .cth-hero__art { order: -1; max-width: 420px; margin: 0 auto; }
    .bup-top3 { grid-template-columns: 1fr; gap: 1.5rem; }
    .bup-prod__top, .bup-pc { grid-template-columns: 1fr; }
    .bup-related ul { columns: 1; }
}
@media (max-width: 560px) {
    .cth-grid, .cth-cat-grid, .cth-footer__grid { grid-template-columns: 1fr; }
    .cth-hero { padding-top: 1.5rem; }
}
