/* 
    CreyenteDigital.com - Modern Design System
    Expertly crafted for SEO and Premium Aesthetics
*/

:root {
    /* Color Palette */
    --bg-dark: #0a0b0d;
    --bg-card: #15171a;
    --accent: #d4af37; /* Gold */
    --accent-hover: #f1c40f;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--white);
    font-weight: 700;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Components */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

/* Grid System */
.grid {
    display: grid;
    gap: 24px;
}

.grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* Chapter Navigation & Grid */
.chapter-nav {
    margin: 25px 0;
    flex-wrap: wrap;
}

.chapters-grid-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chapter-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color) !important;
}

.chapter-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.chapter-card.active {
    background: var(--primary-gradient);
    border: none;
    box-shadow: var(--neon-glow);
}

.chapter-info strong {
    display: block;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.8s ease forwards;
}

/* News Cards */
.news-section {
    margin-bottom: 80px;
}

.news-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-img {
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.news-body h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Search & List Components */
.search-form-inner, .search-form-full {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.search-form-inner:focus-within, .search-form-full:focus-within {
    border-color: var(--accent);
}

.search-form-inner input, .search-form-full input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--white);
    padding: 12px 20px;
    font-size: 1rem;
    outline: none;
}

.resource-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-img {
    height: 220px;
    position: relative;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-img img[src*="placeholder"] {
    width: 70%;
    height: auto;
    opacity: 0.5;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.card-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.full-width { width: 100%; }
.btn-sm { padding: 10px 15px; font-size: 0.85rem; }

@media (max-width: 768px) {
    .btn-sm {
        font-size: 0.75rem;
        padding: 8px 12px;
        white-space: normal;
        line-height: 1.2;
        text-align: center;
    }
}

/* General Badges */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--accent);
    color: var(--bg-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sm {
    padding: 4px 10px;
    font-size: 0.7rem;
}

/* Resource Detail Page */
.resource-detail-page { padding-top: 40px; }
.hero-split { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; margin-bottom: 80px; }
.resource-poster { position: sticky; top: 120px; border-radius: 24px; overflow: hidden; }
.breadcrumbs { margin-bottom: 25px; font-size: 0.9rem; color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.resource-info h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.1; }
.resource-meta { display: flex; gap: 12px; margin-bottom: 35px; flex-wrap: wrap; }
.meta-tag { background: rgba(212, 175, 55, 0.1); color: var(--accent); padding: 6px 16px; border-radius: 8px; font-weight: 600; font-size: 0.85rem; }
.description-box { padding: 40px; margin-bottom: 50px; }
.description-box h2 { font-size: 1.3rem; margin-bottom: 20px; color: var(--accent); }
.action-section h3 { margin-bottom: 20px; }
.legal-small { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-bottom: 30px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }

@media (max-width: 1024px) {
    .hero-split { grid-template-columns: 1fr; }
    .resource-poster { position: static; max-width: 400px; margin: 0 auto; }
    .resource-info h1 { font-size: 2.5rem; text-align: center; }
    .resource-meta { justify-content: center; }
    .breadcrumbs { text-align: center; }
}
/* Poster Overlay for Chapters */
.resource-poster {
    position: relative;
    overflow: hidden;
}

.poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    padding: 40px 20px 25px;
    color: white;
    text-align: center;
    backdrop-filter: blur(2px);
    border-top: 1px solid rgba(255,255,255,0.1);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.poster-overlay h2 {
    font-size: 1.5rem !important;
    margin-bottom: 8px !important;
    color: var(--accent) !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    line-height: 1.2 !important;
}

.poster-overlay span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    color: var(--white);
    opacity: 0.9;
    display: block;
}

.resource-poster:hover .poster-overlay {
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
}

@media (max-width: 768px) {
    .poster-overlay h2 { font-size: 1.2rem !important; }
    .poster-overlay span { font-size: 0.75rem; letter-spacing: 2px; }
}

/* ==========================================================================
   News-Magazine Portal Layouts (Google AdSense Friendly)
   ========================================================================== */

.editorial-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Main Featured News Card */
.featured-news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-news-img {
    height: 380px;
    overflow: hidden;
    border-radius: 16px;
    position: relative;
    border: 1px solid var(--border);
}

.featured-news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-news-card:hover .featured-news-img img {
    transform: scale(1.03);
}

.featured-news-body {
    padding: 25px 0 10px;
}

.featured-news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.8rem;
}

.featured-news-meta .category-badge {
    background: var(--accent);
    color: var(--bg-dark);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.featured-news-meta .news-date-meta {
    color: var(--text-muted);
}

.featured-news-body h2 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--white);
}

.featured-news-body h2 a:hover {
    color: var(--accent);
}

.featured-news-body p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Sidebar List */
.sidebar-editorial {
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-news-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-news-thumb {
    width: 90px;
    height: 70px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.sidebar-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-news-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-news-content h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 5px;
}

.sidebar-news-content h4 a:hover {
    color: var(--accent);
}

.sidebar-news-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Section Separator */
.magazine-section-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.magazine-section-header h2 {
    font-size: 1.8rem;
    position: relative;
}

.magazine-section-header h2::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
}

.magazine-section-header .view-all-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.magazine-section-header .view-all-link:hover {
    color: var(--accent-hover);
    transform: translateX(3px);
}

/* Custom Grid for Magazine articles */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* SEO Content Block */
.seo-text-block {
    background: rgba(212, 175, 55, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 16px;
    padding: 35px;
    margin: 80px 0;
    line-height: 1.7;
}

.seo-text-block h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.seo-text-block p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.seo-text-block p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .editorial-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-news-img {
        height: 300px;
    }
}

@media (max-width: 640px) {
    .magazine-grid {
        grid-template-columns: 1fr;
    }
    .featured-news-body h2 {
        font-size: 1.6rem;
    }
}
