:root {
    --bg: #050505;
    --text: #ffffff;
    --accent: #c5a059;
    --grey: #a0a0a0;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.03);
    --transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: 100px 0; }
.section-label { font-size: 0.7rem; letter-spacing: 4px; text-transform: uppercase; color: var(--accent); margin-bottom: 4rem; text-align: center; }
.logo {
    font-family: 'Playfair Display', serif; /* O la que estés usando */
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 1.2rem;
    text-decoration: none; /* ELIMINA EL SUBRAYADO */
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.logo:hover {
    color: var(--accent); /* Cambia a dorado al pasar el ratón */
}
/* HEADER & MOBILE MENU */
#main-header { position: fixed; width: 100%; z-index: 1000; padding: 1.5rem 0; transition: var(--transition); }
#main-header.scrolled { background: rgba(5,5,5,0.9); backdrop-filter: blur(15px); padding: 1rem 0; border-bottom: 1px solid var(--border); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Playfair Display', serif; font-weight: 700; letter-spacing: 3px; font-size: 1.2rem; z-index: 1100;}

.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; transition: var(--transition); }
.nav-links a { text-decoration: none; color: #fff; font-size: 0.75rem; letter-spacing: 1.5px; opacity: 0.6; transition: 0.3s; }
.nav-links a:hover { opacity: 1; color: var(--accent); }
.nav-cta { border: 1px solid var(--accent); padding: 0.5rem 1.2rem; border-radius: 50px; opacity: 1 !important; }

.menu-toggle { display: none; cursor: pointer; z-index: 1100; }
.bar { display: block; width: 25px; height: 2px; margin: 5px auto; background: #fff; transition: var(--transition); }

/* HERO */
#hero { height: 85vh; max-height: 900px; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; }
.video-background { position: absolute; inset: 0; z-index: -1; }
#bg-video { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
h1 { font-family: 'Playfair Display', serif; font-size: clamp(2.5rem, 6vw, 5rem); margin-bottom: 1.5rem; font-style: italic; }
.hero-content p { font-size: 1.1rem; color: var(--grey); }
.cta-group { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* --- DOSSIER INSTITUCIONAL - ESTILOS REFINADOS --- */
#dossier {
    padding: 100px 0;
    background: var(--bg);
}

.dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.dossier-content {
    text-align: left;
}

.dossier-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.dossier-content p {
    color: var(--grey);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

/* Links y botones del dossier */
.dossier-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.link-visual {
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.link-visual .dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 12px;
}

.link-visual:hover { color: var(--accent); }

.btn-download-mini {
    color: var(--grey);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-left: 1px solid var(--border);
    padding-left: 2rem;
    transition: var(--transition);
}

.btn-download-mini:hover { color: #fff; }

/* --- CONTENEDOR LIBRO (INTERACTIVO) --- */
.dossier-visual {
    display: flex;
    justify-content: flex-end;
}

.book-container {
    perspective: 1500px;
    cursor: pointer;
    width: 500px;  /* Ancho mayor para acomodar el formato apaisado */
    height: 300px; /* Altura más baja para que sea horizontal */
}

.book {
    position: relative;
    width: 500px;  /* Ancho ideal para tu imagen apaisada */
    height: 280px; /* Altura calculada para mantener la proporción de tu captura */
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    backface-visibility: hidden;
    border: 1px solid var(--border);
    background: #0a0a0a;
}

.front-page {
    z-index: 2;
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.front-page img {
    width: 100%;
    height: 100%;
    /* CAMBIO CRÍTICO: 'contain' muestra toda la imagen sin recortar nada */
    object-fit: contain;
    /* El color de fondo asegura que las franjas (si las hay) sean del mismo tono que tu web */
    background-color: #050505;
    /* Evita que la imagen se vea borrosa al escalar */
    image-rendering: -webkit-optimize-contrast;
}

.back-page {
    z-index: 1;
}

.back-page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

/* Efecto de apertura 3D */
.book-container:hover .book {
    transform: translateX(10%); /* Desplaza el libro al abrirse */
}

.book-container:hover .front-page {
    transform: rotateY(-120deg);
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
}

.cover-overlay span {
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 3px;
    border: 1px solid #fff;
    padding: 10px 20px;
    text-transform: uppercase;
}
.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Corregido error de sintaxis previo */
    object-position: center top;
    background-color: #050505;
    image-rendering: -webkit-optimize-contrast;
}

.book-container:hover .cover-overlay { opacity: 1; }

.book-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% imágenes, 50% texto */
    gap: 3rem;
    align-items: center;
}

.book-gallery {
    position: relative;
    display: flex;
    justify-content: center;
}

.main-cover {
    width: 180px;
    z-index: 2;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
    transition: transform 0.4s ease;
}

.inner-page {
    position: absolute;
    width: 160px;
    right: -20px;
    bottom: -20px;
    z-index: 1;
    border: 1px solid var(--border);
    opacity: 0.8;
    transition: transform 0.4s ease;
}
/* ==========================================
/* ==========================================
/* ==========================================
   PIANO MASTER: DISEÑO MEDIANO Y ELEGANTE
   ========================================== */

/* Contenedor específico para tamaño mediano (p.ej. 900px) */
.container-medium {
    max-width: 900px; /* Tamaño mediano controlado */
    margin: 0 auto;
    padding: 0 2rem;
}

.master-display-medium {
    display: flex;
    flex-direction: column; /* Imagen arriba, texto abajo */
    align-items: center;
    gap: 35px; /* Espaciado elegante */
}

.master-hero-img-medium {
    width: 100%;
    /* No limitamos el ancho aquí, dejamos que el contenedor container-medium mande */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.master-hero-img-medium img {
    width: 100%;
    /* PROPIEDAD CLAVE: 'height: auto'.
       Esto elimina el estiramiento vertical y
       mantiene la proporción natural de la imagen.
       ¡Se verá entera sin recortes!
    */
    height: auto;
    display: block;
    object-fit: contain; /* Seguridad extra */
}

.master-content-bottom-medium {
    text-align: center;
    max-width: 700px; /* Texto centrado y legible */
}

.master-content-bottom-medium h3 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.8rem); /* Tipografía contenida */
    margin-bottom: 1.2rem;
    color: #fff;
}

.master-content-bottom-medium p {
    font-size: 1rem;
    color: #a0a0a0;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Ajuste del botón para que no se vea gigante en web */
.master-content-bottom-medium .btn {
    max-width: 350px;
    margin: 0 auto;
}

/* Mobile: Ajustamos espacios */
@media (max-width: 768px) {
    .container-medium { padding: 0 1.5rem; }
    .master-display-medium { gap: 25px; }
}=======
         BOTONES: ESTILO LARGO Y UNIFICADO (WEB Y MÓVIL)
         ========================================== */
      .btn {
          display: block;
          width: 100%;
          /* En web no queremos que sean infinitos, 450px es el tamaño ideal */
          max-width: 450px;
          margin: 1rem auto; /* Los centramos */
          padding: 1.2rem 2rem;
          text-align: center;
          text-transform: uppercase;
          letter-spacing: 2px;
          font-size: 0.85rem;
          font-weight: 600;
          border-radius: 50px;
          transition: all 0.3s ease;
          text-decoration: none;
          cursor: pointer;
      }

      .btn-primary {
          background: #fff;
          color: #000;
          border: 1px solid #fff;
      }

      .btn-outline {
          background: transparent;
          color: #fff;
          border: 1px solid rgba(255, 255, 255, 0.5);
      }

      .btn-outline:hover {
          border-color: var(--accent);
          color: var(--accent);
      }

      /* ==========================================
         FORMACIÓN (STUDIO MASTER)
         ========================================== */
      .studio-classes-card {
          display: grid;
          grid-template-columns: 1fr 1fr; /* 50% foto, 50% texto */
          gap: 4rem;
          align-items: center;
          background: rgba(255, 255, 255, 0.03);
          padding: 4rem;
          border-radius: 24px;
          border: 1px solid rgba(255, 255, 255, 0.1);
      }

      .studio-img img {
          width: 100%;
          max-height: 450px;
          object-fit: cover;
          border-radius: 15px;
      }

      /* ==========================================
         AJUSTES PARA MÓVIL
         ========================================== */
      @media (max-width: 768px) {
          .master-grid {
              /* En móvil 1 columna para máxima visibilidad */
              grid-template-columns: 1fr;
              gap: 1.5rem;
          }

          .studio-classes-card {
              grid-template-columns: 1fr;
              padding: 2rem;
              text-align: center;
          }

          .btn {
              max-width: 100%; /* Botones a todo lo ancho en móvil */
          }
      }
/* ==========================================
   STUDIO MASTER: IMAGEN Y CARD REDIMENSIONADA
   ========================================== */
.studio-classes-card {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dividimos al 50% para que no sea gigante */
    gap: 4rem;
    align-items: center;
    background: rgba(255,255,255,0.02);
    padding: 4rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.studio-img {
    width: 100%;
}

.studio-img img {
    width: 100%;
    max-height: 450px; /* Evita que la foto del estudio se coma la pantalla */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* ==========================================
   ENCARGOS MUSICALES
   ========================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 15px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.service-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--grey);
    line-height: 1.6;
}

/* Sección de contacto debajo de los servicios */
.services-cta {
    text-align: center;
    margin-top: 60px;
    padding: 40px;
    background: var(--glass);
    border-radius: 20px;
}

.services-cta p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #fff;
}

.services-cta .btn {
    max-width: 320px;
    margin: 0 auto;
}

/* Responsivo */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }
}
/* ==========================================
   BOTONES Y TEXTOS (ESTILO ACORDADO)
   ========================================== */
.master-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin: 2rem 0 1rem;
}

.btn-outline {
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
    padding: 12px 30px;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--accent);
    color: #000;
}

/* Ajuste móvil para que no se vea minúsculo */
@media (max-width: 768px) {
    .master-grid, .studio-classes-card {
        grid-template-columns: 1fr;
    }
    .studio-classes-card {
        padding: 2rem;
    }
}

   /* ==========================================
      STUDIO MASTER: IMAGEN Y CARD REDIMENSIONADA
      ========================================== */
   .studio-classes-card {
       display: grid;
       grid-template-columns: 1fr 1fr; /* Dividimos al 50% para que no sea gigante */
       gap: 4rem;
       align-items: center;
       background: rgba(255,255,255,0.02);
       padding: 4rem;
       border-radius: 20px;
       border: 1px solid var(--border);
   }

   .studio-img {
       width: 100%;
   }

   .studio-img img {
       width: 100%;
       max-height: 450px; /* Evita que la foto del estudio se coma la pantalla */
       object-fit: cover;
       border-radius: 12px;
       box-shadow: 0 20px 40px rgba(0,0,0,0.5);
   }

   /* ==========================================
      BOTONES Y TEXTOS (ESTILO ACORDADO)
      ========================================== */
   .master-info h3 {
       font-family: 'Playfair Display', serif;
       font-size: 2.5rem;
       margin: 2rem 0 1rem;
   }

   .btn-outline {
       border: 1px solid var(--accent);
       color: var(--accent);
       background: transparent;
       padding: 12px 30px;
       border-radius: 50px;
       text-transform: uppercase;
       font-size: 0.8rem;
       letter-spacing: 2px;
       transition: all 0.3s ease;
   }

   .btn-outline:hover {
       background: var(--accent);
       color: #000;
   }

   /* Ajuste móvil para que no se vea minúsculo */
   @media (max-width: 768px) {
       .master-grid, .studio-classes-card {
           grid-template-columns: 1fr;
       }
       .studio-classes-card {
           padding: 2rem;
       }
   }
/* ==========================================
   SECCIÓN: FORMACIÓN (IMAGEN CLASES ENORME)
   Solución: Redimensionar y encuadrar con la card.
   ========================================== */
.studio-classes-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Imagen más estrecha que el texto */
    gap: 3rem;
    align-items: center;
    background: var(--glass);
    padding: 3rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden; /* Seguridad para que nada se salga */
}

.studio-img {
    width: 100%;
    /* Contenedor de la imagen limitado */
    max-width: 400px;
    margin: 0 auto; /* Centrado si la card se estira */
}

.studio-img img {
    width: 100%;
    /* Forzamos a la imagen a adaptarse al contenedor
       mostrándose entera sin recortes.
    */
    object-fit: contain;
    height: auto; /* Mantiene proporción */

    /* Toque visual */
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

/* Ajustes responsive rápidos para estas dos secciones */
@media (max-width: 900px) {
    .master-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .studio-classes-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2.5rem;
    }
    .studio-img {
        max-width: 300px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 600px) {
    .master-grid {
        grid-template-columns: 1fr;
    }
    .master-grid img {
        height: auto;
        aspect-ratio: 1/1; /* Cuadradas en móvil */
    }
}

/* Textos Piano Master centrados y legibles */
.master-info {
    text-align: center;
    margin-top: 3rem;
}
.master-info h3 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}
.master-info p {
    color: var(--grey);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    font-size: 1rem;
}

/* 2. BOTÓN OUTLINE (Para Piano Master) */
.btn-outline {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 50px;
    transition: var(--transition);
    background: transparent;
}
.btn-outline:hover {
    background: var(--accent);
    color: #000;
}

/* 3. BOTÓN AMAZON (Más claro y elegante) */
.btn-amazon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent; /* Quitamos el azul oscuro que no se veía */
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--accent); /* Borde dorado */
}
.btn-amazon:hover {
    background: var(--accent);
    color: #000 !important;
    box-shadow: 0 5px 20px rgba(197, 160, 89, 0.3);
}
/* Efecto al pasar el ratón */
.book-card:hover .main-cover { transform: translateY(-10px) rotate(-5deg); }
.book-card:hover .inner-page { transform: translateY(10px) rotate(5deg); }

/* Responsive Ajustado */
@media (max-width: 900px) {
    .dossier-grid { grid-template-columns: 1fr; text-align: center; gap: 4rem; }
    .dossier-visual { justify-content: center; }
    .book-container { width: 350px; height: 230px; }
    .dossier-links { justify-content: center; }
}

@media (max-width: 768px) {
    .book-layout { grid-template-columns: 1fr; text-align: center; }
    .book-gallery { margin-bottom: 2rem; }
    .dossier-grid { grid-template-columns: 1fr; text-align: center; }
    .book-container { justify-content: center; }
    .book { width: 320px; height: 210px; }
}

.video-divider-triple {
    display: flex;
    width: 100%;
    height: 350px; /* Altura fija para que sea elegante */
    background: #000;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 4rem 0;
}
.tv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tv-card {
    position: relative;
    padding: 3rem;
    background: var(--glass);
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
}

.tv-card:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.06);
}

.tv-icon {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.tv-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: 1px;
}

.tv-card p {
    color: var(--grey);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Efecto de "pantalla" sutil */
.card-bg-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(197, 160, 89, 0.03) 100%);
    pointer-events: none;
}

/* --- ESTILO SECCIÓN CARRERA SOLITARIO (UNIFICADO) --- */

/* Contenedor principal de descripciones de CD y Colaboraciones */
/* Mantiene el color gris #9aa0a6 y la justificación perfecta de tu web */
.cd-description, .collab-text {
    color: #9aa0a6 !important;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center; /* Firma visual con la última línea centrada */
    line-height: 1.8;
    max-width: 850px;
    margin: 1.5rem auto;
    font-size: 1rem;
}

/* Imagen del CD Alquimia: CORREGIDA para no pixelarse */
.cd-art-img {
    display: block;
    width: auto !important;   /* Mantiene el ANCHO original */
    height: auto !important;  /* Mantiene el ALTO original */
    max-width: 100%;          /* Asegura que no se salga en móviles */
    margin: 0 auto 1.5rem;    /* Centrado horizontal */
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Títulos de los bloques */
#carrera-solitario h4 {
    text-align: center;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

/* Separación entre bloques */
.solo-project-block, .electronic-series-block {
    margin-bottom: 5rem;
}

/* Separador opcional */
.separator {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 4rem auto;
    width: 50%;
}
/* Sección Solitario */
.cd-showcase {
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 5rem;
}

.cd-item { text-align: center; width: 200px; }
.cd-art {
    width: 100%;
    border-radius: 4px;

    /* Lo que pediste: Color y estilo de la web */
    color: #9aa0a6 !important; /* El gris suave de tus otros textos */
    text-align: justify;

    font-weight: normal;
}

/* Serie Electrónica */
.series-card {
    position: relative;
    width: 300px;
    height: 200px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid var(--border);
}

.series-card img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.series-card:hover img { transform: scale(1.1); }

/* Colaboraciones */
.collab-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.collab-tags {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.collab-tags span {
    font-size: 0.75rem;
    color: var(--grey);
    border: 1px solid var(--border);
    padding: 5px 15px;
    border-radius: 20px;
    transition: 0.3s;
}

.collab-tags span:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.electronic-series {
    margin-top: 3rem;
    text-align: center;
}

.series-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem; /* Espaciado ajustado para no ocupar demasiado */
    margin-top: 1.5rem;
}

.cd-item-small {
    position: relative;
    width: 100px; /* Tamaño compacto para los 5 discos */
    transition: var(--transition);
}

.cd-item-small img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border: 1px solid var(--border);
    filter: grayscale(40%);
    transition: 0.4s ease;
    cursor: pointer;
}

.cd-item-small span {
    display: block;
    margin-top: 8px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--grey);
}

/* Efecto Hover: El CD se ilumina y crece un poco */
.cd-item-small:hover img {
    filter: grayscale(0%);
    transform: scale(1.15) translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.cd-item-small:hover span {
    color: var(--accent);
}

@media (max-width: 600px) {
    .series-grid { flex-wrap: wrap; gap: 1rem; }
    .cd-item-small { width: 80px; }
}

/* Contenedor del Video (Centro) */
.divider-video-container {
    flex: 0 0 50%; /* Ocupa el 50% del ancho */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.main-divider-video {
    width: 100%;
    height: 100%;
    /* 'contain' para que no haya zoom en el video */
    object-fit: contain;
}

/* Fotos laterales */
.divider-side-photo {
    flex: 0 0 25%; /* Ocupa el 25% cada una */
    position: relative;
    overflow: hidden;
}

.divider-side-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.4);
    transition: filter 0.8s ease;
}

.video-divider-triple:hover .divider-side-photo img {
    filter: grayscale(40%) brightness(0.6);
}

/* Overlay y Texto */
.divider-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.video-divider-triple h2 {
    position: absolute;
    z-index: 2;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2vw, 1.8rem);
    font-style: italic;
    text-align: center;
    width: 80%;
}

@media (max-width: 768px) {
    .divider-side-photo { display: none; }
    .divider-video-container { flex: 0 0 100%; }
}
/* ==========================================
   AJUSTE DE ESPACIADO EN TRAYECTORIA
   ========================================== */

   .bio-intro-text p {
       font-size: 1.1rem;
       line-height: 1.8;
       color: var(--grey);
       margin-bottom: 0;

       /* 1. Justifica el cuerpo del párrafo */
       text-align: justify;

       /* 2. Suaviza la distribución de palabras para evitar huecos (ríos de blanco) */
       text-justify: inter-word;

       /* 3. Alinea la última línea al centro para mantener la estética del diseño */
       text-align-last: center;
   }

   @media (max-width: 900px) {
    .bio-intro-text {
        padding: 0 20px;
    }
}
/* Espacio adicional al inicio de la línea de tiempo */
.timeline-container {
    margin-top: 20px;
    position: relative;
}
/* Divisor elegante y sutil */
.bio-intro-text::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--accent); /* Tu color dorado */
    margin: 40px auto 0 auto; /* Centrado y con espacio */
    opacity: 0.4;
}
/* LÍNEA DEL TIEMPO */
.timeline-container { max-width: 800px; margin: 0 auto; border-left: 1px solid var(--border); padding-left: 2.5rem; }
.timeline-item { margin-bottom: 4rem; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -2.85rem; top: 10px; width: 10px; height: 10px; background: #fff; border-radius: 50%; box-shadow: 0 0 10px rgba(255,255,255,0.5); }
.timeline-date { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-style: italic; display: block; margin-bottom: 0.5rem; color: var(--accent); }
.timeline-content h3 { font-size: 1rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.5rem; }
.timeline-content p { color: var(--grey); font-size: 0.95rem; }

/* PROYECTOS (LIBROS) */
.book-card { display: flex; align-items: center; gap: 4rem; background: var(--glass); padding: 3rem; border-radius: 20px; border: 1px solid var(--border); max-width: 900px; margin: 0 auto; transition: var(--transition); }
.book-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.book-img-container { flex: 0 0 200px; }
.book-img-container img { width: 100%; height: auto; filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6)); }

/* TRANSICIÓN GEOMÉTRICA */
#geometric-transition { height: 500vh; position: relative; background: #000; }
.sticky-container { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.geo-image-wrapper { position: relative; width: 60vw; height: 60vh; max-width: 800px; max-height: 600px; }
.geo-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s ease, clip-path 0.8s ease; clip-path: var(--mask); }
.geo-slide.active { opacity: 1; z-index: 2; }
.geo-slide img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%) contrast(110%); }
.geo-text { position: absolute; text-align: center; pointer-events: none; z-index: 5; }
.geo-text h2 { font-size: clamp(3rem, 8vw, 6rem); opacity: 0.15; letter-spacing: 20px; font-family: 'Playfair Display', serif; }

/* TESTIMONIOS */
.reviews-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas fijas */
    gap: 1.5rem; /* Reducimos el espacio entre tarjetas */
    max-width: 900px;
    margin: 0 auto;
}

.review-card-mini {
    background: var(--glass);
    padding: 1.5rem; /* Más compacto */
    border-left: 2px solid var(--accent);
    transition: var(--transition);
}

.review-card-mini p {
    font-style: italic;
    font-size: 0.85rem; /* Fuente un poco más pequeña para que quepa bien */
    line-height: 1.5;
    margin-bottom: 0.8rem;
    color: #fff;
}

.review-card-mini cite {
    font-size: 0.7rem;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- SECCIÓN PROYECTO CREAR --- */
.crear-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Texto más estrecho que el video */
    gap: 4rem;
    align-items: center;
    background: var(--glass);
    padding: 5rem;
    border: 1px solid var(--border);
    border-radius: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.crear-info h3 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.crear-tagline {
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    font-weight: 600;
}

.crear-description p {
    color: var(--grey);
    line-height: 1.8;
    font-size: 1rem;
}

/* Contenedor de Video Responsivo */
.crear-video-container {
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* Proporción 16:9 */
    height: 0;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 900px) {
    .crear-wrapper {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
        text-align: center;
        gap: 2.5rem;
    }
    .crear-info h3 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .reviews-grid-compact { grid-template-columns: 1fr; }
}

/* CONTACTO */
.contact-box { text-align: center; padding: 5rem 2rem; background: linear-gradient(to bottom, transparent, #080808); border-radius: 30px; border: 1px solid var(--border); }
.contact-box h2 { font-family: 'Playfair Display', serif; font-size: 2.5rem; margin-bottom: 1rem; }

/* BOTONES Y ANIMACIONES */
.btn { padding: 1rem 2rem; text-decoration: none; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; border-radius: 50px; transition: var(--transition); display: inline-block; cursor: pointer; }
.btn-primary { background: #fff; color: #000; }
.btn-secondary { border: 1px solid #fff; color: #fff; background: transparent; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(255,255,255,0.1); }
.btn-primary:hover { background: var(--accent); color: #000; box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2); }

.reveal { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(0.2, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

#banner-vanguardia-multi {
    position: relative;
    width: 100%;
    height: 300px; /* Altura fija y elegante */
    background: #000;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 2rem 0;
}
/* Transición suave para las imágenes del banner */
.v-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1s ease-in-out; /* El fundido dura 1 segundo */
    opacity: 1;
}

.v-item img.fading {
    opacity: 0; /* Clase temporal para el efecto de cambio */
}

#banner-vanguardia-multi {
    position: relative;
    overflow: hidden;
    background: #000;
}
#banner-vanguardia-multi img {
    filter: grayscale(50%) brightness(0.7);
    object-fit: cover;
}

#banner-vanguardia-multi .v-item {
    background: #000; /* Evita destellos blancos durante el cambio */
}
.v-grid-container {
    position: relative;
    width: 100%;
    height: 100%;
}
.v-item {
    position: relative;
    background: #000;
}

.v-item img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(50%) brightness(0.7);
}

/* La imagen de frente es la que animamos */
.v-front {
    z-index: 2;
    opacity: 1;
    transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.v-front.fading {
    opacity: 0;
}

.v-back {
    z-index: 1;
}
/* Clase para el desvanecimiento */
.v-front.fading {
    opacity: 0;
}
.v-item img {
    transition: opacity 1s ease-in-out !important;
    opacity: 1 !important;
}

.v-set {
    opacity: 1 !important;
    display: grid !important;
}
.v-set {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas iguales */
    gap: 5px; /* Pequeña separación elegante */
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.v-set.active {
    opacity: 1;
    z-index: 2;
}

.v-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #111;
}

.v-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%) brightness(0.7);
    transition: filter 0.5s ease;
}

.v-item:hover img {
    filter: grayscale(0%) brightness(1);
}

.v-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    width: 100%;
    text-align: center;
}

.v-overlay-text h2 {
    font-size: clamp(2rem, 8vw, 5rem);
    letter-spacing: 20px;
    color: rgba(255, 255, 255, 0.25);
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    #banner-vanguardia-multi { height: 400px; }
    .v-set { grid-template-columns: repeat(2, 1fr); }
    .v-overlay-text h2 { letter-spacing: 10px; }
}

footer { padding: 4rem 0; text-align: center; border-top: 1px solid var(--border); font-size: 0.7rem; color: var(--grey); letter-spacing: 2px; }

@media (max-width: 900px) {
    .multimedia-grid, .reviews-container { grid-template-columns: 1fr; }
    .book-card { flex-direction: column; text-align: center; gap: 2rem; }
    .book-img-container { flex: 0 0 150px; }
}

/* Cuadrícula de Videos */
.multimedia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 2rem;
}
.multimedia-description {
    color: #9aa0a6 !important; /* El gris de tu web */
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center; /* Última línea centrada */
    line-height: 1.8;
    max-width: 850px;
    margin: 0 auto 3.5rem auto; /* Espacio antes del grid de videos */
    font-size: 1.1rem;
}

.video-item {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

/* Portada del Video */
.video-cover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    filter: grayscale(30%);
    transition: 0.5s ease;
}

.video-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3); /* Capa oscura inicial */
    transition: 0.4s;
}

.video-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    transition: 0.4s;
}

/* Botón Play */
.play-icon {
    position: relative;
    z-index: 3;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.play-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 5px;
}

.video-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.video-item:hover .video-cover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.video-item:hover .video-cover::before,
.video-item:hover .video-cover::after {
    background: rgba(0, 0, 0, 0.1);
}

.video-item:hover .play-icon {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

@media (max-width: 1024px) {
    .multimedia-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .multimedia-grid { grid-template-columns: 1fr; }
}

.reviews-footer {
    text-align: center;
    margin-top: 3rem;
}

.google-reviews-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--grey);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.google-reviews-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.google-reviews-btn img {
    filter: grayscale(1) brightness(1.5);
    transition: 0.3s;
}

.google-reviews-btn:hover img {
    filter: grayscale(0) brightness(1);
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed; top: 0; right: -100%; height: 100vh; width: 100%;
        background: rgba(5,5,5,0.98); flex-direction: column; justify-content: center;
        gap: 2.5rem;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.2rem; }

    #mobile-menu.is-active .bar:nth-child(2) { opacity: 0; }
    #mobile-menu.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    #mobile-menu.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-135deg); }

    .geo-image-wrapper { width: 85vw; height: 45vh; }
    .geo-text h2 { font-size: 2.5rem; letter-spacing: 10px; }
    .cta-group { flex-direction: column; }
    .btn { width: 100%; }
}

/* ==========================================================================
   NUEVO: CORRECCIÓN DE TAMAÑOS (IMÁGENES MASTER Y ESTUDIO)
   ========================================================================== */

/* 1. Grid de las 4 imágenes de los Masters (master1 a master4) */
.master-grid,
.piano-master-wrapper .grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 3rem auto;
    max-width: 1100px;
}

/* Forzamos a que las imágenes del master no se desborden y tengan altura fija elegante */
.master-grid img,
.master-item img {
    width: 100%;
    height: 350px; /* Altura calculada para quedar perfectas en vertical */
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: var(--transition);
    filter: brightness(0.9);
}

.master-grid img:hover,
.master-item img:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    filter: brightness(1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* 2. Control de la imagen grande de "Clases de estudio master" */
.estudio-master-img,
.clases-master img {
    width: 100%;
    max-width: 800px; /* Evita que ocupe todo el ancho de la pantalla */
    height: auto;
    max-height: 500px; /* Límite de altura para que no quede gigante */
    margin: 2rem auto;
    display: block; /* Para centrarla con el margin */
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* 3. Responsive para el bloque de Masters */
@media (max-width: 900px) {
    .master-grid,
    .piano-master-wrapper .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .master-grid,
    .piano-master-wrapper .grid-4 {
        grid-template-columns: 1fr;
    }
    .master-grid img,
    .master-item img {
        height: auto;
        aspect-ratio: 4/3; /* En móvil se ven un poco más apaisadas */
    }
    .estudio-master-img,
    .clases-master img {
        max-height: 300px;
    }
}
