/* 
   MASTER FOOTER: 
   ULTIMATE SIZE & ALIGNMENT LOCK
   -------------------------------
   Ensures About text, Links, and Support text have the exact same 
   perceptual size and weight.
*/

.site-footer {
    background: #1a1a1a !important;
}

/* 1. Global Baseline Reset (15px) */
html body .site-footer p,
html body .site-footer div,
html body .site-footer .footer-links a,
html body .site-footer ul li a {
    font-size: 14.5px !important;
    /* Slightly reduced for a cleaner, unified look */
    line-height: 1.6 !important;
    /* Tighter line height for the "compact" feel */
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 500 !important;
    letter-spacing: 0px !important;
    /* Forces normal text spacing */
    text-decoration: none !important;
}

/* 2. One-Line Link Maintenance (Legal) */
.footer-links a {
    white-space: nowrap !important;
    display: block !important;
}

/* 3. Heading Refinement */
.site-footer h3,
.site-footer h4 {
    color: var(--ukvisit-accent) !important;
    font-size: 15px !important;
    /* Matches the visual weight of the body content */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    margin: 0 0 25px 0 !important;
}

/* 4. Support Email Emphasis (Override only color/weight) */
.site-footer a[href^="mailto:"] {
    color: var(--ukvisit-accent) !important;
    font-weight: 700 !important;
}

/* 9. Mobile Responsiveness Overhaul - ELITE FIX */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 15px !important;
        text-align: center !important;
    }

    .site-footer .container {
        flex-direction: column !important;
        gap: 30px !important;
        align-items: center !important;
        width: 100% !important;
    }

    .footer-col {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .footer-links a {
        white-space: normal !important;
        display: block !important;
        padding: 5px 0 !important;
    }

    /* FIX CONTAINER PADDING - BALANCED Breathing Room */
    .container {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* GLOBAL MOBILE SPACING REDUCTION (Overrides aggressive 0px) */
    .site-main { padding: 15px 15px !important; }
    .site-main .container { padding: 0 !important; } /* Stop double padding on archives */
    .archive-main-header { padding-top: 5px !important; margin-bottom: 25px !important; margin-top: 5px !important; }
    .page-main-layout, .blog-post-page { padding: 15px 0 !important; }
    
    /* Correct Inner White Box Paddings (Prevents .container from squashing to 0) */
    .page-content-wrapper { padding: 30px 20px !important; margin-top: 15px !important; }
    .blog-content-wrapper { padding: 30px 20px !important; }
    
    /* Suppress massive inline margin-bottoms */
    .entry-header { margin-bottom: 20px !important; }
    .entry-header h1 { margin-top: 0 !important; }
    
    /* Single Post Title Fix */
    .entry-title {
        font-size: 1.6rem !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
        line-height: 1.2 !important;
    }
    /* Single Post Content Padding Fix - Balanced 20px */
    .blog-content-wrapper {
        padding: 20px 20px !important;
        border-radius: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Force Sidebar Below Content */
    .main-layout-container {
        flex-direction: column !important;
        gap: 30px !important;
        padding: 0 15px !important;
    }
    .sidebar-container {
        width: 100% !important;
        padding: 0 !important;
    }

    .latest-blog {
        padding: 40px 0 !important;
        width: 100% !important;
    }
    .latest-blog .container {
        padding: 0 !important; /* Let children handle padding */
    }
    .blog-list {
        gap: 15px !important;
        padding: 0 !important;
    }
    .blog-item {
        padding: 25px 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Category Grid Fix */
    .top-categories div[style*="display: flex"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 15px !important;
    }
    .top-categories div[style*="display: flex"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 10px !important;
    }
    .top-categories a {
        padding: 15px 10px !important;
        font-size: 13px !important; /* SLIGHTLY SMALLER TO FIT */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        min-height: 60px !important;
        border: 2px solid rgba(255,255,255,0.2) !important; /* Premium border */
    }

    /* Expert Pick (David Lawson) Alignment & Gaps */
    .expert-pick {
        padding: 40px 0 !important;
        margin: 0 !important;
        background: #fff !important;
    }
    .expert-pick .container {
        padding: 40px 20px !important; /* Forces internal 20px gap */
        border-radius: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-left: 8px solid var(--ukvisit-primary) !important;
    }

    /* Trusted Reviews Product Card Image Expansion */
    .product-card {
        padding: 0 0 20px 0 !important; /* Remove horizontal padding from the card */
        overflow: hidden !important;
    }
    .product-card div[style*="background: #f9f9f9"] {
        padding: 0 !important; /* ELIMINATE GAPS AROUND IMAGE */
        margin: 0 0 20px 0 !important;
        height: 220px !important; /* Increase height for better view */
        border-radius: 0 !important; /* Edge-to-edge look for image container */
        width: 100% !important;
    }
    .product-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    .product-card h3, .product-card p {
        padding: 0 20px !important;
        text-align: center !important;
    }

    .product-card a.read-review-btn, .product-card a[style*="background: var(--ukvisit-primary)"] {
        display: inline-block !important;
        background: var(--ukvisit-primary) !important;
        color: #fff !important;
        padding: 15px 35px !important;
        border-radius: 50px !important;
        text-decoration: none !important;
        font-weight: 800 !important;
        margin: 20px auto !important;
        width: auto !important;
        min-width: 180px !important;
        text-align: center !important;
    }

    /* Latest Buying Guides & Blog List Alignment */
    .latest-blog {
        padding: 40px 0 !important;
        margin: 0 !important;
        background: #fafaf8 !important; /* Force background to prevent gaps */
    }
    .latest-blog .container {
        text-align: center !important;
        padding: 0 !important;
    }
    .latest-blog h2 {
        text-align: center !important;
        margin-bottom: 30px !important;
    }
    .latest-blog .blog-list {
        gap: 20px !important;
        padding: 0 !important;
    }
    .latest-blog .blog-item {
        padding: 25px 20px !important; /* REDUCED FROM 40px FOR BETTER MOBILE VIEW */
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        border-radius: 15px !important;
    }
    .latest-blog .blog-item img {
        margin-bottom: 20px !important;
        border-radius: 12px !important;
        width: 100% !important;
        height: 220px !important; /* FORCE WIDE HORIZONTAL LOOK */
        object-fit: cover !important; /* PREVENT SQUASHING */
    }

    /* Sidebar Alignment & Floating Card Layout */
    .sidebar-area {
        background: transparent !important; /* Total transparency for parent */
        padding: 0 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .widget-ukvisit {
        background: #fff !important;
        border-radius: 20px !important;
        padding: 30px 20px !important;
        margin-bottom: 35px !important; /* DEFINITIVE GAP BETWEEN CARDS */
        box-shadow: 0 5px 20px rgba(0,0,0,0.03) !important;
        text-align: left !important;
        border: 1px solid #f0f0f0 !important;
    }

    .widget-ukvisit h3 {
        text-align: left !important;
        margin: 0 0 20px 0 !important;
        padding: 0 !important;
        width: 100% !important;
        display: block !important;
    }

    .sidebar-post-item {
        margin-left: 0 !important;
        padding-left: 0 !important;
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
        margin-bottom: 15px !important;
    }

    .sidebar-post-item img {
        margin-left: 0 !important;
        margin-right: 15px !important;
    }

    .sidebar-post-item h4 {
        margin: 0 !important;
        text-align: left !important;
    }

    .sidebar-pro-tip {
        margin-top: 10px !important;
        margin-bottom: 50px !important; /* GAP BEFORE FOOTER */
        border-radius: 20px !important;
        padding: 40px 25px !important;
        width: 100% !important; /* FORCE FULL WIDTH OF PARENT */
        box-sizing: border-box !important;
    }

    /* Universal Footer Gap */
    .site-footer {
        margin-top: 0 !important; /* Combined with sidebar margin for clean gap */
    }
    /* Search Result Card (Forced Vertical) */
    .search-result-card {
        background: #fff !important;
        padding: 0 !important;
        border-radius: 20px !important;
        margin-bottom: 40px !important;
        box-shadow: 0 5px 20px rgba(0,0,0,0.03) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        text-align: center !important;
        border: 1px solid #f0f0f0 !important;
    }

    .search-result-card .result-thumb {
        height: 220px !important;
        width: 100% !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

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

    .search-result-card .result-content {
        padding: 30px 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .search-result-card .result-title {
        font-size: 1.6rem !important;
        font-weight: 900 !important;
        margin-bottom: 15px !important;
        text-align: center !important;
    }

    /* Expert Series & Homepage Sections - MOBILE ONLY LOCK */
    .pillar-showcase, .expert-pick, .comp-chart, .latest-blog {
        padding: 40px 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .pillar-showcase img {
        margin-bottom: 0 !important;
        border-radius: 20px 20px 0 0 !important;
    }
    .expert-badge {
        margin-top: 15px !important; /* POSITIVE MARGIN FOR DESKTOP */
        display: inline-block !important;
        margin-bottom: 20px !important;
        z-index: 10 !important;
    }
    .pillar-showcase .container {
        padding: 0 !important;
    }
    .pillar-showcase .result-content {
        padding-top: 20px !important;
    }


    /* Expert Series (Centered Style) - FINAL LOCK */
    .pillar-showcase {
        padding: 60px 0 !important;
        margin: 0 !important;
        background-color: #f4f7f2 !important; 
    }
    
    .result-cat {
        color: var(--ukvisit-accent) !important;
        font-weight: 800 !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        margin-bottom: 10px !important;
    }
    .read-more-link {
        color: var(--ukvisit-primary) !important;
        font-weight: 800 !important;
        text-decoration: none !important;
        font-size: 14px !important;
        text-transform: uppercase !important;
        margin-top: 15px !important;
    }

    /* Sidebar Footer Gap & Alignment Fix */
    .site-footer {
        margin-top: 60px !important; /* BREATHING ROOM */
    }
    .sidebar-area {
        padding: 0 15px !important;
    }
    .widget-ukvisit h3 {
        text-align: left !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
    .sidebar-post-item {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    /* Sidebar Mobile Polish (Alignment & Gaps) */
    .sidebar-area {
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    .widget-ukvisit {
        margin-bottom: 25px !important; /* GAP BETWEEN SIDEBAR CARDS */
        padding: 25px 20px !important;
        text-align: left !important;
    }
    .widget-ukvisit h3 {
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
        text-align: left !important;
    }
    .sidebar-posts-list {
        padding: 0 !important;
        margin: 0 !important;
    }
    .sidebar-post-item {
        margin-bottom: 15px !important;
        display: flex !important;
        align-items: center !important;
        text-align: left !important;
    }
    
    /* Pro-Tip & Footer Gaps */
    .sidebar-pro-tip {
        margin-bottom: 40px !important; /* BREATHING ROOM BEFORE FOOTER */
        padding: 40px 25px !important;
    }
    
    /* Search Bar Logic */
    .search-guides-sidebar {
        padding: 0 !important;
        text-align: left !important;
    }
    .pillar-showcase .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 0 20px !important;
        gap: 0 !important;
    }
    .pillar-showcase div[style*="flex: 1 1 400px"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        flex: none !important; /* KILLS THE 400px STRETCH */
        max-width: 100% !important;
        width: auto !important;
        padding-top: 15px !important; 
    }
    .pillar-showcase h2 {
        text-align: center !important;
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 0 !important;
    }
    .pillar-showcase .pro-tip-badge, .pillar-showcase span[style*="background: var(--ukvisit-accent)"] {
        margin: 0 auto 20px auto !important;
        display: inline-block !important;
    }

    /* Trusted Reviews Product Card Polish */
    .product-card {
        padding: 0 0 25px 0 !important;
        margin-bottom: 30px !important;
    }

    /* Trusted Reviews Spacing */
    .featured-products {
        padding: 40px 0 !important;
    }
    .featured-products .container {
        padding: 0 !important;
    }
    .product-grid {
        padding: 0 !important;
        gap: 20px !important;
    }
    


    /* Newsletter White Space & Input Fix - COMBINED ALIGNMENT & GAP REMOVAL */
    .newsletter {
        padding: 50px 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background-color: var(--ukvisit-accent) !important;
        display: block !important;
    }
    .newsletter .container {
        padding: 0 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
    }
    .newsletter form {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
    .newsletter input[type="email"] {
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important; /* PREVENT OVERFLOW */
        border-radius: 10px !important;
        border: none !important;
        padding: 15px 20px !important;
    }
    .newsletter button {
        width: 100% !important;
        border-radius: 10px !important;
    }
    
    /* Pull Footer UP to overlap newsletter by 1px to hide white line */
    .site-footer {
        margin-top: -1px !important; 
        padding-top: 40px !important;
        background-color: #1a1a1a !important;
        position: relative !important;
        z-index: 2 !important;
        border-top: none !important;
    }

    /* Heading Padding */
    h2 {
        padding: 0 20px 0 0 !important; /* RIGHT PADDING ONLY, REMOVED LEFT GAP */
        margin-bottom: 25px !important;
        line-height: 1.2 !important;
    }
} /* END MOBILE MEDIA QUERY */

/* --- NEW SIDEBAR STYLES --- */
.widget {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.widget-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--ukvisit-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--ukvisit-accent);
    display: inline-block;
    padding-bottom: 5px;
}
.sidebar-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}
.sidebar-thumb {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}
.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-post-item a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
}
.pro-tip-widget {
    background: linear-gradient(135deg, var(--ukvisit-accent), #ffb347);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(255,153,0,0.2);
    border: none;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.pro-tip-badge {
    color: #000;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.3);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
}
.pro-tip-text {
    color: #000;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 20px;
}
.pro-tip-btn {
    background: #000;
    color: #fff;
    padding: 12px 25px;
    display: inline-block;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
}
/* --- END SIDEBAR STYLES --- */

/* Social Icon Hover */
.footer-social a:hover {
    background: var(--ukvisit-accent) !important;
    color: #000 !important;
    transform: translateY(-3px);
}

/* 5. Column Distribution */
@media (min-width: 769px) {
    .site-footer .container {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        gap: 40px !important;
    }

    /* 6. Fix widths for consistent alignment */
    .footer-col:first-child { flex: 0 0 300px !important; }
    /* Fixed About width */
    .footer-col:nth-child(2) { flex: 0 0 150px !important; }
    /* Compact Nav width */
    .footer-col:nth-child(3) { flex: 0 0 320px !important; }
    /* Wide enough for Legal on 1 line */
    .footer-col:nth-child(4) { flex: 0 0 200px !important; }
}

@media (max-width: 768px) {
    .footer-col:first-child { flex: 0 0 30px !important; }
    .footer-col:nth-child(3) { flex: 0 0 30px !important; }
    .footer-col:nth-child(4) { flex: 0 0 30px !important; }
}

/* Compact Support width */

/* 8. Footer Bottom / Copyright Spacing - REFINDED */
.footer-bottom {
    margin-top: 35px !important; /* Balanced gap after the line */
    padding-top: 5px !important;
}

.footer-bottom p {
    color: rgba(255,255,255,0.4) !important;
    font-size: 13px !important;
}

/* 7. Hover Interaction */
.footer-links a:hover {
    color: var(--ukvisit-accent) !important;
    padding-left: 2px !important;
}