/* assets/css/main.css */
:root {
    --bg-dark: #09090b;
    --bg-card: #18181b;
    --bg-hover: #27272a;
    --text-light: #f4f4f5;
    --text-muted: #a1a1aa;
    --primary: #dc2626;  /* Red brand color */
    --primary-hover: #b91c1c;
    --border-color: #27272a;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius: 0.5rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Utilities */
.hidden { display: none !important; }
.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-secondary:hover { background-color: rgba(255, 255, 255, 0.3); }

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(9,9,11,0.95) 0%, rgba(9,9,11,0) 100%);
    transition: background-color 0.3s ease;
    padding: 1.25rem 2rem;
}
.header-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.05em;
}
.logo-text { color: var(--text-light); }

.main-nav {
    display: flex;
    gap: 1.5rem;
    margin-left: 3rem;
    flex: 1;
}
.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text-light); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.search-input {
    background-color: rgba(39, 39, 42, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
    width: 250px;
}
.search-input:focus {
    background-color: var(--bg-card);
    border-color: var(--primary);
}
.avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.avatar:hover img { border-color: var(--primary); }
.mobile-toggle { display: none; }

/* Hero Slider */
.hero-slider-section {
    width: 100%;
    padding: 7rem 4rem 2rem;
    position: relative;
    z-index: 10;
}
.hero-slider-container {
    max-width: 1440px;
    height: 65vh;
    min-height: 550px;
    margin: 0 auto;
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.8);
    background-color: var(--bg-card);
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
    display: flex;
    align-items: center;
}
.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 25%;
    z-index: 0;
}
.hero-editorial-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #09090b 0%, rgba(9,9,11,0.95) 45%, transparent 100%);
    z-index: 1;
}
.hero-editorial-wrapper {
    width: 100%;
    padding: 0 5rem;
    position: relative;
    z-index: 2;
}
.hero-editorial-content {
    max-width: 700px;
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.hero-type {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    font-weight: 800;
    color: var(--text-muted);
}
.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(3rem, 4.5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9);
    color: #fff;
}
.hero-desc {
    font-size: 1.15rem;
    color: #d4d4d8;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-actions {
    display: flex;
    gap: 1.25rem;
}
.tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255,255,255,0.25);
}
.tag-featured {
    background-color: transparent;
    color: white;
}

/* Slider Controls */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    opacity: 0;
    backdrop-filter: blur(4px);
}
.hero-slider-container:hover .slider-nav {
    opacity: 1;
}
.slider-nav:hover {
    background: rgba(0,0,0,0.8);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.05);
}
.prev-slide { left: 1.5rem; }
.next-slide { right: 1.5rem; }

.slider-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}
.slider-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.slider-dot.active {
    background: white;
    transform: scale(1.4);
}

/* Editorial Layouts */
.editorial-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-bottom: 6rem;
}
.editorial-row {
    padding: 0 4rem;
    margin-bottom: 4.5rem;
    position: relative;
}
.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.editorial-row-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.row-controls {
    display: flex;
    gap: 0.5rem;
}
.shelf-nav {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.shelf-nav:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.editorial-shelf {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 1.5rem;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.editorial-shelf::-webkit-scrollbar {
    display: none;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1rem;
}
@media (min-width: 640px) { .editorial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .editorial-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 1.25rem; } }
@media (min-width: 1024px) { .editorial-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3rem 1.5rem; } }
@media (min-width: 1280px) { .editorial-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3.5rem 1.75rem; } }
@media (min-width: 1536px){ .editorial-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4rem 2rem; } }

/* Editorial Card */
.editorial-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    background: transparent;
    border: none;
    text-align: left;
    min-width: 0; /* Critical for text truncation in CSS Grid */
    flex: 0 0 clamp(200px, 15vw, 260px);
    scroll-snap-align: start;
}
.card-image-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.editorial-card:hover .card-image-wrapper {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.15);
}
.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.editorial-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}
.card-hover-states {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.editorial-card:hover .card-hover-states {
    opacity: 1;
}
.view-details-text {
    padding: 0.6rem 1.25rem;
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: white;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
}

.card-info {
    padding: 0 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.type-badge {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--primary);
    font-weight: 700;
}
.score-text {
    color: #4ade80;
    font-weight: 700;
}

/* Footer */
.main-footer {
    padding: 4rem 2rem 2rem;
    background-color: var(--bg-dark);
    border-top: 1px solid var(--border-color);
}
.footer-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-muted);
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text-light);
    font-size: 1.2rem;
}
.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a { font-size: 0.9rem; }
.footer-links a:hover { color: var(--text-light); }
.footer-copyright { font-size: 0.85rem; }

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 2rem;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content-wrapper {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--border-radius);
    overflow: hidden;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.modal-overlay.active .modal-content-wrapper {
    transform: translateY(0) scale(1);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.modal-close:hover { background: rgba(0,0,0,0.8); }

/* Mobile Adaptations */
@media (max-width: 768px) {
    .main-nav, .search-wrap { display: none; }
    .editorial-row { padding: 0 1rem; margin-bottom: 3rem; }
    
    .hero-slider-section { padding: 5rem 1rem 1rem; }
    .hero-slider-container { height: 60vh; min-height: 480px; }
    .hero-editorial-wrapper { padding: 0 1.5rem; }
    .hero-editorial-content { text-align: center; margin: 0 auto; }
    .hero-meta { justify-content: center; }
    .hero-title { font-size: 2.25rem; margin-bottom: 1rem; }
    .hero-desc { font-size: 1rem; margin-bottom: 1.5rem; -webkit-line-clamp: 2; line-clamp: 2; }
    .hero-actions { flex-direction: column; gap: 0.75rem; width: 100%; }
    .hero-actions .btn-primary, .hero-actions .btn-secondary { width: 100%; justify-content: center; }
    .slider-nav { display: none !important; /* Hide arrows on small screens */ }
}
