/**
 * Estilos Principales del Blog - Bernardini Art Gallery & Auction House
 * Fiel a las referencias de diseño Layout 6 y Layout 7
 */

/* ========================================================
   0. Cabecera Principal y Navegación
   ======================================================== */
header.site-header {
    width: 100% !important;
    max-width: 100vw !important;
    height: 75px !important;
    padding: 0 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 6px rgba(3, 44, 105, 0.08);
    box-sizing: border-box !important;
}

header.site-header a.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 250px;
    height: 100%;
}

header.site-header a.logo img {
    max-height: 52px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

header.site-header nav.site-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    height: 100% !important;
    margin: 0 !important;
}

@media screen and (min-width: 1000px) {
    header.site-header nav.site-nav {
        flex: 1 !important;
        width: auto !important;
    }

    header.site-header .menu {
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex: 1 !important;
        justify-content: center !important;
    }

    header.site-header .menu ul {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-evenly !important;
        width: 100% !important;
        max-width: 820px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        gap: 8px !important;
    }

    header.site-header .menu ul li {
        list-style: none !important;
        font-size: 1.15rem !important;
        font-weight: 500 !important;
        color: #032c69 !important;
        cursor: pointer !important;
        white-space: nowrap !important;
        height: auto !important;
    }

    header.site-header .menu ul li a {
        color: #032c69 !important;
        text-decoration: none !important;
        font-family: "Calibri", "Segoe UI", Arial, sans-serif !important;
        transition: opacity 0.2s ease !important;
    }

    header.site-header .menu ul li a:hover {
        opacity: 0.75 !important;
    }

    header.site-header .ham-menu {
        display: none !important;
    }
}

.menu ul li.menu-active a,
.menu ul li.menu-active {
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

/* ========================================================
   1. Barra de Título Corporativa "Blog Bernardini"
   ======================================================== */
.blog-hero-bar {
    width: 100%;
    height: 90px;
    background-color: #032c69;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 75px; /* Offset por header fixed */
    margin-bottom: 40px;
}

.blog-hero-bar h1 {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    text-align: center;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
}

.blog-main-content {
    min-height: calc(100vh - 280px);
}

/* ========================================================
   2. Página Principal (Home) - Mosaico Hero 1+4
   ======================================================== */
.blog-home-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 25px 60px 25px;
}

.hero-mosaic-section {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 20px;
    margin-bottom: 55px;
}

.hero-col-large {
    display: flex;
    height: 480px;
}

.hero-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    background-color: #0d1e38;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.hero-card:hover img {
    transform: scale(1.03);
}

.hero-overlay-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(3, 44, 105, 0.88);
    padding: 16px 22px;
    z-index: 2;
    transition: background 0.3s ease;
}

.hero-card:hover .hero-overlay-title {
    background: rgba(3, 44, 105, 0.96);
}

.hero-card-large .hero-overlay-title h2 {
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
}

/* Columna Derecha: 2x2 Grid */
.hero-col-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 230px);
    gap: 20px;
    height: 480px;
}

.hero-card-small .hero-overlay-title {
    padding: 10px 14px;
}

.hero-card-small .hero-overlay-title h3 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================================
   3. Secciones y Carruseles por Categoría
   ======================================================== */
.categoria-carousel-section {
    margin-bottom: 55px;
}

.cat-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #032c69;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.cat-title-link {
    text-decoration: none;
}

.cat-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #032c69;
    margin: 0;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    transition: opacity 0.2s ease;
}

.cat-title:hover {
    opacity: 0.85;
}

.cat-title-accent {
    color: #c9242b !important; /* Rojo característico para "Blog de Arte" según Layout 6 */
}

.carousel-nav-arrows {
    display: flex;
    gap: 12px;
}

.nav-arrow-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #032c69;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-arrow-btn:hover {
    background-color: #0b459c;
    transform: scale(1.08);
}

.nav-arrow-btn:active {
    transform: scale(0.96);
}

.carousel-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding-bottom: 6px;
}

.carousel-viewport::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.carousel-track {
    display: flex;
    gap: 24px;
    width: max-content;
}

.carousel-item {
    scroll-snap-align: start;
    flex: 0 0 540px; /* Ancho cómodo para tarjetas de 2 en pantalla o 3 en wide */
    max-width: 580px;
}

.carousel-card {
    display: block;
    text-decoration: none;
}

.carousel-card-figure {
    position: relative;
    width: 100%;
    height: 270px;
    margin: 0;
    overflow: hidden;
    background-color: #0d1e38;
}

.carousel-card-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.carousel-card:hover .carousel-card-figure img {
    transform: scale(1.04);
}

.carousel-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(3, 44, 105, 0.88);
    padding: 16px 20px;
    z-index: 2;
    transition: background 0.3s ease;
}

.carousel-card:hover .carousel-card-overlay {
    background: rgba(3, 44, 105, 0.96);
}

.carousel-card-overlay h3 {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================================
   4. Vista de Artículo Individual
   ======================================================== */
.single-post-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 25px 80px 25px;
}

.post-header-bar {
    position: static !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: baseline !important;
    border-bottom: 2px solid #e0e5ed;
    padding-bottom: 18px;
    margin-top: 10px;
    margin-bottom: 30px;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
}

.post-title-date-group {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex-wrap: wrap;
}

.single-post-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #032c69;
    margin: 0;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
}

.single-post-date {
    font-size: 1.25rem;
    color: #032c69;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
}

.post-cover-wrapper {
    width: 100%;
    height: 520px;
    overflow: hidden;
    background-color: #032c69;
    margin-bottom: 35px;
    border-radius: 4px;
}

.post-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-body-content {
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    font-size: 1.22rem;
    line-height: 1.75;
    color: #2b2b2b;
    margin-bottom: 50px;
}

.post-body-content p {
    margin-bottom: 1.6rem;
    color: #2b2b2b;
}

.post-body-content h2, 
.post-body-content h3 {
    color: #032c69;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.post-body-content blockquote {
    border-left: 4px solid #032c69;
    margin: 1.8rem 0;
    padding: 10px 22px;
    background-color: #f6f8fb;
    font-style: italic;
    color: #032c69;
}

.post-body-content ul, 
.post-body-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
    padding-left: 1rem;
}

.post-body-content li {
    margin-bottom: 0.6rem;
    color: #2b2b2b;
}

.post-body-content a {
    color: #032c69;
    text-decoration: underline;
}

.post-action-buttons {
    display: flex;
    gap: 25px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.btn-post {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 210px;
    height: 48px;
    padding: 0 32px;
    border-radius: 40px;
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
}

.btn-post-outline {
    background-color: #ffffff;
    color: #032c69;
    border: 2px solid #032c69;
}

.btn-post-outline:hover {
    background-color: #032c69;
    color: #ffffff;
}

.btn-post-solid {
    background-color: #032c69;
    color: #ffffff;
    border: 2px solid #032c69;
}

.btn-post-solid:hover {
    background-color: #0b459c;
    border-color: #0b459c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 44, 105, 0.25);
}

/* ========================================================
   5. Vista de Archivo por Categoría
   ======================================================== */
.blog-category-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 25px 80px 25px;
}

.category-banner {
    border-bottom: 2px solid #032c69;
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.category-breadcrumbs {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 10px;
}

.category-breadcrumbs a {
    color: #032c69;
    text-decoration: none;
}

.category-main-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: #032c69;
    margin: 0 0 6px 0;
}

.category-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

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

.category-card {
    background-color: #ffffff;
}

.category-card-link {
    text-decoration: none;
    display: block;
}

.category-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #0d1e38;
}

.category-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.category-card-link:hover .category-card-img-wrapper img {
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(3, 44, 105, 0.88);
    padding: 14px 18px;
}

.category-card-overlay h3 {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 4px;
    border: 1px solid #d0d7e2;
    color: #032c69;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #eef3f9;
    border-color: #032c69;
}

.page-link.active {
    background-color: #032c69;
    color: #ffffff;
    border-color: #032c69;
}

/* ========================================================
   6. Errores y Estados Vacíos
   ======================================================== */
.blog-error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 40px 20px;
    text-align: center;
}

.error-box {
    max-width: 600px;
}

.error-code {
    font-size: 5rem;
    font-weight: 800;
    color: #032c69;
    margin: 0;
    line-height: 1;
}

.error-title {
    font-size: 1.8rem;
    color: #032c69;
    margin: 15px 0 10px 0;
}

.error-description {
    font-size: 1.1rem;
    color: #666;
}

.blog-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #555;
    font-size: 1.2rem;
}

/* ========================================================
   7. Pie de Página del Blog
   ======================================================== */
.blog-footer {
    border-top: 1px solid #d9e1ec;
    padding: 30px 20px;
    background-color: #ffffff;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    font-size: 0.95rem;
    color: #032c69;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #032c69;
    text-decoration: underline;
}

/* ========================================================
   8. Reglas Responsivas (Mobile y Tablet)
   ======================================================== */
@media screen and (max-width: 1024px) {
    .hero-mosaic-section {
        grid-template-columns: 1fr;
    }

    .hero-col-large {
        height: 380px;
    }

    .hero-col-grid {
        height: auto;
        grid-template-rows: auto;
    }

    .hero-card-small {
        height: 180px;
    }

    .carousel-item {
        flex: 0 0 380px;
    }

    .post-cover-wrapper {
        height: 380px;
    }
}

@media screen and (max-width: 768px) {
    .blog-hero-bar {
        height: 70px;
        margin-top: 75px;
        margin-bottom: 25px;
    }

    .blog-hero-bar h1 {
        font-size: 1.7rem;
    }

    .hero-col-grid {
        grid-template-columns: 1fr;
    }

    .hero-col-large {
        height: 280px;
    }

    .hero-card-small {
        height: 170px;
    }

    .carousel-item {
        flex: 0 0 290px;
    }

    .carousel-card-figure {
        height: 200px;
    }

    .post-cover-wrapper {
        height: 240px;
    }

    .post-title-date-group {
        flex-direction: column;
        gap: 5px;
    }

    .single-post-title {
        font-size: 1.7rem;
    }

    .single-post-date {
        font-size: 1.05rem;
    }

    .post-action-buttons {
        flex-direction: column;
    }

    .btn-post {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .footer-links {
        justify-content: center;
    }
}
