:root {
    --primary: #c48b5d; /* Warm orange/gold tone from the old links */
    --primary-hover: #e09f6b;
    --dark: #2c2926; /* Dark earthy background */
    --dark-surface: #3a3632;
    --light: #f9f9f9;
    --text: #e8e6e3;
    --text-muted: #a8a39d;
    --footer-bg: #1f1e1d;
    
    --glass-bg: rgba(44, 41, 38, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    /* Soft warm gradient similar to old site */
    background: linear-gradient(180deg, #423d38 0%, #2c2926 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    color: var(--light);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

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

/* Header */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light);
    letter-spacing: 1px;
}

.logo img {
    height: 40px; /* Tamaño del logo */
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 120px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    font-family: 'Playfair Display', serif;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 139, 93, 0.3);
    color: #fff;
}

.btn-outline {
    border: 1px solid var(--text-muted);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--light);
    color: var(--light);
}

/* Featured Posts Grid */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.post-card {
    background: var(--dark-surface);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.post-img-wrapper {
    height: 220px;
    overflow: hidden;
    background: #1a1a1a;
}

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

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

.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-title a {
    color: var(--light);
}

.post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Single Post */
.single-post-header {
    text-align: center;
    padding: 60px 0;
}

.single-post-title {
    font-size: 3rem;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.single-post-meta {
    color: var(--text-muted);
}

.single-post-cover {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 50px;
}

.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e0e0e0;
}

/* Sponsors Section */
.sponsors-section {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
}

.sponsors-section h3 {
    font-size: 1.2rem;
    color: var(--light);
    margin-bottom: 30px;
    font-family: 'Inter', sans-serif;
}

.sponsors-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.sponsor-card {
    background: #fff;
    border-radius: 12px;
    width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.sponsor-card:hover {
    transform: translateY(-5px);
}

.sponsor-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-info h2 img {
    height: 35px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =============================================
   READING ROOM - Split Layout
   ============================================= */
.reading-room-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

.reading-sidebar {
    width: 320px;
    min-width: 280px;
    background-color: #1f1e1c;
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 30px 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

.reading-content {
    flex-grow: 1;
    padding: 50px 60px;
    overflow-y: auto;
    background-color: var(--dark);
    max-width: 100%;
}

/* Genre Tree Menu */
.genre-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.genre-node {
    margin-bottom: 6px;
}

.genre-toggle {
    display: none;
}

.genre-label {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    user-select: none;
    border-left: 3px solid transparent;
}

.genre-label:hover {
    background: rgba(196, 139, 93, 0.07);
    color: var(--primary);
    border-left-color: var(--primary-hover);
}

.genre-toggle:checked ~ .genre-label {
    color: var(--primary);
    background: rgba(196, 139, 93, 0.1);
    border-left-color: var(--primary);
}

.genre-icon {
    margin-right: 10px;
    font-size: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.genre-toggle:checked ~ .genre-label .genre-icon {
    transform: rotate(15deg);
}

.genre-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 400;
}

/* Posts inside a genre */
.genre-posts {
    list-style: none;
    padding-left: 18px;
    margin-top: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.genre-toggle:checked ~ .genre-posts {
    max-height: 2000px;
    opacity: 1;
    margin-bottom: 8px;
}

.genre-posts li {
    margin-bottom: 2px;
}

.post-link {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 12px;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-radius: 4px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.post-link:hover {
    color: var(--light);
    background: rgba(255,255,255,0.03);
    border-left-color: var(--primary-hover);
}

.post-link.active {
    color: var(--primary);
    background: rgba(196, 139, 93, 0.1);
    border-left-color: var(--primary);
    font-weight: 500;
}

.post-icon {
    flex-shrink: 0;
    opacity: 0.6;
    font-size: 0.85rem;
    margin-top: 1px;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .reading-room-layout {
        flex-direction: column;
    }
    .reading-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .reading-content {
        padding: 30px 20px;
    }
}
