/* ========================================= */
/* 1. DECLARACIÓN DE FUENTES (@font-face) */
/* ========================================= */

/* Editorial New Regular (Títulos Secundarios) */
@font-face {
    font-family: 'Editorial New';
    src: url('fonts/EditorialNew-Regular.woff2') format('woff2'),
         url('fonts/EditorialNew-Regular.woff') format('woff');
    font-weight: 400; /* Regular */
    font-style: normal;
    font-display: swap;
}

/* Editorial New Ultrabold (ISAAC) */
@font-face {
    font-family: 'Editorial New';
    src: url('fonts/EditorialNew-Ultrabold.woff2') format('woff2'),
         url('fonts/EditorialNew-Ultrabold.woff') format('woff');
    font-weight: 900; /* Ultrabold */
    font-style: normal;
    font-display: swap;
}

/* Editorial New Ultralight Italic (CORREA.) */
@font-face {
    font-family: 'Editorial New';
    src: url('fonts/EditorialNew-UltralightItalic.woff2') format('woff2'),
         url('fonts/EditorialNew-UltralightItalic.woff') format('woff');
    font-weight: 100; /* Ultralight */
    font-style: italic;
    font-display: swap;
}

/* PP Mori Regular (Cuerpo) */
@font-face {
    font-family: 'PP Mori';
    src: url('fonts/PPMori-Regular.woff2') format('woff2'),
         url('fonts/PPMori-Regular.woff') format('woff');
    font-weight: 400; /* Regular */
    font-style: normal;
    font-display: swap;
}

/* PP Mori SemiBold (Subtítulos/Énfasis) */
@font-face {
    font-family: 'PP Mori';
    src: url('fonts/PPMori-SemiBold.woff2') format('woff2'),
         url('fonts/PPMori-SemiBold.woff') format('woff');
    font-weight: 600; /* SemiBold */
    font-style: normal;
    font-display: swap;
}

/* ========================================= */
/* 2. ESTILOS ESPECÍFICOS DE PORTADA */
/* ========================================= */

.ultrabold {
    font-weight: 900;
}

.ultralight-italic {
    font-weight: 100;
    font-style: italic;
    margin-left: 10px;
}


/* === 0. RESET GLOBAL === */
body {
    background-color: #F5F5F7;
    font-family: 'PP Mori', sans-serif;
    margin: 0; padding: 0; color: #1D1D1F; overflow-x: hidden;
}
img, video { display: block; width: 100%; }
* { box-sizing: border-box; }

/* === 1. HERO === */
.hero-section { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; }
.hero-section h1 {
    font-size: 4.8rem;
    margin: 0; letter-spacing: -0.02em;
    transition: transform 0.3s ease;
    display: inline-block;
    font-family: 'Editorial New', serif;
    font-weight: 400;
}
.hero-section h1:hover { transform: scale(1.1); }
.scroll-indicator { position: absolute; bottom: 30px; opacity: 0.5; animation: bounce 2s infinite; }

/* === 2. BIG CARDS (SPLIT 70/30) === */
.featured-container { max-width: 1300px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 60px; }
.big-card {
    display: flex; flex-direction: row-reverse;
    width: 100%; height: 550px;
    border-radius: 30px; overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease; background: #ccc;
}
.big-card:hover { transform: scale(1.01); z-index: 5; }
.big-media-block { width: 70%; height: 100%; position: relative; background: #000; }

.big-info-block { width: 30%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 40px; background-color: #333; transition: background-color 0.5s ease; }
.info-content { width: 100%; }
.eyebrow { text-transform: uppercase; font-size: 12px; font-weight: 600; margin-bottom: 10px; letter-spacing: 1px; opacity: 0.8; }
.big-info-block h2 {
    font-size: 32px; margin: 0 0 15px 0; line-height: 1.1;
    font-family: 'Editorial New', serif;
    font-weight: 400;
}
.desc { font-size: 16px; margin-bottom: 30px; opacity: 0.9; }

/* BOTÓN ENMARCADO (PARA PROYECTOS DESTACADOS) */
.framed-btn {
    border: 1px solid rgba(255,255,255, 0.5);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
}
.framed-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }

.framed-btn-text { display: none; }


/* === 3. GALERÍA (CARRUSEL) === */
.carousel-section {
    margin-top: 100px;
    padding-left: 0;
    padding-right: 0;
}
.section-title {
    max-width: 1300px;
    margin: 0 auto 30px auto;
    padding-left: 20px;
    font-size: 40px; font-weight: 400;
    font-family: 'Editorial New', serif;
}

/* NUEVO CONTENEDOR PARA ALINEACIÓN */
.scroller-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.projects-scroller {
    display: flex; overflow-x: auto;
    scroll-snap-type: x mandatory; gap: 30px;

    /* FIX CRUCIAL: ALINEACIÓN PERFECTA DEL PRIMER ELEMENTO */
    padding-left: max(20px, calc((100vw - 1300px) / 2 + 20px));
    padding-right: 20px;
    padding-bottom: 40px;

    scrollbar-width: none;
}
.projects-scroller::-webkit-scrollbar { display: none; }
.project-card {
    flex: 0 0 400px; height: 600px;
    background: #fff; border-radius: 25px; position: relative; overflow: hidden;
    scroll-snap-align: start;
    transition: transform 0.3s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.project-card:hover { transform: scale(1.03); z-index: 10; }
.card-image { height: 80%; width: 100%; }
.card-image img, .card-image video { width: 100%; height: 100%; object-fit: cover; }
.card-info { padding: 25px; height: 20%; position: relative; }

/* Títulos de tarjetas a Editorial New Regular */
.card-info h3 {
    font-size: 20px; margin: 0;
    font-weight: 400;
    font-family: 'Editorial New', serif;
}

.card-info p { color: #86868b; margin: 5px 0 0 0; }
.plus-btn {
    position: absolute; bottom: 25px; right: 25px;
    width: 45px; height: 45px;
    background: #004fff; color: #fff;
    border: none; border-radius: 50%; font-size: 24px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: transform 0.2s;
}
.plus-btn:hover { background: #004fff; filter: brightness(1.1); transform: scale(1.1) rotate(90deg); }

/* === 4. ACERCA DE MÍ (ACORDEÓN Y VIÑETAS PERSONALIZADAS) === */
.about-section { max-width: 1300px; margin: 100px auto; padding: 20px; }
.about-container { display: flex; gap: 60px; background: #fff; padding: 60px; border-radius: 30px; align-items: flex-start; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.about-menu, .about-visual { flex: 1; }
.about-visual { height: 500px; border-radius: 20px; overflow: hidden; background: #eee; }
.about-visual img { object-fit: cover; height: 100%; transition: opacity 0.4s ease; }

.about-item { border-bottom: 1px solid #e5e5e5; padding: 25px 0; cursor: pointer; }
.about-header { display: flex; justify-content: space-between; align-items: center; }
.about-header h3 {
    font-size: 24px; color: #86868b; margin: 0; transition: 0.3s;
    font-weight: 600;
}
/* ESTILOS DEL CONTENEDOR DEL ICONO/MANITA */
.about-header .arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: #86868b;
    width: 20px;
    height: 20px;
}
.icon-manita {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.about-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), opacity 0.5s ease;
    opacity: 0;
    line-height: 1.6;
    color: #1D1D1F;
}
.about-item.active .about-header h3 { color: #1D1D1F; font-weight: 600; }
/* ESTADO ACTIVO: ROTA EL ICONO */
.about-item.active .about-header .arrow { transform: rotate(180deg); }
.about-item.active .about-body {
    max-height: 800px;
    opacity: 1;
    margin-top: 20px;
}

/* ESTILO DE VIÑETAS PERSONALIZADAS (ASTERISCO AZUL) */
.about-body ul {
    list-style: none;
    padding-left: 0;
}

.about-body ul li {
    padding-left: 1.2em;
    position: relative;
    margin-bottom: 8px;
}

.about-body ul li::before {
    content: '*';
    color: #004fff; /* COLOR DE MARCA AZUL */
    font-weight: 600;
    position: absolute;
    left: 0;
    top: 0;
}


/* === 5. CONTACTO Y BOTONES === */
.contact-section { max-width: 800px; margin: 80px auto; padding: 60px 20px; text-align: center; background: #fff; border-radius: 30px; }
.contact-section h2 {
    font-size: 42px; margin-bottom: 15px;
    font-family: 'Editorial New', serif;
    font-weight: 400;
}
.contact-actions { display: flex; gap: 20px; justify-content: center; margin-top: 30px; }
.btn-contact { padding: 15px 35px; border-radius: 30px; text-decoration: none; font-weight: 600; transition: 0.2s; }
.btn-primary {
    background: #004fff; color: #fff;
}
.btn-primary:hover {
    background: #004fff;
    filter: brightness(1.1);
    transform: scale(1.05);
}
.btn-secondary { background: #f5f5f7; color: #1d1d1f; }
.site-footer { text-align: center; padding: 40px 0; color: #86868b; font-size: 12px; border-top: 1px solid #e5e5e5; }

/* === MODALES PRO === */
.modal-overlay {
    display: none !important;
    position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(10px); z-index: 9999; justify-content: center; align-items: flex-end;
}
@media (min-width: 769px) { .modal-overlay { align-items: center; } }

.modal-content {
    background: #fff; width: 100%; max-width: 900px;
    height: 90%;
    border-radius: 20px 20px 0 0; position: relative;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.16,1,0.3,1);
}
@media (min-width: 769px) { .modal-content { height: 85%; border-radius: 20px; } }

.modal-header {
    height: 80px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 30px; background: rgba(255,255,255,0.95); border-bottom: 1px solid #f0f0f0; z-index: 10;
    position: sticky; top: 0;
}
.modal-title h2 {
    margin: 0; font-size: 22px;
    font-weight: 400;
    color: #1D1D1F;
    font-family: 'Editorial New', serif;
}
.modal-category-tag { font-size: 12px; color: #86868b; text-transform: uppercase; margin-top: 4px; letter-spacing: 0.5px; }
.modal-close-circle { width: 36px; height: 36px; background: #E8E8ED; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; border: none; color: #555; font-size: 18px; font-weight: bold; }
.modal-close-circle:hover { background: #D2D2D7; transform: scale(1.05); color: #000; }

.modal-body {
    position: absolute; top: 80px; bottom: 0; left: 0; right: 0;
    overflow-y: auto;
    padding: 40px 30px;
    -webkit-overflow-scrolling: touch;
}

/* ESTILO DE ENVOLVENTE BLANCO ROTO PARA EL TEXTO */
.modal-intro {
    /* FONDO BLANCO ROTO PARA QUE DESTAQUE SOBRE EL FONDO BLANCO DEL MODAL */
    background-color: #F8F8FA; /* CAMBIO CLAVE: Gris muy claro */
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0px 00px rgba(0,0,0,0.05);

    max-width: 100%;
    margin: 0 0 50px 0;

    font-size: 18px;
    line-height: 1.6;
    color: #333;
}
/* Asegurar que el texto dentro del envolvente no sea demasiado ancho */
.modal-intro p {
    max-width: 700px;
    margin: 0 auto 1em auto;
    text-align: left;
}
.modal-intro p:last-child {
    margin-bottom: 0;
}

.modal-gallery img, .modal-gallery video { width: 100%; height: auto; margin-bottom: 30px; border-radius: 12px; background: #f5f5f7; }

/* ESTILOS BENTO BOX (Asegúrate de haber añadido las reglas de la respuesta anterior) */
/* ... */

/* OCULTA LA IMAGEN USADA SOLO PARA EXTRAER EL COLOR DE LOS VIDEOS */
.color-source-poster {
    display: none !important;
    visibility: hidden;
}


@keyframes bounce { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-10px);} }
@keyframes slideUp { from{transform:translateY(100%);opacity:0;} to{transform:translateY(0);opacity:1;} }

/* === RESPONSIVO (MÓVIL) === */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 3.2rem;
    }
    /* FIX MÓVIL: La alineación del carrusel en móvil */
    .projects-scroller {
        padding-left: 20px;
    }
    .modal-header { height: 70px; }
    .modal-body { top: 70px; }
    /* Ajuste para el nuevo envolvente en móvil */
    .modal-intro {
        padding: 20px;
        margin: 0 0 30px 0;
    }
    .modal-intro p {
        max-width: 100%;
    }
    /* FIN Ajuste para el nuevo envolvente en móvil */
    .big-card { flex-direction: column-reverse; height: auto; }
    /* REMOVE BLUR ON MOBILE FOR FASTER RENDERING */
    .big-media-block img, .big-media-block video {
        filter: blur(0px);
    }
    .big-media-block { width: 100%; height: 300px; }
    .big-info-block { width: 100%; padding: 30px; }
    .project-card { flex: 0 0 85vw; height: 500px; }
    .hero-section h1 { font-size: 2.5rem; }
    .about-container { flex-direction: column-reverse; padding: 30px; }
    .about-visual { width: 100%; height: 250px; margin-bottom: 20px; }
    .contact-actions { flex-direction: column; }
}

/* ========================================= */
/* FIX: COLOR DE TEXTO FIJO EN TARJETA 1 */
/* ========================================= */

.big-card:first-child .big-info-block,
.big-card:first-child .big-info-block h2,
.big-card:first-child .eyebrow,
.big-card:first-child .desc,
.big-card:first-child .framed-btn {
    /* Color fijo de alto contraste (Blanco) */
    color: #FFFFFF !important;
}

/* El fondo del botón también debe ser claro para contraste */
.big-card:first-child .framed-btn {
    border-color: rgba(255, 255, 255, 0.5) !important;
}
