/* ==========================================================================
   CSS UNIFICADO PARA EL BLOG - CREA HÁPTICA
   ========================================================================== */

/* Variables de Marca */
:root {
    --color-bg: #FAF5F0;
    --color-text: #4A3F35;
    --color-accent: #C5A070;
    --color-secondary: #DFE3D6;
    --color-white: #FFFFFF;
    --font-titles: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-subtle: 0 10px 30px rgba(74, 63, 53, 0.04);
    --shadow-hover: 0 20px 45px rgba(74, 63, 53, 0.08);
}

/* Reset y Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-titles);
    font-weight: 400;
    color: var(--color-text);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Botones Premium */
.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    background-color: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-titles);
    font-style: italic;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    border-radius: 0;
}

.btn:hover {
    background-color: #b08d5f;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 160, 112, 0.2);
}

/* Cabecera / Menú de Navegación */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(250, 245, 240, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(223, 227, 214, 0.3);
    transition: var(--transition);
}

.logo {
    font-family: var(--font-titles);
    font-size: 1.4rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 400;
    position: relative;
    padding: 0.3rem 0;
    opacity: 0.85;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

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

/* Menú Móvil (Hamburguesa) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    transition: var(--transition);
}

/* Ajustes de espaciado principal para evitar superposición con la cabecera fija */
main {
    padding-top: 90px;
}

/* ==========================================================================
   SECCIÓN INDEX DEL BLOG (LISTADO DE ARTÍCULOS)
   ========================================================================== */

.blog-hero {
    text-align: center;
    padding: 80px 5% 50px 5%;
    max-width: 900px;
    margin: 0 auto;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.blog-hero p {
    font-size: 1.2rem;
    color: var(--color-text);
    opacity: 0.8;
    font-style: italic;
    font-family: var(--font-titles);
}

.blog-section {
    padding: 40px 5% 100px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

/* Grid de Artículos */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 45px;
}

/* Tarjeta de Artículo Premium */
.blog-card {
    background-color: var(--color-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid rgba(223, 227, 214, 0.2);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.blog-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background-color: var(--color-secondary);
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-card:hover .blog-card-img {
    transform: scale(1.06);
}

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

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-card-category {
    color: var(--color-accent);
    font-weight: 700;
}

.blog-card-date {
    opacity: 0.6;
}

.blog-card-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 400;
    transition: var(--transition);
}

.blog-card:hover .blog-card-title {
    color: var(--color-accent);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 1.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.blog-card-link {
    font-family: var(--font-titles);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-top: auto;
}

.blog-card-link span {
    transition: var(--transition);
}

.blog-card:hover .blog-card-link span {
    transform: translateX(6px);
}

/* ==========================================================================
   DISEÑO DE LECTURA DE ARTÍCULO INDIVIDUAL (POST LAYOUT)
   ========================================================================== */

.post-container {
    max-width: 820px;
    margin: 40px auto 80px auto;
    padding: 0 5%;
}

header.post-header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    padding: 0 !important;
    display: block !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    z-index: 10 !important;
    text-align: center !important;
    margin-bottom: 3.5rem !important;
}

.post-category {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
}

.post-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.25;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.post-meta {
    font-size: 0.9rem;
    opacity: 0.7;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Imagen Destacada del Post */
.post-featured-image-wrapper {
    width: 100%;
    height: clamp(300px, 50vh, 500px);
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(223, 227, 214, 0.2);
}

.post-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cuerpo del Post (Contenido de Lectura) */
.post-content {
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--color-text);
}

.post-content p {
    margin-bottom: 2rem;
    opacity: 0.95;
    text-align: justify;
}

.post-content h2 {
    font-size: 1.85rem;
    margin: 3.5rem 0 1.5rem 0;
    line-height: 1.3;
}

.post-content h3 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1.2rem 0;
    line-height: 1.3;
}

.post-content strong {
    font-weight: 700;
    color: #332B24;
}

.post-content blockquote {
    background-color: var(--color-secondary);
    border-left: 4px solid var(--color-accent);
    padding: 2rem 2.5rem;
    margin: 3rem 0;
    font-family: var(--font-titles);
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--color-text);
    border-radius: 0 20px 20px 0;
}

.post-content blockquote p {
    margin-bottom: 0;
    text-align: left;
}

.post-content ul, 
.post-content ol {
    margin: 0 0 2.5rem 2rem;
}

.post-content li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

.post-content img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: var(--shadow-subtle);
}

/* Caja de Llamada a la Acción (CTA) de Reserva */
.post-cta {
    background-color: var(--color-secondary);
    border-radius: 30px;
    padding: 3.5rem;
    text-align: center;
    margin: 5rem 0;
    box-shadow: var(--shadow-subtle);
    position: relative;
    overflow: hidden;
}

.post-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(250, 245, 240, 0.4) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.post-cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.post-cta h3 {
    font-size: 2.1rem;
    margin-bottom: 1rem;
}

.post-cta p {
    font-size: 1.05rem;
    margin-bottom: 2.2rem;
    opacity: 0.85;
}

.post-cta .btn {
    border-radius: 100px;
    padding: 1.1rem 3rem;
    box-shadow: 0 10px 30px rgba(197, 160, 112, 0.15);
}

/* Compartir Artículo */
.post-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(74, 63, 53, 0.1);
    border-bottom: 1px solid rgba(74, 63, 53, 0.1);
    margin: 4rem 0;
}

.post-share-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.post-share-links {
    display: flex;
    gap: 12px;
}

.post-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(223, 227, 214, 0.4);
    transition: var(--transition);
}

.post-share-btn:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-3px);
}

.post-share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Navegación entre Artículos */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 4rem;
}

.post-nav-link {
    flex: 1;
    padding: 2rem;
    background-color: var(--color-white);
    border-radius: 20px;
    border: 1px solid rgba(223, 227, 214, 0.3);
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition);
}

.post-nav-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent);
}

.post-nav-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    font-weight: 700;
}

.post-nav-title {
    font-family: var(--font-titles);
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-nav-link.next {
    text-align: right;
}

/* ==========================================================================
   FOOTER (Coherente e idéntico)
   ========================================================================== */
footer {
    padding: 80px 5%;
    background: var(--color-white);
    border-top: 1px solid var(--color-secondary);
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: left;
}

.footer-logo-section p {
    margin-top: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.footer-links-section h3,
.footer-contact-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

/* ==========================================================================
   MEDIA QUERIES (DISEÑO RESPONSIVO)
   ========================================================================== */

@media (max-width: 968px) {
    header {
        padding: 1.2rem 5%;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
        transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        padding: 2rem;
        z-index: 1050;
    }

    nav.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 2.2rem;
    }

    .menu-toggle {
        display: flex;
    }

    /* Transformación de Hamburguesa a X cuando está activo */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
        gap: 30px;
    }

    .post-cta {
        padding: 2.5rem;
    }

    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding-top: 50px;
    }

    .post-featured-image-wrapper {
        border-radius: 20px;
        margin-bottom: 2.5rem;
        height: 280px;
    }

    .post-content blockquote {
        padding: 1.5rem 1.8rem;
        font-size: 1.15rem;
    }

    .post-cta h3 {
        font-size: 1.7rem;
    }
}
