/**
 * CoupBuzz Overhaul CSS
 * Complete styles for all homepage sections
 * Version: 2.1 - with !important overrides
 */

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
    --cb-primary: #7C3AED;
    --cb-primary-light: #9B4DCA;
    --cb-secondary: #F97316;
    --cb-dark-gray: #1F2937;
    --cb-light-gray: #F3F4F6;
    --cb-text-dark: #1F2937;
    --cb-border-light: #E5E7EB;
    --cb-border-radius: 12px;
}

/* =============================================
   GLOBAL FONT OVERRIDE
   ============================================= */
body,
body .container,
body p,
body h1, body h2, body h3, body h4 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
}

/* =============================================
   HERO SECTION
   ============================================= */
body section.coupbuzz-hero-content {
    background: linear-gradient(135deg, #7C3AED 0%, #9B4DCA 100%) !important;
    padding: 60px 0 !important;
    text-align: center !important;
}

body section.coupbuzz-hero-content .container {
    max-width: 1200px !important;
}

body section.coupbuzz-hero-content h1,
body section.coupbuzz-hero-content .hero-title {
    font-size: 2.5em !important;
    font-weight: 800 !important;
    margin-bottom: 15px !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
}

body section.coupbuzz-hero-content p,
body section.coupbuzz-hero-content .hero-subtitle {
    font-size: 1.2em !important;
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 700px !important;
    margin: 0 auto !important;
}

/* =============================================
   EDUCATIONAL MAIN SECTION
   ============================================= */
body section.coupbuzz-educational-main {
    background: #ffffff !important;
    padding: 60px 0 !important;
}

body section.coupbuzz-educational-main .savings-guide {
    max-width: 900px !important;
    margin: 0 auto !important;
}

body section.coupbuzz-educational-main h2 {
    font-size: 2em !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
    border-bottom: 3px solid #7C3AED !important;
}

body section.coupbuzz-educational-main h3 {
    font-size: 1.5em !important;
    font-weight: 600 !important;
    color: #1F2937 !important;
    margin-top: 40px !important;
    margin-bottom: 15px !important;
}

body section.coupbuzz-educational-main p {
    font-size: 1.05em !important;
    line-height: 1.8 !important;
    color: #4B5563 !important;
    margin-bottom: 20px !important;
}

body section.coupbuzz-educational-main p.lead {
    font-size: 1.15em !important;
    color: #374151 !important;
    border-left: 4px solid #7C3AED !important;
    padding-left: 20px !important;
    margin-bottom: 30px !important;
    background: transparent !important;
}

body section.coupbuzz-educational-main strong {
    color: #1F2937 !important;
}

/* Savings Tips List */
body section.coupbuzz-educational-main .savings-tips,
body section.coupbuzz-educational-main ul.savings-tips {
    list-style: none !important;
    padding: 0 !important;
    margin: 30px 0 !important;
}

body section.coupbuzz-educational-main .savings-tips li {
    position: relative !important;
    padding: 15px 20px 15px 60px !important;
    margin-bottom: 15px !important;
    background: #F3F4F6 !important;
    border-radius: 12px !important;
    font-size: 1.05em !important;
    line-height: 1.7 !important;
    border-left: 4px solid #7C3AED !important;
}

body section.coupbuzz-educational-main .savings-tips li::before {
    content: "✓" !important;
    position: absolute !important;
    left: 20px !important;
    top: 15px !important;
    width: 28px !important;
    height: 28px !important;
    background: #7C3AED !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

body section.coupbuzz-educational-main .savings-tips li strong {
    color: #7C3AED !important;
}

/* Discount Types Grid */
body section.coupbuzz-educational-main .discount-types {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px !important;
    margin: 30px 0 !important;
}

body section.coupbuzz-educational-main .discount-type {
    background: #F3F4F6 !important;
    padding: 25px !important;
    border-radius: 12px !important;
    border: 1px solid #E5E7EB !important;
    transition: all 0.3s ease !important;
}

body section.coupbuzz-educational-main .discount-type:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important;
}

body section.coupbuzz-educational-main .discount-type h4 {
    font-size: 1.2em !important;
    font-weight: 600 !important;
    color: #7C3AED !important;
    margin-bottom: 10px !important;
}

body section.coupbuzz-educational-main .discount-type p {
    margin-bottom: 0 !important;
    font-size: 0.95em !important;
}

/* Common Mistakes List */
body section.coupbuzz-educational-main ul:not(.savings-tips) {
    margin: 20px 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

body section.coupbuzz-educational-main ul:not(.savings-tips) li {
    position: relative !important;
    padding: 10px 0 10px 30px !important;
    font-size: 1.05em !important;
    line-height: 1.7 !important;
    border-bottom: 1px solid #E5E7EB !important;
}

body section.coupbuzz-educational-main ul:not(.savings-tips) li::before {
    content: "✗" !important;
    position: absolute !important;
    left: 0 !important;
    color: #EF4444 !important;
    font-weight: bold !important;
    font-size: 1.2em !important;
}

/* =============================================
   DEALS SECTION
   ============================================= */
body section.coupbuzz-deals-section {
    background: #F3F4F6 !important;
    padding: 60px 0 !important;
}

body section.coupbuzz-deals-section h2 {
    font-size: 2em !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
    text-align: center !important;
    margin-bottom: 10px !important;
}

body section.coupbuzz-deals-section .section-subtitle {
    text-align: center !important;
    color: #6B7280 !important;
    font-size: 1.1em !important;
    margin-bottom: 40px !important;
}

/* =============================================
   FAQ SECTION
   ============================================= */
body section.coupbuzz-faq-section {
    background: #ffffff !important;
    padding: 60px 0 !important;
}

body section.coupbuzz-faq-section h2 {
    font-size: 2em !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
    text-align: center !important;
    margin-bottom: 40px !important;
}

body section.coupbuzz-faq-section .faq-grid {
    max-width: 900px !important;
    margin: 0 auto !important;
}

body section.coupbuzz-faq-section .faq-item {
    background: #F3F4F6 !important;
    border-radius: 12px !important;
    padding: 25px 30px !important;
    margin-bottom: 20px !important;
    border-left: 4px solid #7C3AED !important;
}

body section.coupbuzz-faq-section .faq-item h3 {
    font-size: 1.2em !important;
    font-weight: 600 !important;
    color: #1F2937 !important;
    margin-bottom: 15px !important;
}

body section.coupbuzz-faq-section .faq-item p {
    color: #4B5563 !important;
    line-height: 1.7 !important;
    margin-bottom: 0 !important;
}

/* =============================================
   TRUST DISCLOSURE SECTION
   ============================================= */
body section.trust-disclosure-section {
    background: #1F2937 !important;
    color: #ffffff !important;
    padding: 60px 0 !important;
    text-align: center !important;
}

body section.trust-disclosure-section h2 {
    font-size: 1.8em !important;
    font-weight: 700 !important;
    margin-bottom: 30px !important;
    color: #ffffff !important;
}

body section.trust-disclosure-section .trust-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 25px !important;
    margin-bottom: 30px !important;
}

body section.trust-disclosure-section .trust-item {
    flex: 0 0 calc(33.333% - 20px) !important;
    max-width: 320px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 25px 20px !important;
}

body section.trust-disclosure-section .trust-item h3 {
    font-size: 1.2em !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
    color: #ffffff !important;
}

body section.trust-disclosure-section .trust-item p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9em !important;
}

/* =============================================
   NAVIGATION / HEADER
   ============================================= */
body section.navigation {
    min-height: 70px !important;
    padding: 10px 0 !important;
    background: #fff !important;
}

body section.navigation .site-logo br {
    display: none !important;
}

body section.navigation .site-logo span:first-of-type {
    font-size: 40px !important;
    font-weight: 800 !important;
    color: #1F2937 !important;
}

body section.navigation .site-logo span:last-of-type {
    font-size: 10px !important;
    color: #6B7280 !important;
}

/* =============================================
   HIDE DEMO ELEMENTS
   ============================================= */
.countdown-timer,
.deal-countdown,
[class*="countdown"],
.notification-bar,
.breadcrumb-section,
.widget_couponxl_latest_tweets,
.widget_couponxl_custom_locations {
    display: none !important;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
    body section.coupbuzz-hero-content h1 {
        font-size: 2em !important;
    }
    
    body section.coupbuzz-educational-main .discount-types {
        grid-template-columns: 1fr !important;
    }
    
    body section.trust-disclosure-section .trust-item {
        flex: 0 0 calc(50% - 15px) !important;
    }
    
    body section.navigation .site-logo span:last-of-type {
        display: none !important;
    }
}

@media (max-width: 767px) {
    body section.coupbuzz-hero-content {
        padding: 40px 0 !important;
    }
    
    body section.coupbuzz-hero-content h1 {
        font-size: 1.6em !important;
    }
    
    body section.coupbuzz-educational-main,
    body section.coupbuzz-deals-section,
    body section.coupbuzz-faq-section {
        padding: 40px 0 !important;
    }
    
    body section.coupbuzz-educational-main h2 {
        font-size: 1.5em !important;
    }
    
    body section.coupbuzz-educational-main .savings-tips li {
        padding-left: 50px !important;
    }
    
    body section.trust-disclosure-section .trust-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* =============================================
   VALUE PROPOSITION SECTION (from MU-plugin)
   ============================================= */
body section.coupbuzz-value-proposition {
    background: #F3F4F6 !important;
    padding: 60px 0 !important;
    text-align: center !important;
}

body section.coupbuzz-value-proposition h1 {
    font-size: 2.2em !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
    margin-bottom: 10px !important;
}

body section.coupbuzz-value-proposition .subtitle {
    font-size: 1.1em !important;
    color: #6B7280 !important;
    margin-bottom: 40px !important;
}

body section.coupbuzz-value-proposition .value-cards {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 25px !important;
}

body section.coupbuzz-value-proposition .value-card {
    flex: 0 0 calc(33.333% - 20px) !important;
    max-width: 320px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 30px 25px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important;
    text-align: center !important;
}

body section.coupbuzz-value-proposition .value-card-icon {
    width: 70px !important;
    height: 70px !important;
    background: rgba(124, 58, 237, 0.1) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 20px !important;
}

body section.coupbuzz-value-proposition .value-card-icon i {
    font-size: 28px !important;
    color: #7C3AED !important;
}

body section.coupbuzz-value-proposition .value-card h2 {
    font-size: 1.3em !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
    color: #1F2937 !important;
}

body section.coupbuzz-value-proposition .value-card p {
    color: #6B7280 !important;
    font-size: 0.95em !important;
    line-height: 1.6 !important;
}

/* =============================================
   START SAVING STEPS SECTION
   ============================================= */
body section.start-saving-section {
    background: #ffffff !important;
    padding: 60px 0 !important;
    text-align: center !important;
}

body section.start-saving-section h2 {
    font-size: 2em !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
    margin-bottom: 10px !important;
}

body section.start-saving-section .subtitle {
    font-size: 1.1em !important;
    color: #6B7280 !important;
    margin-bottom: 40px !important;
}

body section.start-saving-section .saving-steps {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 30px !important;
}

body section.start-saving-section .saving-step {
    flex: 0 0 calc(33.333% - 25px) !important;
    max-width: 320px !important;
    text-align: center !important;
}

body section.start-saving-section .step-number {
    width: 50px !important;
    height: 50px !important;
    background: #7C3AED !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5em !important;
    font-weight: 700 !important;
    margin: 0 auto 15px !important;
}

body section.start-saving-section .saving-step h3 {
    font-size: 1.4em !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
    color: #1F2937 !important;
}

body section.start-saving-section .saving-step p {
    color: #6B7280 !important;
    font-size: 0.95em !important;
    line-height: 1.6 !important;
}

/* =============================================
   POPULAR CATEGORIES SECTION
   ============================================= */
body section.popular-categories-section {
    background: #F3F4F6 !important;
    padding: 60px 0 !important;
    text-align: center !important;
}

body section.popular-categories-section h2 {
    font-size: 2em !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
    margin-bottom: 10px !important;
}

body section.popular-categories-section .subtitle {
    font-size: 1.1em !important;
    color: #6B7280 !important;
    margin-bottom: 40px !important;
}

body section.popular-categories-section .categories-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

body section.popular-categories-section .category-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 25px 20px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
}

body section.popular-categories-section .category-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1) !important;
}

body section.popular-categories-section .category-card-icon {
    width: 60px !important;
    height: 60px !important;
    background: rgba(124, 58, 237, 0.1) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 15px !important;
}

body section.popular-categories-section .category-card-icon i {
    font-size: 24px !important;
    color: #7C3AED !important;
}

body section.popular-categories-section .category-card h3 {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: #1F2937 !important;
}

body section.popular-categories-section .category-card p {
    color: #6B7280 !important;
    font-size: 0.85em !important;
    line-height: 1.5 !important;
}

/* Responsive for new sections */
@media (max-width: 991px) {
    body section.coupbuzz-value-proposition .value-card,
    body section.start-saving-section .saving-step {
        flex: 0 0 calc(50% - 15px) !important;
    }
    body section.popular-categories-section .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    body section.coupbuzz-value-proposition .value-card,
    body section.start-saving-section .saving-step {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    body section.popular-categories-section .categories-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Logo sizing fix */
body section.navigation .site-logo {
    font-size: 40px !important;
    font-weight: 800 !important;
    color: #1F2937 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

body section.navigation .site-logo span {
    font-size: 40px !important;
    font-weight: 800 !important;
    color: #1F2937 !important;
}

/* =============================================
   HOW TO SAVE PAGE STYLES
   ============================================= */

/* Lead text */
.lead-text {
    font-size: 1.2em !important;
    line-height: 1.7 !important;
    color: #374151 !important;
    margin-bottom: 1.5em !important;
}

/* TL;DR Box */
.tldr-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-left: 4px solid #7C3AED !important;
    padding: 28px 32px !important;
    margin: 30px 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.tldr-box h3 {
    color: #7C3AED !important;
    font-size: 1.4em !important;
    margin-bottom: 16px !important;
    font-weight: 700 !important;
}

.tldr-box ul {
    margin-bottom: 16px !important;
}

.tldr-box li {
    padding: 6px 0 !important;
    color: #374151 !important;
}

/* Example boxes (yellow) */
.example-box {
    background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%) !important;
    border-left: 4px solid #f59e0b !important;
    padding: 24px 28px !important;
    margin: 24px 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.example-box h4 {
    color: #b45309 !important;
    font-size: 1.2em !important;
    margin-bottom: 14px !important;
    font-weight: 600 !important;
}

.example-box p {
    color: #78350f !important;
    margin-bottom: 12px !important;
}

.example-box ul, .example-box ol {
    color: #78350f !important;
}

.example-box li {
    padding: 4px 0 !important;
}

/* Blue info boxes */
.wp-block-group.has-background[style*="dbeafe"] {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border-left: 4px solid #3b82f6 !important;
    padding: 24px 28px !important;
    margin: 24px 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.wp-block-group.has-background[style*="dbeafe"] h4 {
    color: #1e40af !important;
    font-size: 1.2em !important;
    margin-bottom: 14px !important;
}

.wp-block-group.has-background[style*="dbeafe"] p,
.wp-block-group.has-background[style*="dbeafe"] li {
    color: #1e3a5f !important;
}

/* Checklist box (green) */
.checklist-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border: 2px solid #10b981 !important;
    padding: 28px 32px !important;
    margin: 30px 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15) !important;
}

.checklist-box h3 {
    color: #047857 !important;
    font-size: 1.4em !important;
    margin-bottom: 16px !important;
    font-weight: 700 !important;
}

.checklist-box li {
    padding: 8px 0 !important;
    color: #065f46 !important;
    font-size: 1.05em !important;
}

/* Tables in content */
.wp-block-table table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 16px 0 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.wp-block-table th {
    background: #f3f4f6 !important;
    color: #374151 !important;
    font-weight: 600 !important;
    padding: 12px 16px !important;
    text-align: left !important;
    border-bottom: 2px solid #e5e7eb !important;
}

.wp-block-table td {
    padding: 12px 16px !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #4b5563 !important;
}

.wp-block-table tr:last-child td {
    border-bottom: none !important;
}

.wp-block-table tr:hover td {
    background: #f9fafb !important;
}

/* Content headings */
.entry-content h2,
.page-content h2 {
    font-size: 1.8em !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-top: 48px !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid #e5e7eb !important;
}

.entry-content h3,
.page-content h3 {
    font-size: 1.4em !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-top: 32px !important;
    margin-bottom: 16px !important;
}

.entry-content h4,
.page-content h4 {
    font-size: 1.15em !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
}

/* Links in content */
.entry-content a,
.page-content a {
    color: #7C3AED !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent !important;
    transition: border-color 0.2s ease !important;
}

.entry-content a:hover,
.page-content a:hover {
    border-bottom-color: #7C3AED !important;
}

/* Strong text highlight */
.entry-content strong,
.page-content strong {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* Lists styling */
.entry-content ul,
.page-content ul {
    margin-left: 0 !important;
    padding-left: 24px !important;
}

.entry-content li,
.page-content li {
    margin-bottom: 8px !important;
    line-height: 1.6 !important;
}

/* Ordered lists */
.entry-content ol,
.page-content ol {
    margin-left: 0 !important;
    padding-left: 24px !important;
}

/* Remove sidebar for guide pages */
.page-template-default .sidebar,
.single .sidebar {
    /* Keep sidebar but style it better */
}

/* Page content width */
@media (min-width: 992px) {
    .page-template-default .entry-content,
    .page-template-default .page-content {
        max-width: 800px !important;
    }
}

/* AI Disclosure */
.ai-disclosure {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 20px 24px !important;
    margin-top: 48px !important;
}

.ai-disclosure p {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #6b7280 !important;
    margin: 0 !important;
}

.ai-disclosure strong {
    color: #4b5563 !important;
}

/* Guides Grid Styles */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.guide-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.guide-card h3 {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
}

.guide-card h3 a {
    color: #1F2937 !important;
    text-decoration: none !important;
}

.guide-card h3 a:hover {
    color: #2563EB !important;
}

.guide-card p {
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 8px;
}

.guide-card p:last-child {
    margin-bottom: 0;
}

/* Guide page content styles */
.tldr-box,
.example-box,
.checklist-box {
    margin: 24px 0 !important;
}

.ai-disclosure {
    margin-top: 40px !important;
}

/* =============================================
   UKRYCIE PUSTYCH SEKCJI (brak demo contentu)
   ============================================= */

/* Ukryj Featured Coupons gdy puste */
.featured-coupons-section:empty,
.featured-coupons-section:has(.row:empty) {
    display: none !important;
}

/* Ukryj Featured Stores gdy puste */
.featured-stores-section:empty,
.featured-stores-wrap:has(.store-boxes:empty) {
    display: none !important;
}

/* Ukryj Today's Best Deals gdy puste */
.todays-best-deals:empty,
.home-page-offers:empty {
    display: none !important;
}

/* Ukryj całe sekcje z nagłówkami gdy nie ma zawartości */
section:has(.white-block-content:empty) {
    display: none !important;
}

/* Ukryj Featured Deals slider gdy pusty */
.featured-slider-wrap:empty,
.featured-slider:empty {
    display: none !important;
}

/* Ukryj sekcję "I'm looking for" sidebar gdy pusta */
.home-sidebar:empty {
    display: none !important;
}


/* =============================================
   UKRYCIE PUSTYCH SEKCJI - WERSJA SILNA
   ============================================= */

/* Ukryj Featured Coupons - po nagłówku */
.white-block-content > .row > .col-md-12 > h2:first-child:contains("Featured"),
section.white-block-content:has(h2:contains("Featured Coupons")):not(:has(.offer-box)),
.featured-coupons-wrap:empty {
    display: none !important;
}

/* BEZPOŚREDNIE UKRYCIE - Featured Coupons section */
.white-block-content:has(> .white-block-header:contains("Featured Coupons")) {
    display: none !important;
}

/* BEZPOŚREDNIE UKRYCIE - Featured Stores gdy puste */
.featured-stores-wrap:not(:has(img)) {
    display: none !important;
}

/* Ukryj całą sekcję stores jeśli nie ma obrazków */
section:has(.featured-stores-wrap:not(:has(img))) {
    display: none !important;
}


/* =============================================
   FIX: Affiliate Disclosure visibility
   ============================================= */
.trust-disclosure-section h4,
.disclosure-text h4,
section.trust-disclosure-section h4 {
    color: #ffffff !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
    margin-bottom: 20px !important;
}

/* Alternatywny selektor */
h4:contains("Affiliate Disclosure"),
.container h4[data-cursor-element-id] {
    color: #ffffff !important;
}

/* Sekcja disclosure - jasny tekst na ciemnym tle */
.trust-disclosure-section,
section[class*="disclosure"] {
    background-color: #1F2937 !important;
}

.trust-disclosure-section h4,
.trust-disclosure-section p,
.trust-disclosure-section a {
    color: #ffffff !important;
}

.trust-disclosure-section a {
    color: #a78bfa !important;
    text-decoration: underline !important;
}


/* =============================================
   UNIFIED STYLING - ALL PAGES
   Based on Homepage Design
   ============================================= */

/* ===================
   COLOR VARIABLES
   =================== */
:root {
    --primary-purple: #7C3AED;
    --primary-purple-light: #A78BFA;
    --primary-purple-dark: #5B21B6;
    --gradient-start: #7C3AED;
    --gradient-end: #9333EA;
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-light: #E5E7EB;
    --success-green: #10B981;
    --accent-orange: #F59E0B;
}

/* ===================
   PAGE HEADERS (wszystkie strony)
   =================== */
.page-title-section,
.archive-header,
section.page-title {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%) !important;
    padding: 60px 0 !important;
}

.page-title-section h1,
.archive-header h1,
section.page-title h1 {
    color: #ffffff !important;
    font-size: 42px !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

/* ===================
   CONTENT PAGES (guides, how-to-save, etc.)
   =================== */
.page-content,
.single-content,
article.savings-guide,
.entry-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: var(--text-dark) !important;
    line-height: 1.7 !important;
}

/* Headings */
.page-content h1,
.entry-content h1,
.wp-block-heading:is(h1) {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: var(--text-dark) !important;
    margin-bottom: 24px !important;
    line-height: 1.2 !important;
}

.page-content h2,
.entry-content h2,
.wp-block-heading:is(h2) {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin-top: 48px !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 3px solid var(--primary-purple) !important;
}

.page-content h3,
.entry-content h3,
.wp-block-heading:is(h3) {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    margin-top: 32px !important;
    margin-bottom: 16px !important;
}

.page-content h4,
.entry-content h4,
.wp-block-heading:is(h4) {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--primary-purple-dark) !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
}

/* Paragraphs */
.page-content p,
.entry-content p {
    font-size: 17px !important;
    color: var(--text-medium) !important;
    margin-bottom: 20px !important;
}

/* Lead text */
.lead-text,
.page-content > p:first-of-type,
article > p:first-of-type {
    font-size: 19px !important;
    color: var(--text-dark) !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
    border-left: 4px solid var(--primary-purple) !important;
    padding-left: 20px !important;
    margin-bottom: 32px !important;
}

/* Trust/Freshness text */
.trust-freshness {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%) !important;
    padding: 16px 20px !important;
    border-radius: 8px !important;
    border-left: 4px solid var(--primary-purple) !important;
    margin-bottom: 32px !important;
}

.trust-freshness strong {
    color: var(--primary-purple-dark) !important;
}

/* ===================
   LISTS
   =================== */
.page-content ul,
.entry-content ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-bottom: 24px !important;
}

.page-content ul li,
.entry-content ul li {
    position: relative !important;
    padding-left: 28px !important;
    margin-bottom: 12px !important;
    font-size: 16px !important;
    color: var(--text-medium) !important;
}

.page-content ul li::before,
.entry-content ul li::before {
    content: "✓" !important;
    position: absolute !important;
    left: 0 !important;
    color: var(--success-green) !important;
    font-weight: bold !important;
}

.page-content ol,
.entry-content ol {
    padding-left: 24px !important;
    margin-bottom: 24px !important;
}

.page-content ol li,
.entry-content ol li {
    margin-bottom: 12px !important;
    font-size: 16px !important;
    color: var(--text-medium) !important;
}

/* ===================
   LINKS
   =================== */
.page-content a,
.entry-content a {
    color: var(--primary-purple) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    border-bottom: 1px solid transparent !important;
    transition: all 0.2s ease !important;
}

.page-content a:hover,
.entry-content a:hover {
    color: var(--primary-purple-dark) !important;
    border-bottom-color: var(--primary-purple) !important;
}

/* ===================
   CALLOUT BOXES
   =================== */
.tldr-box,
.info-box,
.tip-box {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%) !important;
    border: 1px solid #86EFAC !important;
    border-left: 4px solid var(--success-green) !important;
    border-radius: 8px !important;
    padding: 20px 24px !important;
    margin: 24px 0 !important;
}

.example-box,
.warning-box {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%) !important;
    border: 1px solid #FCD34D !important;
    border-left: 4px solid var(--accent-orange) !important;
    border-radius: 8px !important;
    padding: 20px 24px !important;
    margin: 24px 0 !important;
}

.savings-checklist-box,
.checklist-box {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%) !important;
    border: 1px solid #A5B4FC !important;
    border-left: 4px solid var(--primary-purple) !important;
    border-radius: 8px !important;
    padding: 20px 24px !important;
    margin: 24px 0 !important;
}

/* ===================
   TABLES
   =================== */
.page-content table,
.entry-content table,
.wp-block-table table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 24px 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.page-content th,
.entry-content th,
.wp-block-table th {
    background: var(--primary-purple) !important;
    color: #ffffff !important;
    padding: 14px 16px !important;
    text-align: left !important;
    font-weight: 600 !important;
}

.page-content td,
.entry-content td,
.wp-block-table td {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--border-light) !important;
    color: var(--text-medium) !important;
}

.page-content tr:nth-child(even),
.entry-content tr:nth-child(even),
.wp-block-table tr:nth-child(even) {
    background: var(--bg-light) !important;
}

.page-content tr:hover,
.entry-content tr:hover,
.wp-block-table tr:hover {
    background: #EEF2FF !important;
}

/* ===================
   FAQ SECTIONS
   =================== */
.faq-section,
.wp-block-yoast-faq-block {
    margin: 40px 0 !important;
}

.faq-item,
.faq-question {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 20px 24px !important;
    margin-bottom: 16px !important;
    transition: all 0.2s ease !important;
}

.faq-item:hover,
.faq-question:hover {
    border-color: var(--primary-purple-light) !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1) !important;
}

.faq-item h3,
.faq-question h3 {
    color: var(--text-dark) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 0 12px 0 !important;
}

.faq-item p,
.faq-answer {
    color: var(--text-medium) !important;
    font-size: 16px !important;
    margin: 0 !important;
}

/* ===================
   GUIDE CARDS
   =================== */
.guide-card {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    transition: all 0.3s ease !important;
    display: block !important;
    text-decoration: none !important;
}

.guide-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.15) !important;
    border-color: var(--primary-purple-light) !important;
}

.guide-card-icon {
    font-size: 36px !important;
    margin-bottom: 16px !important;
}

.guide-card-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin-bottom: 12px !important;
}

.guide-card-description {
    font-size: 15px !important;
    color: var(--text-medium) !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
}

.guide-card-best-for {
    font-size: 14px !important;
    color: var(--text-light) !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--border-light) !important;
}

.guide-card-best-for strong {
    color: var(--primary-purple-dark) !important;
}

/* ===================
   AI DISCLOSURE
   =================== */
.ai-disclosure,
.ai-disclosure-box {
    background: var(--bg-light) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 16px 20px !important;
    margin-top: 48px !important;
    font-size: 14px !important;
    color: var(--text-light) !important;
}

.ai-disclosure strong {
    color: var(--text-medium) !important;
}

/* ===================
   BUTTONS / CTAs
   =================== */
.btn-primary,
a.btn,
.wp-block-button__link {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%) !important;
    color: #ffffff !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn-primary:hover,
a.btn:hover,
.wp-block-button__link:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3) !important;
}

/* ===================
   BREADCRUMBS
   =================== */
.breadcrumb,
.breadcrumbs {
    background: transparent !important;
    padding: 16px 0 !important;
    font-size: 14px !important;
}

.breadcrumb a,
.breadcrumbs a {
    color: var(--primary-purple) !important;
}

.breadcrumb li::after,
.breadcrumbs li::after {
    color: var(--text-light) !important;
}

/* ===================
   SIDEBAR
   =================== */
.sidebar .widget,
aside .widget {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
}

.sidebar .widget-title,
aside .widget-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid var(--primary-purple) !important;
}

/* ===================
   RESPONSIVE
   =================== */
@media (max-width: 768px) {
    .page-title-section h1,
    section.page-title h1 {
        font-size: 28px !important;
    }
    
    .page-content h2,
    .entry-content h2 {
        font-size: 24px !important;
    }
    
    .page-content h3,
    .entry-content h3 {
        font-size: 20px !important;
    }
    
    .guide-card {
        margin-bottom: 16px !important;
    }
}


/* =============================================
   GUIDES QUICK LINKS (Homepage)
   ============================================= */
.coupbuzz-guides-links-section {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    padding: 60px 0;
    margin: 40px 0;
}

.guides-quick-links {
    margin-top: 30px;
}

.guide-quick-link {
    display: block;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.guide-quick-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
}

.guide-quick-link .icon {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
}

.guide-quick-link .title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 6px;
}

.guide-quick-link .desc {
    display: block;
    font-size: 14px;
    color: #6B7280;
}

.btn-view-all-guides {
    display: inline-block;
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
    color: #ffffff !important;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-all-guides:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

/* =============================================
   AUTHOR BIO BOX
   ============================================= */
.author-bio-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    margin-top: 48px;
}

.author-avatar {
    font-size: 48px;
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
    border-radius: 50%;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6B7280;
    margin: 0 0 4px 0;
}

.author-name {
    font-size: 18px;
    color: #1F2937;
    margin: 0 0 8px 0;
}

.author-desc {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.author-updated {
    font-size: 13px;
    color: #9CA3AF;
    margin: 0;
}

/* =============================================
   LEGAL FOOTER
   ============================================= */
.coupbuzz-legal-footer {
    background: #1F2937;
    padding: 60px 0 40px;
    margin-top: 60px;
}

.coupbuzz-legal-footer h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #A78BFA;
}

.contact-info {
    color: #9CA3AF;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 20px;
}

.contact-info strong {
    color: #ffffff;
}

.copyright-row {
    border-top: 1px solid #374151;
    margin-top: 40px;
    padding-top: 30px;
}

.copyright-row p {
    color: #9CA3AF;
    font-size: 14px;
    margin: 0 0 8px 0;
}

.affiliate-notice {
    font-size: 12px !important;
    color: #6B7280 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .author-bio-box {
        flex-direction: column;
        text-align: center;
    }
    
    .coupbuzz-legal-footer .col-md-4 {
        margin-bottom: 30px;
        text-align: center;
    }
}


/* =============================================
   FIX: Hide duplicate H1 on guide pages
   Guide pages have H1 in content, hide theme's H1
   ============================================= */

/* =============================================
   Make content H2 look like original H1
   (SEO fix: theme has H1, content has H2)
   ============================================= */
h2.page-main-title,
.page-content h2.wp-block-heading:first-of-type {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
    line-height: 1.3 !important;
    margin-bottom: 24px !important;
}


/* CoupBuzz: Hero illustration */
.coupbuzz-hero-content .coupbuzz-hero-row {
  display: flex !important;
  align-items: center !important;
}
.coupbuzz-hero-content .coupbuzz-hero-copy {
  text-align: left !important;
}
.coupbuzz-hero-content .coupbuzz-hero-media {
  display: flex !important;
  justify-content: flex-end !important;
}
.coupbuzz-hero-content .coupbuzz-hero-media img {
  width: 100% !important;
  max-width: 520px !important;
  height: auto !important;
  border-radius: 18px !important;
}

@media (max-width: 991px) {
  .coupbuzz-hero-content .coupbuzz-hero-copy {
    text-align: center !important;
    margin-bottom: 16px !important;
  }
  .coupbuzz-hero-content .coupbuzz-hero-media {
    justify-content: center !important;
  }
  .coupbuzz-hero-content .coupbuzz-hero-row {
    display: block !important;
  }
}