/* Base project styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-body: #f8fafc;
    --card-bg: #ffffff;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

/* === GATE STYLES (REDESIGNED - CLEAN & MODERN) === */

/* Animation Keyframes */
@keyframes gateFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gateSlideUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gate-body-locked {
    overflow: hidden;
}

.gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75); /* Modern dark slate overlay */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 2rem 1rem;
    transition: opacity 0.4s ease;
    animation: gateFadeIn 0.6s ease-out forwards; /* Slow fade in */
}

.gate-overlay.gate-hidden {
    opacity: 0;
    pointer-events: none;
    animation: none;
}

.gate-frame {
    position: relative;
    width: min(440px, 92vw);
    background: #ffffff; /* Clean white background */
    border-radius: 16px;
    overflow: hidden;
    color: #1e293b; /* Dark text for readability */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: none; /* Remove old border */
    border-top: 6px solid #1279b4; /* Brand color accent on top */
    padding: 2rem 1.5rem 1.5rem;
    animation: gateSlideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* Elastic slow slide up */
    transform-origin: center bottom;
}

/* Progress bar styling update */
.gate-overlay.gate-processing .gate-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px; /* Match border-top height */
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    animation: gate-progress 1.5s infinite;
    z-index: 10;
}

.gate-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9; /* Light gray bg */
    color: #64748b; /* Gray icon */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 3000;
}

.gate-close-btn::before,
.gate-close-btn::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.gate-close-btn:hover,
.gate-close-btn:focus-visible {
    background: #e2e8f0;
    color: #ef4444; /* Red on hover */
    transform: rotate(90deg);
}

/* Artwork area - adjusted for light theme */
.gate-artwork {
    position: relative;
    border-radius: 12px;
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
    background: #f8fafc; /* Very light gray */
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.gate-artwork::after {
    display: none; /* Remove old overlay */
}

.gate-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    background: #1279b4;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.75rem;
    z-index: 100;
    border: none;
    box-shadow: 0 2px 4px rgba(18, 121, 180, 0.3);
}

.gate-step-indicator {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

.gate-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

/* Adjusted background blobs for light theme */
.gate-visual::before {
    width: 120px;
    height: 120px;
    background: rgba(18, 121, 180, 0.1);
    filter: blur(30px);
}

.gate-visual::after {
    width: 160px;
    height: 160px;
    background: rgba(56, 189, 248, 0.1);
    filter: blur(30px);
}

.gate-artwork-image {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: auto;
    max-height: 280px;
    border-radius: 8px;
    object-fit: contain; /* Ensure ads fit nicely */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.gate-logo {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #1279b4; /* Brand color text */
    text-shadow: none;
}

.gate-error {
    margin: 0 0 1rem;
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: 500;
    background: #fef2f2;
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
}

.gate-fallback-button {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    /* Use bootstrap-like styles if class not present, but usually is btn */
}

.gate-overlay .gate-fallback-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gate-content.gate-locked {
    filter: blur(0px); /* Keep logic, but maybe remove blur if desired */
    pointer-events: none;
    user-select: none;
}
/* === END GATE STYLES === */

/* === SINGLE POST STYLES === */
.post-article {
    position: relative;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
}

.post-metrics {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.post-views-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.post-views-icon {
    font-size: 1rem;
    line-height: 1;
}

.post-views-label {
    line-height: 1;
}
/* === END SINGLE POST STYLES === */


.jump-main {
    display: flex;
    justify-content: center;
}

.section-video {
    width: 100%;
    max-height: 78vh;
    background: #000;
    border-radius: 0.75rem;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.section-content {
    line-height: 1.7;
    white-space: pre-line;
}

@keyframes gate-progress {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 576px) {
    .gate-frame {
        padding: 1.5rem 1.25rem 1rem;
    }

    .gate-artwork {
        padding: 2.25rem 1.25rem 2rem;
    }

    .gate-close-btn {
        width: 42px;
        height: 42px;
        font-size: 1.6rem;
    }

    .post-title {
        font-size: 2rem;
    }

    .section-video {
        max-height: 65vh;
    }
}

/* Admin dashboard enhancements */
.admin-posts-table .actions-cell .action-buttons .action-form {
    margin: 0;
}

.admin-posts-table .actions-cell .action-buttons .action-form button {
    height: 100%;
}

@media (max-width: 768px) {
    .admin-posts-table {
        border-collapse: separate;
        border-spacing: 0 1rem;
    }

    .admin-posts-table thead {
        display: none;
    }

    .admin-posts-table tbody {
        display: block;
    }

    .admin-posts-table tr {
        display: block;
        margin-bottom: 1rem;
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 1rem;
        padding: 1rem 1rem 0.75rem;
        box-shadow: 0 14px 32px -18px rgba(15, 23, 42, 0.4);
    }

    .admin-posts-table tr:last-child {
        margin-bottom: 0;
    }

    .admin-posts-table td {
        display: block;
        width: 100%;
        padding: 0.35rem 0;
        border: none;
        text-align: left !important;
    }

    .admin-posts-table td+td {
        margin-top: 0.5rem;
    }

    .admin-posts-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #6c757d;
        margin-bottom: 0.15rem;
        font-weight: 600;
    }

    .admin-posts-table td[colspan]::before {
        display: none;
    }

    .admin-posts-table td.actions-cell {
        padding-top: 0.75rem;
    }

    .admin-posts-table td.actions-cell::before {
        margin-bottom: 0.5rem;
    }

    .admin-posts-table td.actions-cell .action-buttons {
        justify-content: flex-start !important;
    }

    .admin-posts-table td.actions-cell .action-buttons>* {
        flex: 1 1 100%;
    }

    .admin-posts-table td.actions-cell .action-buttons .btn,
    .admin-posts-table td.actions-cell .action-buttons .action-form button {
        width: 100%;
    }
}

/* Media input state */
.media-input-area.media-disabled {
    opacity: 0.6;
    pointer-events: none;
}


/* ==========================================================================
   NEW 2025 REDESIGN - Modern Clean Magazine Style
   ========================================================================== */

/* --- NEW HERO SECTION --- */
.app-main.home-hero {
    position: relative;
    max-width: 100%;
    width: 100%;
    margin-top: 0 !important;
    padding: clamp(5rem, 15vh, 9rem) 1rem;
    border-radius: 0;
    /* New Dark Blue Gradient */
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Subtle pattern overlay instead of Aurora */
.app-main.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#334155 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.1;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.app-main.home-hero .home-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
}

.home-hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
    /* Clean white text */
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.home-hero-message {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.6;
}

/* Remove old Orbits */
.home-hero-orbit {
    display: none;
}


/* --- NEW CARD DESIGN --- */
.home-heading-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.02em;
}

.home-article {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0; /* Subtle border */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.home-article:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(15, 23, 42, 0.1), 0 10px 20px -5px rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(37, 99, 235, 0.3);
}

.home-article-thumbnail {
    overflow: hidden;
    background-color: #f1f5f9;
    position: relative;
}

.home-article-thumbnail__image {
    transition: transform 0.5s ease;
}

.home-article:hover .home-article-thumbnail__image {
    transform: scale(1.08);
}

.home-article-title {
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.home-article-title a {
    color: #1e293b;
    transition: color 0.2s ease;
}

.home-article-title a:hover {
    color: #2563eb;
}

.home-article-summary {
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination Styling */
.page-link {
    border: none;
    color: #64748b;
    font-weight: 600;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.2s;
}

.page-link:hover {
    background-color: #f1f5f9;
    color: #2563eb;
}

.page-item.active .page-link {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.page-item.disabled .page-link {
    background-color: transparent;
    color: #cbd5e1;
}

.app-main.container {

   /* Fix for spacing under fixed header if any, though currently header seems static */

   margin-bottom: 4rem;

}





/* ==========================================================================





   HEADER REDESIGN (90% CHANGE)





   ========================================================================== */











/* Logo Styling */





.brand-logo {





    font-size: 1.75rem;





    letter-spacing: -0.02em;





    color: #ffffff !important;





    transition: transform 0.2s ease;





}











.brand-logo:hover {





    transform: scale(1.02);





}











/* Navbar Link Styling */





.nav-link-hover {





    color: rgba(255, 255, 255, 0.85) !important;





    padding: 0.5rem 0 !important;





    font-size: 0.95rem;





    transition: color 0.3s ease;





}











.nav-link-hover:hover,





.nav-link-hover.active {





    color: #ffffff !important;





    text-shadow: 0 0 10px rgba(255,255,255,0.3);





}











/* Hover Underline Effect */





.nav-link-hover::after {





    content: '';





    position: absolute;





    width: 0;





    height: 2px;





    bottom: 0;





    left: 50%;





    background-color: #ffffff;





    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);





    transform: translateX(-50%);





}











.nav-link-hover:hover::after,





.nav-link-hover.active::after {





    width: 100%;





}











/* Navbar Container tweaks */





.main-header-area .navbar {





    transition: all 0.3s ease;





    box-shadow: 0 4px 20px rgba(18, 121, 180, 0.25); /* Subtle blue shadow */





    border-bottom: none;





}











/* Mobile Toggler Styling */





.navbar-toggler-icon {





    filter: invert(1) brightness(2); /* Make standard toggler icon white */





}





.navbar-toggler:focus {





    box-shadow: none;





}






