/* Pages Listing & Detail Styles */

/* =========================
   Pages Container
   ========================= */
.pages-container,
.page-detail-container {
    min-height: 100vh;
    background: var(--primary-black);
    color: var(--white);
}

/* =========================
   Pages Hero Section
   ========================= */
.pages-hero {
    position: relative;
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #1a0000 0%, #000000 50%, #1a0000 100%);
    overflow: hidden;
}

.pages-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(220, 38, 38, 0.15) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.pages-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Background Elements */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.1);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    bottom: -125px;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, 20px) rotate(5deg); }
    50% { transform: translate(0, 40px) rotate(10deg); }
    75% { transform: translate(-20px, 20px) rotate(5deg); }
}

/* =========================
   Pages Grid Section
   ========================= */
.pages-grid-section {
    padding: 4rem 0 6rem;
}

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.page-card {
    background: var(--primary-black-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff6b6b 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.page-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-red);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.2);
}

.page-card:hover::before {
    transform: scaleX(1);
}

.page-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.page-icon {
    font-size: 2rem;
}

.page-type {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(220, 38, 38, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--white);
}

.page-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    flex: 1;
}

.page-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-slug {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-page-btn {
    font-size: 0.875rem;
    color: var(--primary-red);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================
   Page Detail Hero
   ========================= */
.page-detail-hero {
    background: linear-gradient(135deg, #1a0000 0%, #000000 50%, #1a0000 100%);
    padding: 8rem 0 3rem;
}

.page-detail-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 1.5rem 0;
    color: var(--white);
}

.page-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item svg {
    color: var(--primary-red);
}

/* =========================
   Page Detail Content
   ========================= */
.page-detail-content {
    padding: 4rem 0 6rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

.main-content {
    min-width: 0;
}

.page-excerpt {
    background: rgba(220, 38, 38, 0.1);
    border-left: 4px solid var(--primary-red);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.page-excerpt p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.page-content {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.page-content h2,
.page-content h3,
.page-content h4 {
    color: var(--white);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content h2 {
    font-size: 2rem;
    font-weight: 700;
}

.page-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.page-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

.page-content p {
    margin-bottom: 1.5rem;
}

.page-content ul,
.page-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-content li {
    margin-bottom: 0.75rem;
}

.page-content a {
    color: var(--primary-red);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.page-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem 0;
}

/* =========================
   Sidebar
   ========================= */
.content-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: var(--primary-black-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

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

.sidebar-links li {
    margin-bottom: 0.75rem;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-links a:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--white);
}

.sidebar-links svg {
    color: var(--primary-red);
    flex-shrink: 0;
}

.sidebar-cta {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-color: rgba(220, 38, 38, 0.3);
}

.sidebar-cta p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #b91c1c;
    transform: translateX(4px);
}

/* =========================
   Empty State
   ========================= */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state svg {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* =========================
   Responsive Design
   ========================= */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .pages-stats {
        gap: 2rem;
    }
    
    .pages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .page-detail-title {
        font-size: 2rem;
    }
    
    .page-meta {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .pages-hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .page-card {
        padding: 1.5rem;
    }
    
    .page-detail-hero {
        padding: 6rem 0 2rem;
    }
    
    .page-detail-title {
        font-size: 1.75rem;
    }
}

