/* Blog Style - Apuntes del Profesor */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #000;
    background: #fff;
}

/* Header */
header {
    padding: 25px 60px;
    border-bottom: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 6px;
    text-transform: uppercase;
}

nav {
    display: flex;
    gap: 40px;
}

nav a {
    color: #000;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: #ff0000;
}

/* Footer */
footer {
    background: #000;
    color: #fff;
    padding: 40px 60px;
    text-align: center;
}

footer p {
    font-size: 13px;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Hero Compacto */
.hero-compact {
    background: #fff;
    padding: 60px 60px 50px;
}

.hero-compact-container {
    max-width: 1400px;
    margin: 0 auto;
}

.red-line {
    width: 120px;
    height: 4px;
    background: #ff0000;
    margin-bottom: 40px;
}

.compact-content h1 {
    font-size: 52px;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 25px;
    font-family: Georgia, serif;
    color: #000;
}

.compact-content p {
    font-size: 18px;
    line-height: 1.7;
    color: #666;
    max-width: 800px;
}

/* Category Tabs */
.category-tabs {
    background: #fff;
    border-bottom: 2px solid #e5e5e5;
    position: sticky;
    top: 77px;
    z-index: 50;
}

.tabs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    gap: 0;
}

.tab {
    padding: 20px 30px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab:hover {
    color: #000;
}

.tab.active {
    color: #000;
    border-bottom-color: #ff0000;
}

/* Featured Section */
.featured-section {
    padding: 80px 60px;
    background: #fafafa;
}

.featured-container {
    max-width: 1400px;
    margin: 0 auto;
}

.featured-label {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ff0000;
    font-weight: 700;
    margin-bottom: 30px;
}

.featured-card {
    background: #fff;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.featured-card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    border-color: #000;
}

.featured-card-image {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    aspect-ratio: 16/12;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    letter-spacing: 2px;
}

.featured-card-content {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-badge {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ff0000;
    font-weight: 700;
    margin-bottom: 25px;
}

.featured-card-content h2 {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 25px;
    font-family: Georgia, serif;
    color: #000;
}

.card-excerpt {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #999;
}

.card-button {
    display: inline-block;
    padding: 14px 35px;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.card-button:hover {
    background: #ff0000;
}

/* Articles Grid */
.articles-section {
    padding: 100px 60px;
    background: #fff;
}

.articles-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ff0000;
    margin-bottom: 50px;
    font-weight: 600;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.article-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.article-card:hover {
    border-color: #ff0000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-image {
    background: #f5f5f5;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    letter-spacing: 1px;
    border-bottom: 1px solid #e5e5e5;
}

.article-content {
    padding: 30px;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.article-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ff0000;
    font-weight: 600;
}

.article-date {
    font-size: 12px;
    color: #999;
    letter-spacing: 1px;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-content h3 a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.article-content h3 a:hover {
    color: #ff0000;
}

.article-content p {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    font-size: 14px;
    color: #ff0000;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.read-more:hover {
    padding-left: 5px;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-compact {
        padding: 50px 30px 40px;
    }

    .compact-content h1 {
        font-size: 36px;
    }

    .compact-content p {
        font-size: 16px;
    }

    .tabs-container {
        padding: 0 30px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab {
        padding: 18px 20px;
        font-size: 12px;
    }

    .featured-section {
        padding: 60px 30px;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-card-content {
        padding: 40px 30px;
    }

    .featured-card-content h2 {
        font-size: 28px;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .articles-section {
        padding: 60px 30px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

}

/* Botón de inicio de sesión del encabezado.
   El margen negativo compensa el relleno: el encabezado mantiene su altura original. */
nav {
    align-items: center;
}

nav a.nav-login {
    border: 2px solid #000;
    padding: 8px 16px;
    margin: -10px 0;
}

nav a.nav-login:hover {
    background: #000;
    color: #fff;
}

/* Encabezado en pantallas pequeñas: logo arriba, enlaces abajo */
@media (max-width: 700px) {
    header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 20px;
    }

    .logo {
        font-size: 16px;
        letter-spacing: 4px;
        width: 100%;
    }

    nav {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    nav a {
        font-size: 11px;
        letter-spacing: 1px;
    }

    nav a.nav-login {
        padding: 6px 12px;
        margin: 0;
        white-space: nowrap;
    }
}

/* Logo como enlace y textos de carga */
header .logo a { color: inherit; text-decoration: none; }
.loading-text { color: #6b7280; padding: 40px 0; text-align: center; }
