/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    --bg-dark: #0a0a0a;
    --bg-light: #f4f4f4;
    --text-primary: #ffffff;
    --text-dark: #111111;
    
    /* TIPOGRAFÍAS */
    --hero-font: 'Oswald', sans-serif;
    --body-font: 'Inter', sans-serif;
    --accent-font: 'Syne', sans-serif;
    
    /* CONFIGURACIÓN HERO 3D */
    --hero-size: 14vw;
    --hero-weight: 700;
    --hero-tracking: -0.05em;
    --hero-height: 1.2;  
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--body-font);
    overflow-x: hidden;
}

/* =========================================
   2. HEADER & NAV
   ========================================= */
header {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 40px 60px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000;
    mix-blend-mode: difference;
    color: white;
}

header .brand {
    font-family: var(--accent-font); font-weight: 700; font-size: 1.5rem;
}

.logo-header {
    height: 40px; width: auto; display: block; object-fit: contain;
}

header nav a {
    color: white; text-decoration: none; margin-left: 50px;
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px;
    font-weight: 500;
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero-container {
    position: relative; width: 100%; height: 100vh;
    overflow: hidden;
}

.page-header-container {
    height: 70vh; 
    min-height: 600px;
}

.hero-overlay-text {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50; width: 90%; text-align: center; pointer-events: auto;
}

.hero-title-3d-wrapper {
    perspective: 1000px; display: inline-block; cursor: pointer;
}

.hero-title-flipper {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-title-3d-wrapper:hover .hero-title-flipper { transform: rotateX(180deg); }

.hero-face {
    display: block; font-family: var(--hero-font);
    font-weight: var(--hero-weight); font-size: var(--hero-size);
    letter-spacing: var(--hero-tracking); line-height: 0.9;
    color: white; backface-visibility: hidden; white-space: nowrap;
    transform: scaleY(1);
}

.hero-face.front { z-index: 15; }
.hero-face.back {
    position: absolute; top: 0; left: 0; width: 100%;
    transform: rotateX(180deg) scaleY(1);
    color: #ccc;
}

.hero-overlay-text p {
    margin-top: 40px; font-size: 1rem; letter-spacing: 0.3em;
    opacity: 0.8; font-weight: 300;
}

/* GRID DE FONDO */
.fullscreen-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(3, 1fr);
    height: 100vh; width: 100%; position: absolute; top: 0; left: 0; z-index: 1;
}
.grid-item-3d { width: 100%; height: 100%; perspective: 1000px; }
.flipper {
    position: relative; width: 100%; height: 100%;
    transition: transform 0.8s ease; transform-style: preserve-3d;
}
.grid-item-3d:hover .flipper { transform: rotateY(180deg); }
.face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; }
.face img {
    width: 100%; height: 100%; object-fit: cover;
    filter: brightness(0.4) grayscale(0.2); transition: filter 0.5s;
}
.grid-item-3d:hover .face img { filter: brightness(0.9) grayscale(0); }
.back { transform: rotateY(180deg); }
.scroll-indicator {
    position: absolute; bottom: 30px; width: 100%; text-align: center;
    font-size: 0.7rem; letter-spacing: 2px; opacity: 0.6;
    animation: bounce 2s infinite; pointer-events: none; z-index: 60;
}
@keyframes bounce { 0%, 100% {transform: translateY(0);} 50% {transform: translateY(-10px);} }

/* =========================================
   4. MARQUEES
   ========================================= */
.marquee-container {
    background-color: var(--text-primary); color: var(--bg-dark);
    padding: 30px 0; overflow: hidden; white-space: nowrap;
    position: relative; border-bottom: 1px solid #000;
}
.marquee-content { display: inline-block; animation: scroll 20s linear infinite; }
.marquee-item {
    font-family: var(--hero-font); font-size: 4rem; font-weight: 700;
    text-transform: uppercase; margin-right: 80px; letter-spacing: -2px;
}
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.photo-marquee-container {
    padding: 60px 0; background: #0a0a0a; overflow: hidden;
    border-bottom: 1px solid #222;
}
.photo-marquee-track {
    display: flex; gap: 20px; width: max-content;
    animation: scroll-photos 40s linear infinite;
}
.photo-marquee-track img {
    height: 300px; width: 450px; object-fit: cover;
    filter: grayscale(100%) brightness(0.8); transition: filter 0.3s, transform 0.3s;
}
.photo-marquee-track img:hover { filter: grayscale(0%) brightness(1); transform: scale(1.02); }
@keyframes scroll-photos { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =========================================
   5. SECCIONES COMUNES
   ========================================= */
.manifesto-section {
    background-color: var(--bg-dark);
    padding: 150px 60px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.manifesto-text {
    font-family: var(--hero-font); font-size: 4vw; line-height: 1.1; text-transform: uppercase;
    color: white; max-width: 90%;
}
.manifesto-text .highlight { color: #444; }
.manifesto-subtext {
    margin-top: 40px; font-size: 1.1rem; max-width: 700px; color: #aaa; line-height: 1.6;
}
.manifesto-credits {
    margin-top: 60px; font-family: var(--body-font); font-size: 1rem;
    letter-spacing: 2px; color: #888; display: flex; gap: 40px;
}

.section-label {
    font-family: var(--body-font); font-size: 0.8rem; letter-spacing: 4px;
    text-transform: uppercase; margin-bottom: 80px; display: block; opacity: 0.5;
    border-bottom: 1px solid currentColor; padding-bottom: 20px;
}

/* =========================================
   6. PROYECTOS (FEED)
   ========================================= */
.projects-feed {
    background-color: var(--bg-light); color: var(--text-dark);
    padding: 150px 60px; overflow: hidden;
}
.project-card {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 180px; gap: 80px;
    opacity: 0; transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card.reverse { flex-direction: row-reverse; }
.project-info { flex: 1; }
.project-info h2 {
    font-family: var(--hero-font); font-size: 5rem;
    line-height: 0.9; margin-bottom: 10px; text-transform: uppercase;
}
.project-info .category {
    display: block; font-size: 0.9rem; text-transform: uppercase;
    letter-spacing: 2px; margin-bottom: 30px; color: #666;
}
.project-info p {
    font-size: 1.2rem; line-height: 1.6; margin-bottom: 40px; max-width: 400px;
}
.project-info button {
    padding: 15px 50px; background: transparent; border: 1px solid #111;
    text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; cursor: pointer;
    transition: all 0.3s;
}
.project-info button:hover { background: #111; color: white; }

/* FIX IMÁGENES PROYECTOS */
.project-image { 
    flex: 1.3; 
    height: 600px; 
    overflow: hidden; 
    position: relative;
}
.project-image img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover .project-image img { transform: scale(1.05); }

/* =========================================
   7. SOCIAL MEDIA
   ========================================= */
.social-section {
    padding: 150px 60px; background-color: var(--bg-dark); color: white; border-top: 1px solid #222;
}
.social-header-container {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 60px; padding-bottom: 30px; border-bottom: 1px solid #333;
}
.social-title { font-family: var(--hero-font); font-size: 3rem; text-transform: uppercase; }
.social-subtitle { font-family: var(--body-font); font-size: 1rem; color: #888; letter-spacing: 1px; }
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.social-card {
    background: #111; border: 1px solid #222; padding: 30px;
    display: block; text-decoration: none; position: relative; overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}
.social-card:hover { transform: translateY(-5px); border-color: #444; }
.card-overlay {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; color: white;
}
.platform-name { font-family: var(--hero-font); font-size: 1.5rem; text-transform: uppercase; }
.handle { font-family: var(--body-font); font-size: 0.9rem; color: #888; }
.insta-grid-preview {
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: 400px;
}
.insta-grid-preview img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(50%); transition: filter 0.3s; }
.social-card:hover .insta-grid-preview img { filter: grayscale(0%); }
.tiktok-preview {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; height: 400px;
}
.tiktok-preview img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(50%); transition: filter 0.3s; }
.social-card:hover .tiktok-preview img { filter: grayscale(0%); }

/* =========================================
   8. VIDEO YOUTUBE BACKGROUND (FIXED)
   ========================================= */

.video-container-full {
    position: relative;
    width: 100%;
    height: 80vh; /* Altura de la sección */
    overflow: hidden; /* IMPORTANTE: Recorta lo que sobre del video */
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

/* Capa oscura para que el texto se lea bien */
.video-overlay-tint {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); 
    z-index: 2; /* Por encima del video */
    pointer-events: none;
}

/* El contenedor del iframe */
.video-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; /* Al fondo del todo */
    pointer-events: none; 
}

/* EL TRUCO MATEMÁTICO PARA QUE CUBRA TODO */
.video-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw; 
    height: 56.25vw; /* Ratio 16:9 basado en el ancho */
    
    /* Esto fuerza que nunca sea más pequeño que la pantalla */
    min-height: 100vh;
    min-width: 177.77vh; 
    
    /* Esto lo centra perfectamente */
    transform: translate(-50%, -50%);
}

.video-text-content {
    position: relative;
    z-index: 3; /* Por encima del tinte y del video */
    text-align: center;
}

.video-text-content h2 {
    font-family: var(--hero-font);
    font-size: 8vw;
    color: white;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.video-text-content p {
    font-family: var(--body-font);
    font-size: 1.2rem;
    color: #ccc;
    letter-spacing: 3px;
}

/* =========================================
   9. SECCIONES DE CONTENIDO
   ========================================= */
.expertise-section { padding: 150px 60px; background: #0f0f0f; border-bottom: 1px solid #222; }
.expertise-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 80px; border-bottom: 1px solid #333; padding-bottom: 40px; }
.expertise-header h3 { font-family: var(--hero-font); font-size: 3rem; text-transform: uppercase; }
.expertise-header p { max-width: 400px; text-align: right; color: #888; }
.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; }
.expertise-col h4 { font-family: var(--accent-font); font-size: 1.5rem; margin-bottom: 20px; color: white; }
.expertise-col p { color: #888; line-height: 1.6; }

.stats-section { padding: 100px 60px; background: white; color: black; border-bottom: 1px solid #eee; }
.stats-grid { display: flex; justify-content: space-around; text-align: center; }
.stat-item .stat-number { font-family: var(--hero-font); font-size: 6vw; display: block; line-height: 1; margin-bottom: 10px; }
.stat-item .stat-label { font-family: var(--body-font); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 3px; color: #555; }

.testimonials-section { padding: 150px 60px; background-color: var(--bg-dark); border-top: 1px solid #222; }
.testimonials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; margin-top: 60px; }
.testimonial-card blockquote { font-family: var(--body-font); font-size: 1.4rem; font-style: italic; color: #ccc; line-height: 1.5; margin-bottom: 40px; }
.testimonial-card cite { font-family: var(--hero-font); font-size: 1rem; text-transform: uppercase; letter-spacing: 2px; color: white; font-style: normal; display: block; border-top: 1px solid #333; padding-top: 20px; width: fit-content; }

.process-section { padding: 150px 60px; background-color: var(--bg-dark); color: white; border-top: 1px solid #222; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.process-step { border-left: 1px solid #333; padding-left: 30px; transition: border-color 0.3s; }
.process-step:hover { border-left: 1px solid white; }
.step-number { font-family: var(--hero-font); font-size: 3rem; color: #333; margin-bottom: 20px; display: block; }
.step-title { font-family: var(--accent-font); font-size: 1.5rem; margin-bottom: 15px; font-weight: 700; }
.step-desc { font-family: var(--body-font); font-size: 0.95rem; color: #888; line-height: 1.6; }

.clients-section { padding: 100px 60px; background-color: #111; border-top: 1px solid #222; }
.clients-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.client-name { font-family: var(--body-font); font-size: 1.1rem; color: #555; padding: 20px 0; border-bottom: 1px solid #222; transition: color 0.3s, padding-left 0.3s; cursor: default; }
.client-name:hover { color: white; padding-left: 10px; border-color: white; }

footer { padding: 100px 60px; background-color: var(--bg-dark); color: white; border-top: 1px solid #333; }
footer h2 { font-family: var(--hero-font); font-size: 3rem; text-transform: uppercase; opacity: 0.8; margin-bottom: 40px; }



/* =========================================
   10. ACADEMY: INTERACTIVE LIST (HOVER VERSION)
   ========================================= */
.courses-section-new { padding: 50px 60px 150px 60px; background-color: var(--bg-dark); color: white; }
.course-list-container { margin-top: 60px; border-top: 1px solid #333; }

.course-item { 
    border-bottom: 1px solid #333; 
    overflow: hidden; 
    transition: background-color 0.3s; 
    cursor: pointer;
}

.course-item:hover { background-color: #111; }

.course-header-bar { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 40px 0; 
}

.course-title-group { display: flex; align-items: baseline; gap: 30px; }
.course-num { font-family: var(--body-font); font-size: 1.2rem; color: #555; }

.course-header-bar h3 { 
    font-family: var(--hero-font); font-size: 3.5vw; 
    text-transform: uppercase; margin: 0; line-height: 1; 
    transition: color 0.3s; 
}

.course-item:hover .course-header-bar h3 { color: #ccc; }

.course-tag-line { 
    background: white; color: black; padding: 5px 15px; 
    font-family: var(--body-font); font-size: 0.8rem; 
    text-transform: uppercase; letter-spacing: 1px; transform: translateY(-5px); 
}

.course-price-trigger { display: flex; align-items: center; gap: 20px; }
.price-preview { font-family: var(--hero-font); font-size: 1.5rem; color: #888; }

.trigger-icon { 
    font-family: var(--hero-font); font-size: 2rem; 
    transition: transform 0.4s ease; 
}

/* Girar el icono al pasar el ratón */
.course-item:hover .trigger-icon { transform: rotate(45deg); }

/* --- AQUÍ ESTÁ LA CLAVE DEL HOVER --- */
.course-reveal-panel { 
    max-height: 0; /* Cerrado por defecto */
    opacity: 0; 
    padding-bottom: 0; 
    overflow: hidden; 
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

/* Al pasar el ratón por .course-item, se abre .course-reveal-panel */
.course-item:hover .course-reveal-panel { 
    max-height: 800px; /* Se abre */
    opacity: 1; 
    padding-bottom: 60px; 
}

.reveal-grid { 
    display: grid; 
    grid-template-columns: 1.5fr 2fr; /* Layout arreglado: Imagen | Texto */
    gap: 60px; 
    padding-top: 20px; 
    padding-left: 60px; 
}

.reveal-image-col { height: 400px; overflow: hidden; }

.reveal-image-col img { 
    width: 100%; height: 100%; object-fit: cover; 
    filter: grayscale(100%); transition: all 0.5s; transform: scale(1.05); 
}

.course-item:hover .reveal-image-col img { filter: grayscale(0%); transform: scale(1); }

.course-desc-big { 
    font-family: var(--body-font); font-size: 1.3rem; line-height: 1.5; 
    color: #ccc; margin-bottom: 40px; max-width: 600px; 
}

.course-features-list { list-style: none; margin-bottom: 50px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.course-features-list li { font-family: var(--body-font); font-size: 1rem; color: #888; display: flex; align-items: center; gap: 10px; }
.feat-icon { color: white; }

.buy-btn-large { 
    display: inline-block; background: white; color: black; 
    padding: 20px 50px; font-family: var(--hero-font); font-size: 1.2rem; 
    text-transform: uppercase; text-decoration: none; letter-spacing: 1px; 
    transition: all 0.3s; border: 1px solid white; 
}
.buy-btn-large:hover { background: transparent; color: white; }

/* Responsive */
@media (max-width: 900px) {
    .reveal-grid { grid-template-columns: 1fr; padding-left: 0; }
    .course-header-bar h3 { font-size: 7vw; }
    .course-item:hover .course-reveal-panel { max-height: 1200px; } /* Más altura para que quepa todo en móvil */
}
/* =========================================
   11. AGENCY PAGE SPECIFIC
   ========================================= */
.agency-story-section { padding: 100px 60px; background-color: var(--bg-dark); border-bottom: 1px solid rgba(255,255,255,0.1); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.story-content h3 { font-family: var(--hero-font); font-size: 3rem; margin-bottom: 30px; color: white; text-transform: uppercase; }
.story-content p { font-family: var(--body-font); font-size: 1.1rem; line-height: 1.7; color: #ccc; margin-bottom: 20px; }

/* FIX IMAGEN HISTORIA */
.story-image img { 
    width: 100%; 
    height: 500px; 
    object-fit: cover;
    filter: grayscale(100%); 
    transition: filter 0.5s ease;
}
.story-image img:hover { filter: grayscale(0%); }

.methodology-deep-section { padding: 150px 60px; background-color: #0f0f0f; }
.method-header { margin-bottom: 80px; }
.method-header h3 { font-family: var(--hero-font); font-size: 4rem; color: white; text-transform: uppercase; }
.method-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; }
.method-col h4 { font-family: var(--accent-font); font-size: 1.5rem; color: white; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #333; }
.method-col p { font-family: var(--body-font); font-size: 1rem; color: #888; line-height: 1.6; }

.founders-section { padding: 150px 60px; background-color: var(--bg-dark); color: white; border-top: 1px solid #222; }
.founders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 80px; }
.founder-card { position: relative; }

/* FIX IMÁGENES FUNDADORES */
.founder-img { 
    width: 100%; 
    height: 700px; 
    overflow: hidden; 
    margin-bottom: 30px; 
    filter: grayscale(100%); 
    transition: filter 0.5s; 
}
.founder-card:hover .founder-img { filter: grayscale(0%); }
.founder-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    object-position: center;
}

.founder-name { font-family: var(--hero-font); font-size: 3rem; text-transform: uppercase; margin-bottom: 10px; }
.founder-role { font-family: var(--body-font); font-size: 1rem; letter-spacing: 2px; opacity: 0.6; text-transform: uppercase; }

.clients-list-clean { display: flex; flex-direction: column; border-top: 1px solid #333; }
.client-row { display: grid; grid-template-columns: 1fr 2fr 1fr; padding: 40px 0; border-bottom: 1px solid #333; text-decoration: none; transition: background-color 0.3s, padding-left 0.3s; }
.client-row:hover { background-color: #111; padding-left: 20px; }
.client-year { font-family: var(--body-font); color: #555; }
.client-title { font-family: var(--hero-font); font-size: 2rem; color: white; text-transform: uppercase; }
.client-service { font-family: var(--body-font); color: #888; text-align: right; }

.location-section { padding: 150px 60px; background-color: var(--bg-dark); text-align: center; border-top: 1px solid #222; }
.location-content h3 { font-family: var(--hero-font); font-size: 3rem; color: white; margin-bottom: 30px; }
.location-content p { font-family: var(--body-font); font-size: 1.2rem; color: #888; max-width: 700px; margin: 0 auto; line-height: 1.6; }

/* =========================================
   12. ANIMACIONES GENERALES & RESPONSIVE
   ========================================= */
.slide-left { transform: translateX(-100px); }
.slide-right { transform: translateX(100px); }
.slide-up { transform: translateY(50px); opacity: 0; transition: all 1s ease; }
.visible { opacity: 1; transform: translate(0); }

@media (max-width: 900px) {
    .story-grid { grid-template-columns: 1fr; }
    .method-cols { grid-template-columns: 1fr; }
    .client-row { grid-template-columns: 1fr; gap: 10px; }
    .client-service { text-align: left; }
    .client-title { font-size: 1.5rem; }
    .founders-grid { grid-template-columns: 1fr; }
    .founder-img { height: 500px; }
}

@media (max-width: 768px) {
    header { padding: 20px; }
    .logo-header { height: 30px; }
    .fullscreen-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-overlay-text { width: 95%; }
    .manifesto-text { font-size: 8vw; }
    .marquee-item { font-size: 2.5rem; }
    .video-text-content h2 { font-size: 15vw; }
    .project-card { flex-direction: column !important; gap: 40px; text-align: center; }
    .project-info h2 { font-size: 3rem; }
    .process-grid, .clients-grid, .expertise-grid, .testimonials-grid { grid-template-columns: 1fr; gap: 60px; }
    .stats-grid { flex-direction: column; gap: 50px; }
    .social-grid { grid-template-columns: 1fr; }
    .expertise-header { flex-direction: column; align-items: flex-start; gap: 20px; }
    .expertise-header p { text-align: left; }
    .course-header-bar { flex-direction: column; align-items: flex-start; gap: 20px; }
    .course-price-trigger { width: 100%; justify-content: space-between; }
    .course-header-bar h3 { font-size: 8vw; }
    .courses-section-new { padding: 50px 20px; }
    .contact-form-section { padding: 100px 30px; } 
    .form-row { grid-template-columns: 1fr; gap: 40px; }
    .submit-btn { width: 100%; text-align: center; }
    .footer-col-contact { border-left: none !important; padding-left: 0 !important; }
}

/* =========================================
   14. CURSOR PERSONALIZADO (FIXED)
   ========================================= */
* {
    /* ESTADO NORMAL: Se usa la imagen BLANCA (cursor-mafe.png) */
    cursor: url('cursor/cursor-mafe.png') 16 16, auto !important;
}

/* Elementos interactivos (botones, enlaces, tarjetas...) */
a, a *, button, button *, input[type="submit"], input[type="button"],
.project-card, .project-card *, .course-header-bar, .course-header-bar *,
.buy-btn, .buy-btn-large, .cta-button, .cta-button-big,
.social-card, .social-card *, .logo-header,
.next-project, .next-project *, .hero-title-3d-wrapper,
.hero-title-flipper span, .trigger-icon, .course-reveal-panel,
.client-row, .whatsapp-btn, .whatsapp-btn *
{
    /* ESTADO HOVER: Se usa la imagen NEGRA (cursor-hover.png) */
    cursor: url('cursor/cursor-hover.png') 16 16, pointer !important;
}

/* Refuerzo para el estado hover explícito */
a:hover, button:hover, .project-card:hover, .social-card:hover, .course-item:hover, .client-row:hover {
    cursor: url('cursor/cursor-hover.png') 16 16, pointer !important;
}

video { pointer-events: none; }

/* =========================================
   15. WHATSAPP FLOTANTE
   ========================================= */

.whatsapp-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    display: flex;
    flex-direction: column; 
    align-items: flex-end;
    /* Animación de entrada */
    animation: fadeInUp 0.5s ease-out 0.5s both; 
}

/* El botón verde redondo */
.whatsapp-btn {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    cursor: url('cursor/cursor%20hover.png') 16 16, pointer !important;
}

/* Hover del botón */
.whatsapp-btn:hover {
    transform: scale(1.1);
    background-color: #20b858;
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

/* --- ESTILOS DE LA MARQUESINA (CAJA DE TEXTO) --- */

.whatsapp-marquee-wrapper {
    position: absolute;
    right: 70px; 
    top: 12px;   
    
    /* CAMBIO: Caja más ancha (antes 180px) */
    width: 220px; 
    height: 36px;
    background-color: white;
    border-radius: 20px;
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    
    /* Animación de aparición */
    opacity: 0;
    transform: translateX(10px);
    animation: showTooltip 0.5s ease-out 1s forwards;
    
    display: flex;
    align-items: center;
    pointer-events: none; 
}

/* Flechita del globo */
.whatsapp-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent white;
}

/* El riel que se mueve */
.marquee-track {
    display: flex;
    white-space: nowrap; 
    /* Animación infinita lenta */
    animation: scrollText 15s linear infinite; /* Un poco más lento para que se lea mejor */
}

/* Estilo del texto */
.marquee-track span {
    font-family: var(--body-font);
    
    /* CAMBIO: Letra más pequeña (antes 0.75rem) */
    font-size: 0.65rem; 
    
    font-weight: 700;
    color: #111;
    padding-right: 15px; 
    letter-spacing: 1px; /* Un poco más de espacio entre letras para legibilidad */
    text-transform: uppercase;
}

/* ANIMACIONES */

@keyframes scrollText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

@keyframes showTooltip {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Onda de pulso verde */
.whatsapp-btn::before {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    background-color: #25d366;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(1); opacity: 0.7; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* Responsive: Ocultar el texto en móvil */
@media (max-width: 768px) {
    .whatsapp-container { bottom: 20px; right: 20px; }
    .whatsapp-btn { width: 50px; height: 50px; }
    .whatsapp-btn svg { width: 28px; height: 28px; }
    .whatsapp-marquee-wrapper { display: none; } 
}

/* =========================================
   16. LOGO STORY SECTION
   ========================================= */

.logo-story-section {
    padding: 150px 60px;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: 1px solid #222;
    overflow: hidden; 
}

.logo-display {
    margin-bottom: 80px; 
    width: 100%;
    display: flex;
    justify-content: center;
}

.big-logo {
    /* TAMAÑO MÁS PEQUEÑO QUE ANTES (50% de la pantalla) */
    width: 50vw; 
    max-width: 800px; /* Tope máximo para que no se pase en pantallas gigantes */
    height: auto;
    
    /* FILTRO INFALIBLE PARA BLANCO PURO */
    filter: brightness(0) invert(1);
    
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo-story-section:hover .big-logo {
    transform: rotate(360deg) scale(1.02); 
}

.logo-narrative {
    max-width: 800px;
}

.logo-narrative h3 {
    font-family: var(--hero-font);
    font-size: 2rem;
    color: white;
    text-transform: uppercase;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.logo-narrative p {
    font-family: var(--body-font);
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .logo-story-section { padding: 100px 30px; }
    .big-logo { width: 80vw; } /* En móvil un poco más grande para que se vea */
    .logo-narrative h3 { font-size: 1.5rem; }
}

/* =========================================
   17. SERVICES & WORKFLOW (WORK PAGE)
   ========================================= */

/* SECCIÓN DE SERVICIOS DETALLADOS */
.services-detail-section {
    padding: 150px 60px;
    background-color: var(--bg-dark);
    border-top: 1px solid #222;
}

.services-header {
    margin-bottom: 80px;
    max-width: 800px;
}

.services-header h3 {
    font-family: var(--hero-font);
    font-size: 3.5rem;
    text-transform: uppercase;
    color: white;
    line-height: 1;
}

.services-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.service-card-item {
    background: #111;
    padding: 40px;
    border: 1px solid #222;
    transition: transform 0.3s, border-color 0.3s;
}

.service-card-item:hover {
    transform: translateY(-10px);
    border-color: #444;
}

.service-icon {
    font-size: 2rem;
    color: white;
    margin-bottom: 25px;
    display: block;
}

.service-card-item h4 {
    font-family: var(--hero-font);
    font-size: 1.5rem;
    color: white;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.service-card-item p {
    font-family: var(--body-font);
    font-size: 1rem;
    color: #888;
    line-height: 1.6;
}

/* SECCIÓN DE WORKFLOW (AJUSTADA) */
.workflow-section {
    padding: 150px 60px;
    background-color: #0f0f0f; /* Ligeramente más claro que el fondo puro */
    border-top: 1px solid #222;
    color: white;
}

.workflow-header {
    margin-bottom: 80px;
    max-width: 600px;
}

.workflow-header h3 {
    font-family: var(--hero-font);
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.workflow-header p {
    font-family: var(--body-font);
    font-size: 1.1rem;
    color: #888;
    line-height: 1.6;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
}

.workflow-step {
    border-top: 1px solid #333;
    padding-top: 30px;
    transition: transform 0.3s;
}

.workflow-step:hover {
    transform: translateY(-10px);
    border-color: white;
}

.step-num {
    font-family: var(--hero-font);
    font-size: 1.5rem;
    color: #444;
    display: block;
    margin-bottom: 20px;
}

.workflow-step h4 {
    font-family: var(--accent-font);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.workflow-step p {
    font-family: var(--body-font);
    font-size: 1rem;
    color: #999;
    line-height: 1.6;
    margin-bottom: 30px;
}

.timeline {
    font-family: var(--hero-font);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    background: #222;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .services-cards-grid, .workflow-grid { 
        grid-template-columns: 1fr; 
        gap: 40px; 
    }
}

/* =========================================
   18. CONTACT FORM ADVANCED STYLES (CENTRADO Y CODIFICADO)
   ========================================= */

.contact-form-section {
    padding: 100px 60px;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.section-label {
    width: 100%;
    max-width: 900px; 
    text-align: left; 
}

.form-grid {
    width: 100%;
    max-width: 900px; 
    margin-top: 60px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left; 
}

.form-group label {
    font-family: var(--body-font);
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input, 
.form-group textarea,
.form-group select {
    background: transparent;
    border: none;
    border-bottom: 1px solid #444;
    color: white;
    font-family: var(--body-font);
    font-size: 1.2rem;
    padding: 15px 0;
    transition: border-color 0.3s;
    border-radius: 0; 
    appearance: none;
}

.form-group input:focus, 
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-bottom: 1px solid white;
}

::placeholder {
    color: #444;
    font-weight: 300;
}

/* FIX PARA HOSTINGER: SVG CODIFICADO */
.styled-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0px center;
}
.styled-select option {
    background-color: #111;
    color: white;
}

/* Botón de Enviar CENTRADO */
.submit-btn {
    margin-top: 40px;
    background: white;
    color: black;
    border: none;
    padding: 20px 60px;
    font-family: var(--hero-font);
    font-size: 1.5rem;
    text-transform: uppercase;
    cursor: pointer;
    align-self: center; 
    transition: transform 0.3s, background-color 0.3s;
}

.submit-btn:hover {
    background-color: #ccc;
    transform: translateY(-5px);
}

/* Footer links */
.footer-link {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    font-family: var(--body-font);
    font-size: 1.1rem;
    transition: opacity 0.3s;
}
.footer-link:hover {
    opacity: 0.6;
}