/**
 * Blog Template Styling
 * Modern dark theme with matching premium landing page feel
 */

/* ===== BASE PAGE LAYOUT ===== */
html {
    height: 100%;
}

body.page:not(.pmpro-checkout),
body.single,
body.blog,
body.archive,
body.search,
body.error404,
body.template-page-about-us,
body.template-page-privacy-policy,
body.template-page-terms-and-conditions,
body.template-page-refund-policy,
body.template-page-disclaimer,
body.template-page-contact-us {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    background-color: #000000;
    font-family: 'Inter', system-ui, sans-serif;
    color: #ffffff;
    margin: 0;
}

/* Background Particles Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* Main Content Wrapper */
.wp-page-content,
.blog-post-container,
.page-container,
.legal-page-content {
    flex: 1 0 auto !important;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 24px 80px;
    /* Space for fixed header */
    position: relative;
    z-index: 1;
    display: block;
}

/* Footer Stickiness */
.site-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

/* ===== HEADER OVERRIDES (IF NEEDED) ===== */
/* Ensures header blends with dark theme if not using pmpro.css styles */
.page-header {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* ===== HERO / PAGE TITLE ===== */
.page-header-content {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.page-title-main {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== BLOG GRID ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

/* Blog Card */
.blog-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Card Image */
.blog-card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

/* Card Content */
.blog-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Meta Data */
.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Title */
.blog-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 15px;
}

.blog-card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card:hover .blog-card-title a {
    color: #818cf8;
}

/* Excerpt */
.blog-card-excerpt {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex: 1;
}

/* Button */
.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.2s;
}

.btn-text svg {
    transition: transform 0.2s;
}

.btn-text:hover {
    color: #818cf8;
    gap: 12px;
}

/* ===== PAGINATION ===== */
.post-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-links span.current {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

/* ===== SINGLE POST & PAGE CONTENT ===== */
.blog-post,
.page-content-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 60px;
    margin-bottom: 60px;
}

.post-content,
.page-content-main {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #e2e8f0;
}

.post-content h2,
.page-content-main h2 {
    font-size: 2rem;
    margin-top: 60px;
    margin-bottom: 24px;
    color: #ffffff;
}

.post-content p,
.page-content-main p {
    margin-bottom: 24px;
}

/* ===== 404 PAGE ===== */
.error-404-page {
    text-align: center;
    padding: 100px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-404-page h1 {
    font-size: 10rem;
    font-weight: 800;
    line-height: 1;
    margin: 0;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.8;
}

.error-404-page h2 {
    font-size: 2.5rem;
    margin: 20px 0;
    color: #ffffff;
}

.error-404-page p {
    color: #94a3b8;
    font-size: 1.25rem;
    margin-bottom: 40px;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    background: #ffffff;
    color: #000000;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-home:hover {
    transform: translateY(-2px);
    background: #e2e8f0;
}

/* ===== LEGAL PAGES PREMIUM STYLING ===== */
.legal-header {
    text-align: center;
    padding: 80px 24px 60px;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.legal-header .page-title-main {
    margin-bottom: 20px;
}

.last-updated {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 10px;
}

.legal-container {
    max-width: 900px !important;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 60px 50px !important;
    margin-bottom: 100px !important;
    position: relative;
    z-index: 2;
}

.legal-container .content-area {
    line-height: 1.9;
    font-size: 1.05rem;
    color: #cbd5e1;
}

.legal-container h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
}

.legal-container p {
    margin-bottom: 25px;
}

.legal-container ul,
.legal-container ol {
    margin-bottom: 30px;
    padding-left: 25px;
}

.legal-container li {
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .legal-header {
        padding: 60px 20px 40px;
    }

    .legal-container {
        padding: 40px 25px !important;
        margin-bottom: 60px !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        background: transparent;
    }

    .legal-container h3 {
        font-size: 1.3rem;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-title-main {
        font-size: 2.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .wp-page-content,
    .blog-post-container,
    .page-container {
        padding-top: 100px;
    }

    .blog-post,
    .page-content-wrapper {
        padding: 30px;
    }

    .error-404-page h1 {
        font-size: 6rem;
    }
}