/* Global Variables & Reset */
:root {
    --primary-color: #C10B0B;
    --background-color: #fffeef;
    --font-serif: 'Arial', sans-serif;
    --weight-serif: 400;
    --font-menu: 'Anton', sans-serif;
    --font-size-serif-titulos: 1rem;
    --letter-spacing-serif-titulos: -0.05em;
    --word-spacing-serif-titulos: 1.5vw;
}

:root {
    --font-body: 'Arial', sans-serif;
    --font-size-body: 0.6rem;
}

html {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 20px;
    /* 1.25 times larger than default 16px to give a slightly larger base */
}

body {
    background-color: var(--background-color);
    color: black;
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    line-height: 1;
    overflow-x: hidden;
    text-align: justify;
}

.heart-side-text p,
.heart-side-text2 p {
    text-align: justify;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



.full-screen-section {
    height: 100vh;
    width: 100vw;
    /* Removed scroll-snap-align */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.video-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-family: var(--font-size-serif-titulos);
    font-size: var(--font-size-serif-titulos);
    letter-spacing: var(--letter-spacing-serif-titulos);
    word-spacing: var(--word-spacing-serif-titulos);
    text-transform: uppercase;
    font-weight: 300;
    margin: 0;
    z-index: 10;
}



body {
    background-color: var(--background-color);
    color: var(--primary-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Page Preloader Logic */
body.js-loading .main-wrapper,
body.js-loading header,
body.js-loading footer {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

body.js-loaded .main-wrapper,
body.js-loaded header,
body.js-loaded footer {
    opacity: 1;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: normal;
    margin-bottom: 1rem;
}

h1 {
    font-size: 4rem;
    text-align: center;
    margin-top: 2rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 0.2rem;
}

/* Layout Wrapper */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    padding: 0 2rem;
}

.wide-container {
    max-width: 95%;
    /* Use almost full width */
    margin: 0 auto;
    padding: 0 2rem;
}

/* Split Layout for Index */
.split-layout {
    display: flex;
    flex-direction: column;
    /* Mobile first: stack */
    gap: 4rem;
    width: 100%;
    margin-top: 2rem;
}

.split-layout>div {
    flex: 1;
}

@media (min-width: 900px) {
    .split-layout {
        flex-direction: row;
        /* Desktop: side-by-side */
        gap: 6rem;
        align-items: flex-start;
        /* Align tops */
    }

    .split-layout>div {
        text-align: left;
        /* Optional: enforce left align on desktop if desired */
    }
}

/* Manifesto Section */
.manifesto-section {
    width: 100%;
    margin-top: 0%;
    margin-bottom: -5px;
    /* Hide sub-pixel rendering gaps */
    background-color: var(--background-color);
    z-index: 3;
    position: relative;
    padding: 4rem 5% 5rem 5%;
    /* Increased bottom padding */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: left;

}

.manifesto-section h2 {
    width: 100%;
    height: 100%;
    text-align: left;
    margin-bottom: 2rem;
    font-family: var(--font-serif);
    font-weight: var(--weight-serif);
    font-size: var(--font-size-serif-titulos);
    letter-spacing: var(--letter-spacing-serif-titulos);
    word-spacing: var(--word-spacing-serif-titulos);
}

/* Header & Navigation */
header {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px 0;
    position: fixed;
    /* Sticky always at top */
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    z-index: 2000;
    border-bottom: none;
    pointer-events: none;
    /* Let clicks pass through empty spaces if needed */
}

nav ul {
    display: flex;
    justify-content: space-between;
    list-style: none;
    width: 100%;
    padding: 0;
    pointer-events: auto;
    /* Re-enable clicks for the menu */
}

nav li a {
    font-family: var(--font-size-serif-titulos);
    font-size: var(--font-size-serif-titulos);
    letter-spacing: var(--letter-spacing-serif-titulos);
    word-spacing: var(--word-spacing-serif-titulos);
    text-transform: uppercase;
    font-weight: 300;
    color: var(--primary-color);
    text-decoration: none;
    pointer-events: auto;
}

nav li a:hover {
    opacity: 1;
    /* Disabling hover opacity change */
}

/* Active State for Navigation */
nav li a.active {
    opacity: 1;
    border-bottom: 1px solid var(--primary-color);
}

@media (max-width: 768px) {
    header {
        padding: 2px 0;
        width: 95%;
    }

    nav li a {
        /* Tamaño seguro y responsivo */
        letter-spacing: 0.1em;
        font-weight: 500;
    }
}

/* Page Specific Styles */

/* Hero Section */


/* Diary Grid */
.diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.diary-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* .diary-item:hover {
    opacity: 0.9;
} */

.diary-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
}

.diary-item p {
    margin-top: 1rem;
    font-size: 0.75rem;
    font-family: 'Arial', sans-serif;
    /* Matching the menu/cleaner look of the ref */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 254, 239, 0.95);
    /* Using theme bg with opacity */
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
}

.modal img {
    max-height: 70vh;
    max-width: 90%;
    object-fit: contain;
    margin-bottom: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(193, 11, 11, 0.15);
}

/* Single Media Mode */
.modal-split-wrapper.single-media .modal-left {
    flex: 2;
    /* Take more space compared to text */
}

.modal-split-wrapper.single-media .modal-media {
    max-height: 85vh;
    /* Taller */
    max-width: 100%;
}

.modal-text {
    max-width: 600px;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    font-family: var(--font-menu);
}

/* Community Section */
.community-hero {
    text-align: center;
    padding: 6rem 0;
}

.cta-box {
    border: 1px solid var(--primary-color);
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    margin: 3rem auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: var(--background-color);
    text-transform: uppercase;
    font-family: var(--font-menu);
    letter-spacing: 0.1em;
    margin-top: 1rem;
    border: 1px solid var(--primary-color);
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    opacity: 1;
}

/* Blog List */
.blog-list {
    max-width: 800px;
    margin: 4rem auto;
}

.blog-entry {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(193, 11, 11, 0.2);
}

.blog-entry h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.blog-meta {
    font-family: var(--font-menu);
    font-size: 0.8rem;
    color: rgba(193, 11, 11, 0.6);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.blog-excerpt {
    margin-bottom: 1.5rem;
}

.read-more {
    font-family: var(--font-menu);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--primary-color);
}



.step-description {
    color: #000000;
}

/* BLOQUE DE TEXTO LATERAL (Nuevo) */
.heart-side-text {
    position: fixed;
    top: 10%;
    left: 5%;
    width: 20%;
    color: #000000;
    line-height: 1.4;
    text-align: justify;
    z-index: 0;
    opacity: 0;
    /* Empieza invisible para animarse con GSAP */
    pointer-events: none;
}

.heart-side-text2 {
    position: fixed;
    bottom: 15%;
    right: 5%;
    width: 20%;
    color: #000000;
    line-height: 1.4;
    text-align: justify;
    z-index: 0;
    opacity: 0;
    /* Empieza invisible para animarse con GSAP */
    pointer-events: none;
}


.post-content p {
    font-family: inherit;
    line-height: inherit;
    width: 70%;
    color: #000000;
    margin: 0 auto;
    text-align: justify;
}

.post-content img {
    margin: 3rem 0;
    border-radius: 2px;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(193, 11, 11, 0.1);
    font-family: 'Arial', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.8;
}

/* Lava Lamp Section */
#lava-lamp-section {
    position: relative;
    background-color: var(--background-color);
    overflow: hidden;
    height: 100vh;
    z-index: 1;
    padding: 0;
    /* Ensure full width */
}

.lava-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.lava-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5vw;
    z-index: 10;
    pointer-events: none;
    padding: 2rem;
}

.lava-content-overlay img {
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.lava-img-left {
    width: 25vw;
    /* Forced width */
    transform: translateX(-10vw) translateY(-5vh);
    /* Move left and slightly up */
}

.lava-img-right {
    width: 35vw;
    /* Forced width - clearly different from 25vw */
    transform: translateX(10vw) translateY(5vh);
    /* Move right and slightly down */
}

/* --- POETIC TEXTS FOR LAVA LAMP --- */
.lava-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 15vh 10vw;
    pointer-events: none;
    z-index: 10;
}

.poetic-text {
    font-family: 'EB Garamond', serif;
    font-size: 1.4rem;
    color: #111;
    max-width: 20%;
    line-height: 1.4;
    opacity: 0.8;
}

.poetic-text.left {
    align-self: flex-start;
    text-align: left;
}

.poetic-text.right {
    align-self: flex-end;
    text-align: right;
    margin-top: 10vh;
}

.lava-blob {
    position: absolute;
    background: var(--primary-color);
    opacity: 0.8;
    mix-blend-mode: multiply;
    /* Morphing shape */
    border-radius: 50%;
    animation: lava-morph 8s infinite linear;
}

@keyframes lava-float {
    0% {
        transform: translateY(120vh) scale(1);
    }

    50% {
        transform: translateY(20vh) scale(1.2);
    }

    100% {
        transform: translateY(120vh) scale(1);
    }
}

@keyframes lava-morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    50% {
        border-radius: 40% 60% 30% 70% / 60% 40% 70% 30%;
    }

    75% {
        border-radius: 60% 40% 70% 30% / 30% 50% 70% 50%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* Individual Blob Configurations (Randomized & Smaller - 20 Total) */
/* Note: Positioning and movement are now handled by js/lava-lamp.js */

.lava-blob {
    /* Reset position for JS control */
    top: 0;
    left: 0;
    will-change: transform;
    /* Optimize for JS animation */
}

/* Original 10 - Resized Smaller */
.lava-blob:nth-child(1) {
    width: 8vh;
    height: 8vh;
    background: #C10B0B;
}

.lava-blob:nth-child(2) {
    width: 10vh;
    height: 10vh;
    background: #a80909;
}

.lava-blob:nth-child(3) {
    width: 6vh;
    height: 6vh;
    background: #C10B0B;
}

.lava-blob:nth-child(4) {
    width: 9vh;
    height: 9vh;
    background: #da1f1f;
}

.lava-blob:nth-child(5) {
    width: 7vh;
    height: 7vh;
    background: #C10B0B;
}

.lava-blob:nth-child(6) {
    width: 5vh;
    height: 5vh;
    background: #a80909;
}

.lava-blob:nth-child(7) {
    width: 11vh;
    height: 11vh;
    background: #C10B0B;
}

.lava-blob:nth-child(8) {
    width: 8vh;
    height: 8vh;
    background: #da1f1f;
}

.lava-blob:nth-child(9) {
    width: 6vh;
    height: 6vh;
    background: #C10B0B;
}

.lava-blob:nth-child(10) {
    width: 9vh;
    height: 9vh;
    background: #a80909;
}

/* New 10 - Small & Varied */
.lava-blob:nth-child(11) {
    width: 4vh;
    height: 4vh;
    background: #da1f1f;
}

.lava-blob:nth-child(12) {
    width: 7vh;
    height: 7vh;
    background: #C10B0B;
}

.lava-blob:nth-child(13) {
    width: 5vh;
    height: 5vh;
    background: #a80909;
}

.lava-blob:nth-child(14) {
    width: 9vh;
    height: 9vh;
    background: #C10B0B;
}

.lava-blob:nth-child(15) {
    width: 6vh;
    height: 6vh;
    background: #da1f1f;
}

.lava-blob:nth-child(16) {
    width: 8vh;
    height: 8vh;
    background: #a80909;
}

.lava-blob:nth-child(17) {
    width: 5vh;
    height: 5vh;
    background: #C10B0B;
}

.lava-blob:nth-child(18) {
    width: 7vh;
    height: 7vh;
    background: #da1f1f;
}

.lava-blob:nth-child(19) {
    width: 12vh;
    height: 12vh;
    background: #C10B0B;
    opacity: 0.6;
}

.lava-blob:nth-child(20) {
    width: 6vh;
    height: 6vh;
    background: #a80909;
}

/* --- Diary Zig-Zag Layout (diary2.html) --- */

body.diary-body {
    background-color: var(--background-color);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.diary-grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(to right, #dcdcdc 1px, transparent 1px),
        linear-gradient(to bottom, #dcdcdc 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.diary-static-headline {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    color: #cc3333;
    font-weight: bold;
    line-height: 1;
    white-space: nowrap;
    opacity: 1;
    word-spacing: 2em;
    letter-spacing: 0.6em;
}

.diary-scroll-wrapper {
    display: flex;
    flex-direction: row;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    position: relative;
    z-index: 5;
    padding-top: 80px;
}

.diary-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.diary-column {
    flex: 0 0 400px;
    margin: 0% 5%;
    height: 100%;
    border-right: 1px solid #dcdcdc;
    position: relative;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.diary-card {
    width: 100%;
    white-space: normal;
    position: absolute;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.diary-card:hover {
    opacity: 1;
    transform: none;
}

.diary-card h3,
.diary-card p {
    position: relative;
    z-index: 20;
    text-shadow: 0px 0px 10px rgba(255, 254, 239, 0.9);
}

.diary-card video {
    width: 100%;
    /* ADJUST THIS to resize video (e.g., 80%) */
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    /* Centering */
    position: relative;
    z-index: 1;
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.diary-card h3 {
    font-family: 'Anton', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.diary-card p {

    font-size: 0.85rem;
    line-height: 1.5;
    text-align: justify;
    color: #111;
}

/* Positioning */
.diary-pos-top {
    top: 0;
}

.diary-pos-bottom {
    bottom: 0;
}

.diary-pos-top.diary-level-1 {
    top: 20%;
}


.diary-pos-top.diary-level-2 {
    top: 10%;
}

.diary-pos-bottom.diary-level-1 {
    bottom: 20%;
}

.diary-pos-bottom.diary-level-2 {
    bottom: 10%;
}




.diary-text-first video {
    margin-top: 15px;
    margin-bottom: 0;
    order: 2;
}

.diary-text-first {
    display: flex;
    flex-direction: column;
}

/* Specific Video Style for Index */
.who-are-you-video {
    width: 35%;
    /* Default Desktop Width */
}

/* Side-by-side videos container (Desktop default) */
.video-containerx {
    display: flex;
    width: 100%;
    height: 100vh;
    /* Full viewport height */
    overflow: hidden;
    position: relative;
    z-index: 3;
    background-color: var(--background-color);
}

.side-videox {
    width: 50%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    /* Disable mouse interactions */
}


@media (max-width: 768px) {
    html {
        font-size: 0.5rem;
    }

    body {
        font-size: 1rem;
    }

    /* Reduce header font size by 30% on mobile (from 1rem down to 0.7rem) */
    nav li a {
        font-size: 1.5rem;
    }

    .diary-static-headline {
        font-size: 2.5rem;
    }

    .diary-column {
        flex: 0 0 300px;
        padding: 0 20px;
    }

    /* Index Mobile Adjustments */
    .split-layout {
        gap: 0;
        /* Removing gap to make text look like a single block */
    }

    .split-layout .post-content {
        margin-bottom: 0;
        max-width: 90%;
        width: 90%;
        /* Make text much wider on mobile */
    }

    .manifesto-section {
        padding: 2rem 5% 3rem 5%;
        margin-bottom: -5px;
    }

    .manifesto-section h2 {
        text-align: left;
        margin-bottom: 1.5rem;
    }

    /* Lava lamp poetic text on Mobile */
    .poetic-text {
        max-width: 90%;
        font-size: 1.2rem;
    }

    .who-are-you-video {
        width: 90%;
        max-width: 500px;
        /* Larger on mobile as requested */
    }

    .video-containerx {
        background-color: var(--background-color, #ffffff);
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
        min-height: auto;
        height: auto;
        flex-wrap: nowrap;
    }

    .video-col-fran,
    .video-col-iuli {
        width: 100%;
    }

    .side-videox {
        width: 100%;
        max-width: 100%;
        height: auto;
        box-shadow: none;
        border-radius: 0;
        flex: none;
    }

    .video-container {
        gap: 15px;
        padding: 20px;
    }


    /* Mensaje de Éxito */
    .success-message {
        text-align: center;
        padding: 3rem 0;
        animation: fadeIn 1s ease forwards;
    }

    .success-message h3 {
        font-family: var(--font-menu);
        /* Anton */
        font-size: 2.5rem;
        color: var(--primary-color);
        letter-spacing: 0.1em;
        text-transform: uppercase;
        margin-bottom: 1rem;
    }

    .success-message p {
        font-family: var(--font-serif);
        /* EB Garamond */
        font-size: 1.2rem;
        color: #111;
        font-style: italic;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }



    /* AÑADE ESTO PARA EL TEXTO */
    .post-content p {
        width: 90%;
        /* Esto hará que el párrafo ocupe todo el espacio de su contenedor (que ya está al 90%) */
    }
}

/* =============================================
   SECCIÓN DOS VÍDEOS SUPER 8
   ============================================= */

/* Contenedor principal: dos columnas en PC */
.video-containerx {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    padding: 4rem 0;
    box-sizing: border-box;
    align-items: center;
}

/* Columna izquierda (Fran) */
.video-col-fran {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Columna derecha (Iuli) */
.video-col-iuli {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilo compartido de los vídeos */
.side-videox {
    width: 50%;
    height: auto;
    display: block;
}

/* Clases independientes — añade aquí estilos propios de cada vídeo (filtros, bordes, etc.) */
/* .side-videox-fran { } */
/* .side-videox-iuli { } */
/* Móvil: uno debajo de otro, ocupando TODO el ancho */
@media (max-width: 768px) {
    .video-containerx {
        display: flex;
        /* Aseguramos que sea flex */
        flex-direction: column;
        padding: 0 !important;
        /* Eliminamos espacio lateral del padre */
        margin: 0 !important;
        /* Eliminamos márgenes que lo separen del borde */
        width: 100vw;
        /* Forzamos al ancho de la ventana (viewport width) */
        max-width: 100% !important;
        gap: 0;
    }

    .video-col-fran,
    .video-col-iuli {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        /* Eliminamos paddings internos */
        margin: 0 !important;
        display: block;
        /* Cambiar a block puede ayudar a evitar centrados fantasmas */
    }

    .side-videox {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        /* Mantiene la proporción del video */
        display: block;
        /* Elimina el espacio inferior de línea base */
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
}