/* ============================================================
   BLOG - CSS
   Estilos para template-blog.php y single.php
   Version: 1.1.0
   ============================================================ */

/* Hero del Blog */
.og-blog-hero {
    position: relative;
    background-image: url('../assets/images/blog-nuestroBlog.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 120px 0;
    text-align: center;
    overflow: hidden;
}

/* Overlay azulado oscuro encima de la imagen */
.og-blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 42, 87, 0.75); /* Azul oscuro con transparencia */
    z-index: 1;
}

/* El contenido debe estar encima del overlay */
.og-blog-hero .og-container {
    position: relative;
    z-index: 2;
}

.og-blog-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.og-blog-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    color: white !important;
}

/* Logo en el hero (si existe) */
.og-hero-logo {
    max-width: 200px;
    margin-bottom: 1.5rem;
}

/* Grid de artículos */
.og-blog-content {
    padding: 80px 0;
    background: #f8fafc;
}

.og-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Tarjeta de artículo */
.og-blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.og-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.og-blog-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

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

.og-blog-card:hover .og-blog-card-image img {
    transform: scale(1.05);
}

.og-blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.og-blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.og-blog-category {
    background: #eff6ff;
    color: #2563eb;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
}

.og-blog-date {
    color: #94a3b8;
}

.og-blog-title {
    margin-bottom: 1rem;
}

.og-blog-title a {
    color: #1a365d;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.og-blog-title a:hover {
    color: #2563eb;
}

.og-blog-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.og-blog-read-more {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.og-blog-read-more:hover {
    color: #1e40af;
}

/* Paginación */
.og-blog-pagination {
    margin-top: 3rem;
    text-align: center;
}

.og-blog-pagination ul {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.og-blog-pagination li a,
.og-blog-pagination li span {
    display: block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1a365d;
    text-decoration: none;
    transition: all 0.3s ease;
}

.og-blog-pagination li a:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.og-blog-pagination li .current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* ============================================================
   SINGLE POST (Artículo individual)
   ============================================================ */

/* Post individual necesita espacio extra arriba por el header fijo */
.og-single-post {
    margin-top: 80px !important; /* FORZAR espacio arriba */
    padding-top: 0 !important;
}

.og-single-hero {
    max-height: 500px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.og-single-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.og-single-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    padding: 60px 0;
}

/* Contenido principal */
.og-single-main {
    background: white;
    padding: 3rem;
    border-radius: 12px;
}

.og-single-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.og-single-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.og-single-category {
    background: #eff6ff;
    color: #2563eb;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

.og-single-date {
    color: #94a3b8;
    padding: 0.5rem 0;
}

.og-single-title {
    font-size: 2.5rem;
    color: #1a365d;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.og-single-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.og-single-author img {
    border-radius: 50%;
}

.og-author-info {
    display: flex;
    flex-direction: column;
}

.og-author-name {
    font-weight: 600;
    color: #1a365d;
}

.og-reading-time {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Contenido del post */
.og-single-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
}

.og-single-content h2,
.og-single-content h3,
.og-single-content h4 {
    color: #1a365d;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.og-single-content p {
    margin-bottom: 1.5rem;
}

.og-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Footer del post */
.og-single-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.og-single-tags {
    color: #64748b;
}

.og-single-tags a {
    color: #2563eb;
    text-decoration: none;
}

.og-single-tags a:hover {
    text-decoration: underline;
}

/* Navegación prev/next */
.og-single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.og-nav-prev,
.og-nav-next {
    display: flex;
    flex-direction: column;
}

.og-nav-next {
    text-align: right;
}

.og-nav-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.og-single-nav a {
    color: #1a365d;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.og-single-nav a:hover {
    color: #2563eb;
}

/* Sidebar */
.og-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.og-sidebar-widget {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.og-sidebar-widget h3 {
    font-size: 1.25rem;
    color: #1a365d;
    margin-bottom: 1rem;
}

.og-recent-posts,
.og-categories {
    list-style: none;
    padding: 0;
}

.og-recent-posts li,
.og-categories li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.og-recent-posts li:last-child,
.og-categories li:last-child {
    border-bottom: none;
}

.og-recent-posts a,
.og-categories a {
    color: #475569;
    text-decoration: none;
    transition: color 0.3s ease;
}

.og-recent-posts a:hover,
.og-categories a:hover {
    color: #2563eb;
}

/* Responsive */
@media (max-width: 1024px) {
/* Responsive Tablet */
@media (max-width: 1024px) {
    .og-blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Responsive Móvil */
@media (max-width: 768px) {
    .og-blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }

    .og-single-wrapper {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .og-single-title {
        font-size: 2rem;
        padding: 0 10px;
    }

    .og-single-nav {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .og-single-content {
        padding: 30px 20px;
    }
}
