/**
 * Blog CartadeViajes - Estilos Substack
 * Archivo: /blog-nuevo/blog.css
 */

/* ========================================
   HOME: CONTENEDOR Y TÍTULO
   ======================================== */
.blog-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.blog-home-title {
    width: 100%;
    font-family: 'Damion', cursive;
    font-size: 2rem;
    font-weight: normal;
    margin: 4px 0 40px;
    background-color: #ffcc00;
    color: #000;
}

/* ========================================
   HOME: ARTÍCULO DESTACADO
   ======================================== */
.blog-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid #e5e5e5;
}

.blog-featured-image {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-featured-image:hover img {
    transform: scale(1.02);
}

.blog-featured-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.blog-featured-content h2 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.blog-featured-content h2 a {
    text-decoration: none;
    color: #1a1a1a;
}

.blog-featured-content h2 a:hover {
    text-decoration: underline;
}

.blog-featured-content .excerpt {
    color: #6b6b6b;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b6b6b;
}

.blog-meta-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1a1a1a;
    overflow: hidden;
}

.blog-meta-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-meta-author {
    color: #1a1a1a;
    font-weight: 500;
}

.blog-meta-separator {
    color: #ccc;
}

/* ========================================
   HOME: GRID DE ARTÍCULOS
   ======================================== */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-post-card {
    display: flex;
    flex-direction: column;
}

.blog-post-card-image {
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 12px;
}

.blog-post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-post-card-image img {
    transform: scale(1.02);
}

.blog-post-card h3 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.blog-post-card h3 a {
    text-decoration: none;
    color: #1a1a1a;
}

.blog-post-card h3 a:hover {
    text-decoration: underline;
}

.blog-post-card .excerpt {
    color: #6b6b6b;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   HOME: EMPTY STATE
   ======================================== */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b6b6b;
}

/* ========================================
   ARTÍCULO: CONTENEDOR
   ======================================== */
.blog-article-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* ========================================
   ARTÍCULO: CABECERA
   ======================================== */
.blog-article-header {
    height: auto;
    margin-bottom: 32px;
}

.blog-article-tagline {
    width: 100%;
    font-family: 'Damion', cursive;
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 16px;
    background-color: #ffcc00;
    color: #000;
}

.blog-article-tagline a {
    color: #1a1a1a;
    text-decoration: none;
}

.blog-article-tagline a:hover {
    opacity: 0.7;
}

.blog-article-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

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

.blog-article-meta-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-article-meta-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-article-meta-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.blog-article-meta-author {
    font-weight: 500;
    font-size: 15px;
}

.blog-article-meta-date {
    font-size: 14px;
    color: #6b6b6b;
}

/* ========================================
   ARTÍCULO: IMAGEN DESTACADA
   ======================================== */
.blog-article-featured-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 32px;
    display: block;
}

/* ========================================
   ARTÍCULO: CONTENIDO
   ======================================== */
.blog-article-content {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 18px;
    line-height: 1.8;
    color: #1a1a1a;
}

.blog-article-content p {
    margin-bottom: 24px;
}

.blog-article-content a {
    color: #1a1a1a;
    text-decoration: underline;
}

.blog-article-content a:hover {
    opacity: 0.7;
}

.blog-article-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 20px;
}

.blog-article-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 16px;
}

.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.blog-article-content blockquote {
    border-left: 3px solid #1a1a1a;
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: #4a4a4a;
}

.blog-article-content ul,
.blog-article-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.blog-article-content li {
    margin-bottom: 8px;
}

.blog-article-content pre {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    margin: 24px 0;
}

.blog-article-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 16px;
}

.blog-article-content pre code {
    background: none;
    padding: 0;
}

/* ========================================
   ARTÍCULO: VOLVER
   ======================================== */
.blog-article-back {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e5e5;
}

.blog-article-back a {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #6b6b6b;
    text-decoration: none;
}

.blog-article-back a:hover {
    color: #1a1a1a;
}

/* ========================================
   ICONOS REDES SOCIALES
   ======================================== */
.blog-social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.blog-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.blog-social-links a:hover {
    background-color: #f0f0f0;
}

.blog-social-links svg {
    width: 20px;
    height: 20px;
    fill: #6b6b6b;
    transition: fill 0.2s ease;
}

.blog-social-links a:hover svg {
    fill: #1a1a1a;
}

/* ========================================
   HOME: FOOTER REDES SOCIALES
   ======================================== */
.blog-social-footer {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.blog-social-footer .blog-social-links {
    justify-content: center;
    margin-top: 0;
}

/* ========================================
   ARTÍCULO: POSTS RELACIONADOS
   ======================================== */
.blog-related-posts {
    background: #fafafa;
    padding: 60px 20px;
    margin-top: 60px;
}

.blog-related-posts-container {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-related-posts-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .blog-container {
        padding: 0 16px 32px;
    }

    .blog-home-title {
        font-size: 26px;
        margin-bottom: 32px;
    }

    .blog-featured {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-featured-content h2 {
        font-size: 22px;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .blog-post-card-image {
        aspect-ratio: 16/9;
    }

    .blog-post-card h3 {
        font-size: 20px;
    }

    /* Artículo */
    .blog-article-container {
        padding: 0 16px 60px;
    }

    .blog-article-title {
        font-size: 28px;
    }

    .blog-article-content {
        font-size: 17px;
    }

    .blog-article-content h2 {
        font-size: 24px;
    }

    .blog-article-content h3 {
        font-size: 20px;
    }

    .blog-related-posts {
        padding: 40px 16px;
        margin-top: 40px;
    }

    .blog-related-posts-title {
        font-size: 20px;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .blog-home-title {
        font-size: 22px;
    }

    .blog-article-title {
        font-size: 24px;
    }

    .blog-article-meta-avatar {
        width: 36px;
        height: 36px;
    }
}
