/*
Theme Name: GeneratePress
Theme URI: https://truefixguides.com
Description: A premium, clean tech-focused theme.
Author: TrueFixGuides
Version: 4.0
*/

:root {
    /* Premium Palette */
    --primary: #0F62FE;
    /* IBM Blue - Professional Tech */
    --primary-hover: #0353E9;
    --secondary: #393939;
    --dark-bg: #161616;
    --light-bg: #F4F7F6;
    --white: #ffffff;

    /* Text Colors */
    --text-main: #161616;
    --text-muted: #525252;
    --text-light: #6F6F6F;

    /* Accents */
    --accent-success: #198038;
    --accent-warning: #F1C21B;
    --accent-error: #DA1E28;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 72px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    --blur: blur(12px);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

/* Header (Premium Sticky) */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 72px;
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* Brand & Logo */
.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.logo-highlight {
    color: var(--primary);
}

/* Desktop Nav & Dropdowns */
.desktop-nav {
    flex: 1;
}

.desktop-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-menu>li>a {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 0;
    display: inline-block;
}

.desktop-menu>li>a:hover {
    color: var(--primary);
}

/* Dropdown Logic */
.menu-item-has-children {
    position: relative;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    padding: 8px 0;
    z-index: 1100;
    list-style: none;
    /* FIX: Scrollable dropdown if too many items */
    max-height: 400px;
    overflow-y: auto;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-left: 2px solid transparent;
}

.sub-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Header Search (Pill Style) */
.header-search {
    flex-basis: 300px;
}

.header-search form {
    background: var(--light-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.header-search form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.1);
    background: var(--white);
}

.header-search input {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    padding: 6px;
    width: 100%;
    outline: none;
    font-family: var(--font-primary);
}

.header-search button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
}

.header-search button:hover {
    color: var(--primary);
}

/* Burger Menu (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* Mobile Navigation Overlay (Hidden by Default) */
.mobile-nav-overlay {
    position: fixed;
    top: 72px;
    /* Below header */
    left: 0;
    width: 100%;
    height: calc(100vh - 72px);
    background: var(--white);
    z-index: 999;
    transform: translateX(-100%);
    /* Slide out by default */
    transition: transform 0.3s ease-in-out;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: none;
    /* Completely hide on desktop to prevent ghosting */
}

.mobile-nav-overlay.active {
    transform: translateX(0);
}

.mobile-nav-inner {
    padding: 2rem;
    overflow-y: auto;
    height: 100%;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
}

.mobile-nav-links li {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding-bottom: 0.5rem;
}

.mobile-nav-links a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

.mobile-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.mobile-spacer {
    height: 20px;
    border: none !important;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .mobile-nav-overlay {
        display: block;
        /* Enabled for transform animation */
    }

    .desktop-nav {
        display: none;
    }

    .header-search {
        display: none;
        /* Hide top search on mobile, maybe restore in drawer later */
    }

    .menu-toggle {
        display: flex;
    }

    .brand-wrapper {
        flex: 1;
        justify-content: space-between;
        /* Burger left, Logo right or center? */
        flex-direction: row-reverse;
        /* Put burger on right? Or standard left. User layout implies Burger Left. */
        justify-content: flex-start;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(15, 98, 254, 0.9), rgba(0, 29, 108, 0.95)), url('https://truefixguides.com/wp-content/uploads/2026/01/hero-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}



.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Search Bar (Hero) */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-container form {
    display: flex;
    background: var(--white);
    padding: 6px;
    border-radius: 50px;
    /* Pill shape */
    box-shadow: var(--shadow-lg);
}

.search-container input {
    flex: 1;
    border: none;
    padding: 0 24px;
    font-size: 1rem;
    outline: none;
    font-family: var(--font-primary);
}

.search-container button {
    background: var(--primary);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.search-container button:hover {
    background: var(--primary-hover);
}

/* Footer Container */
.site-footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 80px 0 30px;
    margin-top: 60px;
}

/* Trust Badges (Footer) */
.trust-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.trust-badge svg {
    color: var(--primary);
    /* Icon color */
}

/* Footer Main Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Footer Brand Column */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo span {
    color: var(--primary);
}

.footer-description {
    font-size: 0.95rem;
    color: #a1a1a1;
    /* Muted text */
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-disclaimer small {
    font-size: 0.8rem;
    color: #666;
    display: block;
    line-height: 1.5;
}

/* Footer Links Re-style */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #a1a1a1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

/* Footer Bottom Strip */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    margin-top: 0;
    /* Reset margin as grid handles gap */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Lighter border */
}

.footer-bottom p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: #666;
    margin: 0 5px;
}

.footer-bottom a:hover {
    color: #888;
}

/* Category Grid (Start Here) */
.category-grid,
.brand-grid,
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Unified Card Styling (Categories, Brands, Software) */
.category-card,
.brand-card,
.software-card {
    background: var(--white);
    border-radius: 12px;
    padding: 0;
    /* REMOVED PADDING for full-bleed image */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    color: inherit;
    overflow: hidden;
    /* Ensures image rounded top */
}

.category-image-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    /* Square to show full generated icon */
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-card:hover .category-hero-img {
    transform: scale(1.05);
}

.category-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-card:hover,
.brand-card:hover,
.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(15, 98, 254, 0.2);
}

.category-card h3,
.brand-card h3,
.software-card h3,
.card-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin: 0 0 15px 0;
    font-weight: 700;
}

.category-card p,
.brand-card p,
.software-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Link Arrow Effect for all cards */
.category-link,
.brand-count {
    font-weight: 600;
    color: var(--primary) !important;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.category-link::after,
.brand-count::after {
    content: '→';
    margin-left: 6px;
    transition: transform 0.2s;
}

.category-card:hover .category-link::after,
.brand-card:hover .brand-count::after,
.software-card:hover .category-link::after {
    transform: translateX(4px);
}

/* Articles Grid (Homepage) */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

article {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

article:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(15, 98, 254, 0.2);
}

.article-image {
    width: 100%;
    height: 200px;
    /* FIXED HEIGHT prevents big images */
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image fills box without stretching */
    transition: transform 0.3s;
}

article:hover .article-image img {
    transform: scale(1.05);
}

article h3 {
    font-size: 1.15rem;
    padding: 20px 20px 10px;
    margin: 0;
    line-height: 1.4;
}

article h3 a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

article h3 a:hover {
    color: var(--primary-hover);
}

article p {
    padding: 0 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-meta {
    padding: 15px 20px;
    font-size: 0.85rem;
    color: #888;
    background: #f9fafb;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
    font-weight: 500;
}

article {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

article:hover .article-image img {
    transform: scale(1.05);
}

article h3 {
    font-size: 1.25rem;
    padding: 20px 20px 10px;
    margin: 0;
}

article h3 a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

article h3 a:hover {
    color: var(--primary);
}

article p {
    padding: 0 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    /* Push meta to bottom */
}

.article-meta {
    padding: 10px 20px 20px;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }

    .hero {
        padding: 60px 0;
    }

    h1 {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .main-navigation {
        display: none;
        /* Add JS toggle later if needed, or simple scrolling menu */
    }

    /* Fallback for simple mobile menu if not using JS toggle */
    .hero h1 {
        font-size: 2.25rem;
    }
}

/* 404 & Search Results */
.error-404 {
    text-align: center;
    padding: 100px 0;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.05);
    line-height: 1;
}

.page-title {
    text-align: center;
    margin-bottom: 60px;
}

/* Single Post Specifics */
.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.entry-content h2 {
    margin-top: 2.5rem;
}

.entry-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

/* =========================================
   NEW PREMIUM PAGES STYLING (About, Contact, Legal)
   ========================================= */

/* --- ABOUT PAGE --- */
.about-page-wrapper,
.contact-page-wrapper,
.legal-page-wrapper {
    background-color: var(--white);
}

.about-hero,
.contact-hero {
    background: linear-gradient(135deg, #f0f4f8 0%, #fff 100%);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative background circle */
.about-hero::before,
.contact-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(15, 98, 254, 0.03) 0%, transparent 70%);
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-subtitle {
    display: inline-block;
    background: rgba(15, 98, 254, 0.1);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: -webkit-linear-gradient(45deg, #333, #000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-content-container {
    padding-top: 60px;
    padding-bottom: 80px;
    max-width: 900px;
}

/* About Values Grid */
.about-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.value-card {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border-color: rgba(15, 98, 254, 0.2);
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: #f4f7f6;
    display: inline-flex;
    width: 60px;
    height: 60px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.value-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.value-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* --- CONTACT PAGE --- */
.contact-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: -60px;
    /* Overlap Hero */
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
}

.contact-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Stronger shadow for floating effect */
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.contact-card h3 {
    margin-bottom: 15px;
}

.contact-card .button-text {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid rgba(15, 98, 254, 0.2);
    padding-bottom: 2px;
    font-size: 0.95rem;
}

.contact-card .button-text:hover {
    border-color: var(--primary);
}

.contact-form-section {
    max-width: 700px;
    margin: 0 auto 80px;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 20px;
}

/* --- LEGAL PAGES (Unified) --- */
.legal-container {
    max-width: 800px;
    margin: 60px auto 100px;
    padding: 0 24px;
}

.legal-article {
    background: var(--white);
}

.legal-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.legal-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 4px 12px;
    border-radius: 50px;
}

.legal-title {
    font-size: 3rem;
    margin-bottom: 15px;
    letter-spacing: -1.5px;
}

.updated-label {
    font-weight: 600;
    color: var(--text-main);
}

.legal-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

.legal-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
}

.legal-content h2 {
    font-size: 1.6rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.legal-content ul,
.legal-content ol {
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

.legal-content li {
    margin-bottom: 10px;
}

.legal-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- MOBILE RESPONSIVENESS (SPECIFIC) --- */
@media (max-width: 900px) {

    .about-values-grid,
    .contact-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    .about-values-grid,
    .contact-options-grid {
        grid-template-columns: 1fr;
        /* Stack vertically */
    }

    .contact-options-grid {
        margin-top: -30px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .legal-title {
        font-size: 2rem;
    }

    .contact-form-section {
        padding: 20px;
    }

    .value-card {
        padding: 20px;
    }
}

/* Footer See More Link */
.footer-see-more {
    color: var(--primary) !important;
    font-weight: 700;
    margin-top: 8px;
    display: inline-block;
    transition: all 0.2s ease;
}

.footer-see-more:hover {
    color: var(--white) !important;
    padding-left: 5px;
}

/* ==========================================================================
   ROUND 2: ULTRA-PREMIUM "TECH-BENTO" DESIGN SYSTEM
   Override everything for the specific pages.
   ========================================================================== */

:root {
    /* Brand - Electric Blue & Deep Midnight */
    --p2-brand: #2563EB;
    /* Vivid Blue */
    --p2-brand-dark: #1E40AF;
    /* Deep Blue */
    --p2-dark: #0F172A;
    /* Slate 900 */
    --p2-darker: #020617;
    /* Slate 950 */
    --p2-surface: #F8FAFC;
    /* Slate 50 */
    --p2-border: #E2E8F0;
    /* Slate 200 */
    --p2-text-main: #0F172A;
    --p2-text-muted: #64748B;

    /* Spacing & Layout */
    --p2-container: 1400px;
    /* Wider standard */
    --p2-radius: 24px;
    /* Super rounded */

    /* Typography */
    --font-heading: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- Breakout Utility (Force Full Width inside locked container) --- */
.full-width-breakout {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: 0;
    padding-right: 0;
}

/* --- Premium Wrapper (Scoped Reset) --- */
.premium-wrapper {
    font-family: var(--font-heading);
    color: var(--p2-text-main);
    background: var(--white);
    overflow-x: hidden;
    /* Prevent scrollbar from 100vw hack */
}

.premium-wrapper h1,
.premium-wrapper h2,
.premium-wrapper h3 {
    letter-spacing: -0.04em;
    /* Tight, modern tracking */
    line-height: 1.1;
}

.premium-wrapper p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--p2-text-muted);
}

/* --- COMPONENTS: Bento Cards --- */
.bento-grid {
    display: grid;
    gap: 24px;
}

.bento-card {
    background: #fff;
    border: 1px solid var(--p2-border);
    border-radius: var(--p2-radius);
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Subtle start */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- PAGE: ABOUT (Massive Hero) --- */
.p2-hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    text-align: center;
    padding: 100px 20px;
}

.p2-hero-title {
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 0.95;
    background: linear-gradient(180deg, var(--p2-text-main) 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}

.p2-hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

/* --- PAGE: CONTACT (Split Layout) --- */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.split-dark {
    background: var(--p2-darker);
    color: white;
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-light {
    background: var(--p2-surface);
    padding: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.split-dark h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 30px;
}

.contact-email-giant {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--p2-brand);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
    margin-top: auto;
}

.contact-email-giant:hover {
    border-color: var(--p2-brand);
}

/* --- PAGE: LEGAL (Reader Mode) --- */
.legal-reader-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    /* Sidebar + Content */
    gap: 60px;
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 24px;
    align-items: start;
}

.legal-sidebar {
    position: sticky;
    top: 100px;
    padding: 24px;
    background: var(--p2-surface);
    border-radius: 12px;
}

.legal-content-area {
    font-family: 'Merriweather', serif;
    /* Trustworthy serif for reading */
    font-size: 1.1rem;
    color: #334155;
    line-height: 1.9;
}

.legal-content-area h2 {
    font-family: var(--font-heading);
    margin-top: 3rem;
    font-size: 2rem;
}

/* --- MOBILE OVERRIDES (Round 2) --- */
@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .legal-reader-layout {
        grid-template-columns: 1fr;
        /* Stack sidebar */
    }

    .legal-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 40px;
    }

    .split-dark,
    .split-light {
        padding: 40px 24px;
    }

    .p2-hero-title {
        font-size: 3.5rem;
    }

    /* Restore GeneratePress container behavior if breakout fails */
    .full-width-breakout {
        width: 100%;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
    }
}

/* ==========================================================================
   ROUND 3: SAFE & CLEAN DESIGN (Standard Container Model)
   Focus: Readability, Standard Layouts, No Hacks.

/* ==========================================================================
   ROUND 5: STANDARD PREMIUM DESIGN (Final Polish)
   Focus: Stability, Cleanlines, Standard Web Best Practices.
   ========================================================================== */

:root {
    --r5-bg: #f9f9f9;
    /* Very light grey background */
    --r5-white: #ffffff;
    --r5-text: #222222;
    /* Almost black for reading */
    --r5-text-light: #555555;
    --r5-accent: #0066cc;
    /* Trustworthy Blue */
    --r5-border: #eeeeee;
    --r5-container: 1100px;
    /* Standard readable width */
}

/* --- Global Wrapper --- */
.r5-wrapper {
    background-color: var(--r5-bg);
    color: var(--r5-text);
    font-family: 'Inter', sans-serif;
    /* Preserving user's font choice */
    padding-bottom: 60px;
}

/* --- Container --- */
.r5-container {
    max-width: var(--r5-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Hero --- */
.r5-hero {
    background: var(--r5-white);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid var(--r5-border);
    margin-bottom: 40px;
}

.r5-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111;
    letter-spacing: -0.5px;
}

.r5-hero p {
    font-size: 1.1rem;
    color: var(--r5-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Content Card --- */
.r5-content-card {
    background: var(--r5-white);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    /* Very subtle shadow */
}

/* Typography inside card */
.r5-content-card h2 {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    color: #111;
}

.r5-content-card p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: #333;
}

.r5-content-card ul {
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

.r5-content-card li {
    margin-bottom: 0.5rem;
}

/* --- Contact Grid --- */
.r5-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.r5-contact-item {
    background: var(--r5-white);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--r5-border);
    transition: transform 0.2s;
}

.r5-contact-item:hover {
    transform: translateY(-2px);
    border-color: var(--r5-accent);
}

.r5-icon {
    font-size: 24px;
    margin-bottom: 15px;
    display: block;
}

.r5-btn {
    display: inline-block;
    margin-top: 10px;
    color: var(--r5-accent);
    font-weight: 600;
    text-decoration: none;
}

/* --- Footer (Round 5 - Clean & Dark) --- */
.site-footer-r5 {
    background-color: #1a1a1a;
    color: #cccccc;
    padding: 60px 0 30px;
    font-size: 0.95rem;
}

.footer-r5-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}

.footer-r5-col h4 {
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-r5-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-r5-col li {
    margin-bottom: 12px;
}

.footer-r5-col a {
    color: #bbbbbb;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-r5-col a:hover {
    color: #ffffff;
}

.footer-r5-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

@media (max-width: 768px) {
    .footer-r5-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }


    .r5-content-card {
        padding: 25px;
    }
}

/* 
   --------------------------------------------------------------
   NUCLEAR OVERRIDE: HIDE DEFAULT THEME FOOTER GLOBALLY
   --------------------------------------------------------------
   We are hiding the default GeneratePress footer (.site-footer) 
   because we have injected a custom "Nuclear" footer via functions.php.
*/
.site-footer,
.site-info,
.footer-widgets {
    display: none !important;
}

/* Ensure the wrapper respects the new layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#page {
    flex: 1;
    /* Pushes footer to bottom */
}

/* =========================================
   MAGAZINE / BLOG LAYOUT STYLES (UPSICAST STYLE)
   ========================================= */

:root {
    --gap-md: 28px;
    --sidebar-width: 340px;
    --border-light: 1px solid rgba(0, 0, 0, 0.08);

    /* Category Colors - Vibrant & Modern */
    --cat-tech: #3B82F6;
    --cat-guides: #10B981;
    --cat-news: #F59E0B;
    --cat-reviews: #8B5CF6;
    --cat-default: #6B7280;

    /* Typography Scale - Bold & Impactful */
    --text-featured: clamp(2.5rem, 5vw, 3.8rem);
    --text-large: 1.9rem;
    --text-medium: 1.25rem;
    --text-body: 1.1rem;
    --text-small: 0.85rem;

    /* Shadows - Modern & Subtle */
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* 2-Column Layout (Main + Sidebar) */
.magazine-container {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
    margin-top: 40px;
    padding-bottom: 60px;
}

@media (max-width: 992px) {
    .magazine-container {
        grid-template-columns: 1fr;
    }
}

/* FEATURED POST (Top of Home) - BOLD & MODERN */
.featured-hero-section {
    padding: 0 0 50px;
    margin-bottom: 40px;
}

.featured-post-card {
    position: relative;
    border-radius: 0;
    /* Sharp edges for modern look */
    overflow: hidden;
    height: 500px;
    box-shadow: var(--shadow-card-hover);
    transition: transform 0.3s ease;
}

.featured-post-card:hover {
    transform: translateY(-2px);
}

.featured-post-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-post-card:hover .featured-post-bg {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    padding: 50px 40px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.featured-cat {
    display: inline-block;
    background: var(--cat-guides);
    color: white;
    font-size: var(--text-small);
    font-weight: 800;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 0;
    /* Sharp edges */
    margin-bottom: 20px;
    align-self: flex-start;
    letter-spacing: 1px;
}

.featured-title {
    font-size: var(--text-featured);
    /* HUGE - 3.5rem */
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.02em;
}

.featured-title a {
    color: white;
    text-decoration: none;
}

.featured-meta {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

@media (max-width: 768px) {
    .featured-post-card {
        height: 350px;
    }

    .featured-title {
        font-size: 1.5rem;
    }
}


/* LATEST POSTS GRID (Asymmetric Layout) */
.latest-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-md);
}

/* First 2 posts span 2 columns (large cards) */
.latest-posts-grid .news-card:nth-child(1),
.latest-posts-grid .news-card:nth-child(2) {
    grid-column: span 2;
}

/* Responsive: stack on mobile */
@media (max-width: 992px) {
    .latest-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .latest-posts-grid {
        grid-template-columns: 1fr;
    }

    .latest-posts-grid .news-card:nth-child(1),
    .latest-posts-grid .news-card:nth-child(2) {
        grid-column: span 1;
    }
}

/* News Card - BOLD & MODERN */
.news-card {
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: var(--shadow-card);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(0, 0, 0, 0.1);
}

.news-card-img-wrap {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover .news-card-img {
    transform: scale(1.1);
}

.news-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 12px;
    background: #ffffff;
}

.news-card-cat {
    display: inline-block;
    background: var(--cat-default);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 14px;
    margin-bottom: 8px;
    align-self: flex-start;
    letter-spacing: 1.2px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.news-card:hover .news-card-cat {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-card-title {
    font-size: var(--text-medium);
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.news-card:hover .news-card-title {
    color: var(--primary);
}

/* Large cards get bigger titles */
.latest-posts-grid .news-card:nth-child(1) .news-card-title,
.latest-posts-grid .news-card:nth-child(2) .news-card-title {
    font-size: var(--text-large);
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(var(--text-main), var(--text-main));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size .2s;
}

.news-card:hover .news-card-title a {
    background-size: 100% 1px;
    color: var(--primary);
}

.news-card-excerpt {
    display: none;
    /* Hidden for Upsicast clean style */
}

.news-card-meta {
    display: none;
    /* Hidden for Upsicast clean style */
}

/* Category Color Classes */
.cat-tech {
    background: var(--cat-tech) !important;
}

.cat-guides {
    background: var(--cat-guides) !important;
}

.cat-news {
    background: var(--cat-news) !important;
}

.cat-reviews {
    background: var(--cat-reviews) !important;
}

.cat-android {
    background: var(--cat-tech) !important;
}

.cat-windows {
    background: var(--cat-tech) !important;
}

.cat-mac {
    background: var(--cat-tech) !important;
}

.cat-software {
    background: var(--cat-guides) !important;
}

.cat-hardware {
    background: var(--cat-reviews) !important;
}


/* SIDEBAR STYLES */
.widget-area {
    width: 100%;
}

.sidebar-widget {
    margin-bottom: 40px;
}

.sidebar-heading {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    border-bottom: 2px solid var(--text-main);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: block;
}

/* Sidebar List Items */
.sidebar-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.sidebar-post-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    object-fit: cover;
    background: #eee;
}

.sidebar-post-content {
    flex: 1;
}

.sidebar-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.sidebar-post-title a {
    color: var(--text-main);
}

.sidebar-post-title a:hover {
    color: var(--primary);
}

.sidebar-post-date {
    font-size: 0.75rem;
    color: #999;
}


/* PAGINATION */
.pagination .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    margin: 0 4px;
    border-radius: 50%;
    background: #f5f5f5;
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--primary);
    color: white;
}


/* SINGLE POST TWEAKS */
.reference-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    margin-top: 40px;
}

@media (max-width: 900px) {
    .reference-layout-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ARCHIVE HEADER */
.archive-header {
    background: #f9f9f9;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
}

.archive-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}/* =========================================
   HOMEPAGE REDESIGN - CLEAN & MODERN
   ========================================= */

.homepage-wrapper {
    padding: 60px 0;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.view-all-link {
    font-size: 1rem;
    font-weight: 600;
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #2563EB;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .page-title {
        font-size: 2rem;
    }
}

/* Article Card */
.article-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Card Image */
.card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .card-image img {
    transform: scale(1.1);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Card Content */
.card-content {
    padding: 24px;
}

.card-badge {
    display: inline-block;
    background: var(--cat-default, #6B7280);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0;
    transition: color 0.2s;
}

.article-card:hover .card-title {
    color: #3B82F6;
}

/* Pagination */
.pagination-wrapper {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #3B82F6;
    color: white;
}

.pagination .current {
    background: #3B82F6;
    color: white;
}

/* No Posts */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2rem;
    color: #6B7280;
}
/* =========================================
   POPULAR POSTS SIDEBAR
   ========================================= */

/* Two Column Layout */
.homepage-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 50px;
    align-items: start;
}

@media (max-width: 1024px) {
    .homepage-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .popular-sidebar {
        order: -1;
        /* Move sidebar above content on mobile */
    }
}

/* Main Content Area */
.main-content {
    min-width: 0;
    /* Prevent grid blowout */
}

/* Popular Sidebar */
.popular-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #3B82F6;
}

/* Popular Posts List */
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popular-post-item {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 12px;
    transition: opacity 0.2s;
}

.popular-link:hover {
    opacity: 0.8;
}

/* Popular Thumbnail */
.popular-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.popular-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Popular Content */
.popular-content {
    flex: 1;
    min-width: 0;
}

.popular-number {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 900;
    color: #e0e0e0;
    margin-right: 8px;
}

.popular-badge {
    display: inline-block;
    background: var(--cat-default, #6B7280);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.popular-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-meta {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 4px;
}
/* =========================================
   HOMEPAGE REDESIGN - CLEAN & MODERN
   ========================================= */

.homepage-wrapper {
    padding: 60px 0;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.view-all-link {
    font-size: 1rem;
    font-weight: 600;
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #2563EB;
}

/* Articles Grid - Asymmetric Layout */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns inside main content */
    gap: 30px;
    margin-bottom: 60px;
}

/* First post is FEATURED - Spans 2 columns */
.articles-grid .article-card:nth-child(1) {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* Image left, content right */
    align-items: center;
    background: #111;
    /* Dark background for featured */
    color: white;
}

.articles-grid .article-card:nth-child(1) .card-image {
    height: 100%;
    min-height: 400px;
}

.articles-grid .article-card:nth-child(1) .card-content {
    padding: 40px;
}

.articles-grid .article-card:nth-child(1) .card-title {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 15px;
}

.articles-grid .article-card:nth-child(1) .card-title:hover {
    color: #3B82F6;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid .article-card:nth-child(1) {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .articles-grid .article-card:nth-child(1) .card-image {
        min-height: 250px;
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .page-title {
        font-size: 2rem;
    }
}

/* Article Card - BOLD & SHARP */
.article-card {
    background: #ffffff;
    border-radius: 0;
    /* SHARP CORNERS */
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Card Image */
.card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    background: #eee;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a1a, #4a4a4a);
}

/* Card Content */
.card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Bold Badges */
.card-badge {
    display: inline-block;
    background: var(--cat-default, #000);
    color: white;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 4px 10px;
    margin-bottom: 12px;
    align-self: flex-start;
    border-radius: 0;
    /* Sharp badge */
}

/* Bold Titles */
.card-title {
    font-size: 1.5rem;
    font-weight: 800;
    /* Extra Bold */
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0;
    transition: color 0.2s;
}

.article-card:hover .card-title {
    color: #2563EB;
    /* Blue on hover */
}

/* Pagination */
.pagination-wrapper {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #3B82F6;
    color: white;
}

.pagination .current {
    background: #3B82F6;
    color: white;
}

/* No Posts */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2rem;
    color: #6B7280;
}
/* =========================================
   HOMEPAGE REDESIGN - UPSICAST REPLICA (v9.0)
   ========================================= */

.homepage-wrapper {
    padding: 60px 0;
    background: #fff;
    /* Clean white background like Upsicast */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.view-all-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Article Card - Upsicast Style */
.article-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.2s;
    border: none;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Card Image - Rounded with Overlay */
.card-image {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    /* Notable rounding */
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.article-card:hover .card-image {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

/* Overlay Badge */
.overlay-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 10;
}

.upsicast-badge {
    display: flex;
    align-items: center;
    background: white;
    color: #1e293b;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 30px;
    /* Pill shape */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

.upsicast-badge::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233B82F6'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 6px;
}

/* Card Content: Title Below */
.card-content {
    padding: 0;
    /* No padding, just clean text layout */
}

.card-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
    color: #0f172a;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.article-card:hover .card-title {
    color: #3B82F6;
}

.card-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta Data - Upsicast Style */
.card-meta {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.published-badge {
    background: #166534;
    /* Dark Green */
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

/* Pagination */
.pagination-wrapper {
    grid-column: 1 / -1;
    margin-top: 30px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.pagination a,
.pagination span {
    padding: 10px 18px;
    background: #f1f5f9;
    border-radius: 8px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a:hover,
.pagination .current {
    background: #0f172a;
    color: white;
}

/* No Posts */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: #94a3b8;
}
/* =========================================
   FIX FIRST POST (V9.1) - Reset v8.0 Styles
   ========================================= */

/* Force first child to be a normal grid item */
.articles-grid .article-card:nth-child(1) {
    grid-column: auto !important;
    display: block !important;
    background: transparent !important;
    color: inherit !important;
    border: none !important;
    min-height: 0 !important;
}

/* Reset image inside first child */
.articles-grid .article-card:nth-child(1) .card-image {
    height: 220px !important;
    min-height: 0 !important;
    width: 100% !important;
}

/* Reset content padding */
.articles-grid .article-card:nth-child(1) .card-content {
    padding: 0 !important;
}

/* Reset title size */
.articles-grid .article-card:nth-child(1) .card-title {
    font-size: 1.25rem !important;
    /* Match standard size */
    color: #0f172a !important;
    margin-bottom: 10px !important;
}

.articles-grid .article-card:nth-child(1) .card-title:hover {
    color: #3B82F6 !important;
}

/* Ensure two-column layout is strict */
.articles-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr !important;
    }
}
/* =========================================
   MOBILE FIXES (V9.2) - Better User Experience
   ========================================= */

@media (max-width: 768px) {

    /* 1. Layout Stacking: Content FIRST, Sidebar SECOND */
    .homepage-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px !important;
    }

    .main-content {
        order: 1 !important;
        /* Show articles first */
        width: 100% !important;
    }

    .popular-sidebar {
        order: 2 !important;
        /* Sidebar below articles */
        width: 100% !important;
    }

    /* 2. Remove Sidebar Sticky on Mobile */
    .popular-sidebar {
        position: static !important;
    }

    /* 3. Better Spacing */
    .homepage-wrapper {
        padding: 20px 0 !important;
        /* Reduced vertical padding */
    }

    .articles-grid {
        gap: 20px !important;
        /* Smaller gap between cards */
        margin-bottom: 30px !important;
    }

    /* 4. Optimized Cards for Mobile */
    .article-card .card-image {
        height: 180px !important;
        /* Slightly shorter images */
        border-radius: 12px !important;
        /* Slightly smaller radius */
    }

    .article-card .card-title {
        font-size: 1.1rem !important;
        /* readable title size */
    }

    /* 5. Header adjustments */
    .page-header {
        margin-bottom: 20px !important;
        flex-direction: row;
        /* Keep row */
        align-items: center;
    }

    .page-title {
        font-size: 1.5rem !important;
    }
}
/* =========================================
   SINGLE POST STYLES (V9.2)
   ========================================= */

/* Header */
.entry-header {
    margin-bottom: 30px;
}

.entry-cat-badge {
    display: inline-block;
    color: #3B82F6;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-decoration: none;
}

.entry-title {
    font-size: 2.5rem;
    /* Massive title */
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 20px;
}

.entry-meta-header {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

.meta-sep {
    margin: 0 10px;
    color: #cbd5e1;
}

/* Featured Image */
.entry-image-wrapper {
    margin-bottom: 40px;
    border-radius: 16px;
    /* Replica rounded corners */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.entry-featured-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Content Typography */
.entry-content {
    font-size: 1.15rem;
    /* Larger readable text */
    line-height: 1.8;
    color: #334155;
    margin-bottom: 60px;
}

.entry-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 50px;
    margin-bottom: 20px;
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 40px;
    margin-bottom: 15px;
}

.entry-content p {
    margin-bottom: 24px;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 30px;
    padding-left: 20px;
}

.entry-content li {
    margin-bottom: 12px;
}

.entry-content img {
    border-radius: 12px;
    /* Content content images rounded too */
    max-width: 100%;
    height: auto;
    margin: 30px 0;
}

/* Author Box */
.author-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 60px;
    border: 1px solid #e2e8f0;
}

.author-box-avatar img {
    border-radius: 50%;
}

.author-box-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #0f172a;
}

.author-box-content p {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.author-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3B82F6;
    text-decoration: none;
}

/* Related Guides */
.related-guides-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 50px;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .entry-title {
        font-size: 1.8rem;
    }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
