/*
Theme Name: CPL Science
Theme URI: https://cplscience.com
Author: CPL Science
Author URI: https://cplscience.com
Description: Custom theme for CPL Science - Performance Media Buying for Lead Generation
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cpl-science
Tags: custom-logo, custom-menu, featured-images, blog
*/

/* ===== CSS VARIABLES ===== */
:root {
    --primary: #0A5F5F;
    --primary-dark: #064040;
    --accent: #F97316;
    --accent-dark: #EA580C;
    --teal: #14B8A6;
    --teal-light: #2DD4BF;
    --teal-lighter: #99F6E4;
    --bg: #fafbfc;
    --bg-dark: #f0fdfa;
    --text: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 17px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--teal);
}

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

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo svg {
    height: 54px;
    width: auto;
}

/* ===== NAVIGATION ===== */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: var(--primary);
}

.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white) !important;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white) !important;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-ghost:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== HERO ===== */
.hero {
    padding: 10rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-dark);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    width: fit-content;
}

.hero-label span {
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(2.5rem, 5.5vw, 3.75rem);
    line-height: 1.15;
    color: var(--primary);
    max-width: 900px;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero h1 em {
    color: var(--teal);
    font-style: italic;
}

.hero-sub {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== SECTIONS ===== */
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ===== AUDIENCE SECTION ===== */
.audience-section {
    padding: 6rem 2rem;
    background: var(--primary);
}

.audience-section .section-header h2 {
    color: var(--white);
}

.audience-section .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.audience-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.audience-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

.audience-stat {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.75rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.audience-card h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.audience-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== NARROW SECTION ===== */
.narrow-section {
    padding: 5rem 2rem;
    background: var(--bg-dark);
}

.narrow-inner {
    max-width: 900px;
    margin: 0 auto;
}

.narrow-section h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    line-height: 1.25;
    text-align: center;
}

.narrow-section > .narrow-inner > p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.narrow-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.narrow-point {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}

.narrow-point h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.narrow-point p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.55;
}

/* ===== AGGREGATOR SECTION ===== */
.aggregator-section {
    padding: 5rem 2rem;
    background: var(--warning-bg);
    border-top: 3px solid var(--warning);
}

.aggregator-inner {
    max-width: 900px;
    margin: 0 auto;
}

.aggregator-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--warning);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.aggregator-section h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    line-height: 1.25;
}

.aggregator-section > .aggregator-inner > p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 750px;
}

.aggregator-risks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.risk-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.risk-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.risk-card h4::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--warning);
    border-radius: 50%;
    flex-shrink: 0;
}

.risk-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.55;
}

/* ===== CHANNELS SECTION ===== */
.channels-section {
    padding: 6rem 2rem;
    background: var(--bg);
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.channel-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.25s;
}

.channel-card:hover {
    border-color: var(--teal);
    box-shadow: 0 8px 30px rgba(20, 184, 166, 0.12);
    transform: translateY(-2px);
}

.channels-grid .channel-card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.625rem);
    justify-self: center;
}

.channel-icon {
    width: 52px;
    height: 52px;
    background: var(--bg-dark);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.channel-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--primary);
}

.channel-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.channel-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ===== ATTRIBUTION SECTION ===== */
.attribution-section {
    padding: 6rem 2rem;
    background: var(--bg-dark);
}

.attribution-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.attribution-content h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.attribution-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.attribution-content p strong {
    color: var(--text);
}

.attribution-visual {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.attribution-visual h4 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.attribution-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.attribution-method:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.attribution-method:first-of-type {
    padding-top: 0;
}

.method-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--teal-light), var(--teal));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--white);
}

.method-content h5 {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
    color: var(--primary);
}

.method-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 6rem 2rem;
    background: var(--bg);
}

.cta-box {
    max-width: 750px;
    margin: 0 auto;
    background: var(--primary);
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(20, 184, 166, 0.15);
    border-radius: 50%;
}

.cta-box::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 50%;
}

.cta-box h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.25rem;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    position: relative;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-box .btn {
    background: var(--white);
    color: var(--primary);
    font-size: 1rem;
    padding: 1rem 2rem;
    position: relative;
}

.cta-box .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--primary-dark);
    padding: 3rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo svg {
    height: 48px;
    width: auto;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
}

/* ===== BLOG STYLES ===== */
.blog-header {
    padding: 10rem 2rem 4rem;
    background: var(--primary);
    text-align: center;
}

.blog-header h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.blog-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.blog-content {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-dark);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.post-card h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-card h2 a {
    color: inherit;
}

.post-card h2 a:hover {
    color: var(--teal);
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    font-weight: 600;
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: var(--primary);
}

/* ===== SINGLE POST ===== */
.single-post-header {
    padding: 10rem 2rem 4rem;
    background: var(--primary);
    text-align: center;
}

.single-post-header h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
    max-width: 800px;
    margin: 0 auto 1.5rem;
    line-height: 1.2;
}

.single-post-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.single-post-content {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.single-post-content .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: 'Instrument Serif', Georgia, serif;
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h2 {
    font-size: 2rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content a {
    color: var(--teal);
    text-decoration: underline;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--teal);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.entry-content img {
    border-radius: 12px;
    margin: 2rem 0;
}

/* Post Navigation */
.post-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
}

.post-navigation a {
    color: var(--primary);
    font-weight: 600;
}

/* ===== PAGE STYLES ===== */
.page-header {
    padding: 10rem 2rem 4rem;
    background: var(--primary);
    text-align: center;
}

.page-header h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 3rem;
    color: var(--white);
}

.page-content {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== MOBILE MENU ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    margin: 5px 0;
    transition: 0.3s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
    .audience-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .attribution-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .channels-grid {
        grid-template-columns: 1fr;
    }
    
    .channels-grid .channel-card:nth-child(5) {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 2rem;
        flex-direction: column;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .main-navigation.active {
        display: flex;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero {
        padding: 8rem 1.5rem 4rem;
        min-height: auto;
    }
    
    .audience-grid {
        grid-template-columns: 1fr;
    }
    
    .narrow-points {
        grid-template-columns: 1fr;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}
