/**
 * Affiliate Nuke Templates - Custom Styles
 * Enhances Kadence theme patterns for affiliate marketing content
 */

/* ==========================================================================
   TABLE OF CONTENTS
   ==========================================================================
   1. Base Typography & Spacing
   2. Product Boxes
   3. Comparison Tables
   4. Pros & Cons
   5. CTA Banners
   6. FAQ Styling
   7. Table of Contents
   8. Callout Boxes
   9. Responsive Adjustments
   ========================================================================== */

/* ==========================================================================
   1. BASE TYPOGRAPHY & SPACING
   ========================================================================== */

/* Improve readability for article content */
.ant-template-pillar .entry-content,
.ant-template-cluster .entry-content,
.ant-template-review .entry-content,
.ant-template-comparison .entry-content,
.ant-template-howto .entry-content,
.ant-template-listicle .entry-content {
    font-size: 1.0625rem;
    line-height: 1.75;
}

/* Better spacing for headings */
.entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* Drop cap styling */
.entry-content p.has-drop-cap:first-letter {
    font-size: 4rem;
    line-height: 0.8;
    font-weight: 700;
    margin-right: 0.5rem;
    float: left;
}

/* ==========================================================================
   2. PRODUCT BOXES
   ========================================================================== */

/* Product box hover effect */
[class*="ant-product-"],
[class*="ant-productbox"],
[class*="ant-pb-"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[class*="ant-product-"]:hover,
[class*="ant-productbox"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Product image styling */
[class*="ant-product-"] img,
[class*="ant-productbox"] img {
    transition: transform 0.3s ease;
}

[class*="ant-product-"]:hover img,
[class*="ant-productbox"]:hover img {
    transform: scale(1.02);
}

/* Badge styling */
[class*="ant-pb-badge"],
[class*="ant-p1-badge"],
[class*="ant-p2-badge"] {
    display: inline-block;
}

/* ==========================================================================
   3. COMPARISON TABLES
   ========================================================================== */

/* Enhance table styling */
.entry-content .wp-block-table.is-style-stripes {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 8px;
}

.entry-content .wp-block-table.is-style-stripes table {
    margin: 0;
}

.entry-content .wp-block-table.is-style-stripes thead {
    background: var(--global-palette1, #2563eb);
}

.entry-content .wp-block-table.is-style-stripes thead th {
    color: #fff;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
}

.entry-content .wp-block-table.is-style-stripes tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.entry-content .wp-block-table.is-style-stripes tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

/* Winner column styling */
.entry-content .wp-block-table td:last-child {
    white-space: nowrap;
}

/* ==========================================================================
   4. PROS & CONS
   ========================================================================== */

/* Pros list styling */
.ant-pros-list {
    list-style: none;
    padding-left: 0;
}

.ant-pros-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
}

.ant-pros-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

/* Cons list styling */
.ant-cons-list {
    list-style: none;
    padding-left: 0;
}

.ant-cons-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
}

.ant-cons-list li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: bold;
}

/* ==========================================================================
   5. CTA BANNERS
   ========================================================================== */

/* CTA button pulse animation */
[class*="ant-cta-"] .kt-button {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[class*="ant-cta-"] .kt-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   6. FAQ STYLING
   ========================================================================== */

/* Yoast FAQ Block styling */
.schema-faq-section {
    border-bottom: 1px solid var(--global-palette7, #e5e7eb);
    padding: 1.25rem 0;
}

.schema-faq-section:last-child {
    border-bottom: none;
}

.schema-faq-question {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--global-palette3, #1f2937);
    display: block;
    margin-bottom: 0.5rem;
}

.schema-faq-answer {
    color: var(--global-palette5, #4b5563);
    line-height: 1.65;
}

/* Kadence Accordion FAQ styling */
.kt-accordion-header-wrap {
    margin-bottom: 0.5rem;
}

.kt-blocks-accordion-header {
    background: var(--global-palette9, #f9fafb);
    border: 1px solid var(--global-palette7, #e5e7eb);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.kt-blocks-accordion-header:hover {
    background: var(--global-palette8, #f3f4f6);
}

/* ==========================================================================
   7. TABLE OF CONTENTS
   ========================================================================== */

/* TOC list styling */
.ant-toc-list {
    counter-reset: toc-counter;
    list-style: none;
    padding-left: 0;
}

.ant-toc-list li {
    counter-increment: toc-counter;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--global-palette7, #e5e7eb);
}

.ant-toc-list li:last-child {
    border-bottom: none;
}

.ant-toc-list li a {
    text-decoration: none;
    color: var(--global-palette3, #1f2937);
    transition: color 0.2s ease;
}

.ant-toc-list li a:hover {
    color: var(--global-palette1, #2563eb);
}

/* ==========================================================================
   8. CALLOUT BOXES
   ========================================================================== */

/* Smooth hover for callouts */
[class*="ant-tip-box"],
[class*="ant-warning-box"],
[class*="ant-note-box"] {
    transition: transform 0.2s ease;
}

[class*="ant-tip-box"]:hover,
[class*="ant-warning-box"]:hover,
[class*="ant-note-box"]:hover {
    transform: translateX(4px);
}

/* ==========================================================================
   9. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
    /* Stack pros/cons on mobile */
    [class*="ant-proscons"] .kt-row-column-wrap {
        flex-direction: column;
    }
    
    [class*="ant-proscons"] .inner-column-1,
    [class*="ant-proscons"] .inner-column-2 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Adjust product boxes on mobile */
    [class*="ant-product-"] .kt-row-layout-left-golden .kt-row-column-wrap,
    [class*="ant-productbox"] .kt-row-layout-left-golden .kt-row-column-wrap {
        flex-direction: column;
    }
    
    [class*="ant-product-"] .kt-row-layout-left-golden .inner-column-1,
    [class*="ant-productbox"] .kt-row-layout-left-golden .inner-column-1 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    [class*="ant-product-"] .kt-row-layout-left-golden .inner-column-2,
    [class*="ant-productbox"] .kt-row-layout-left-golden .inner-column-2 {
        width: 100%;
    }
    
    /* Comparison verdict columns */
    [class*="ant-compare-verdict"] .kt-row-column-wrap {
        flex-direction: column;
    }
    
    /* Adjust step numbers */
    [class*="ant-step-"] .kt-row-layout-left-forty .kt-row-column-wrap {
        flex-direction: row;
        align-items: center;
    }
    
    [class*="ant-step-"] .kt-row-layout-left-forty .inner-column-1 {
        width: auto;
        flex: 0 0 auto;
        margin-right: 1rem;
    }
    
    /* Table responsiveness */
    .entry-content .wp-block-table {
        overflow-x: auto;
        display: block;
    }
    
    .entry-content .wp-block-table table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    /* Further mobile adjustments */
    .entry-content h1 {
        font-size: 1.75rem;
    }
    
    .entry-content h2 {
        font-size: 1.5rem;
    }
    
    /* Compact buttons on small screens */
    .kt-btn-size-large {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9375rem !important;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    /* Hide CTAs and affiliate buttons when printing */
    [class*="ant-cta-"],
    .kt-button,
    [class*="ant-pb-btn"] {
        display: none !important;
    }
    
    /* Improve table printing */
    .wp-block-table {
        page-break-inside: avoid;
    }
}
