/* ===================== SECCIÓN PRINCIPAL ===================== */
.estudio-section {
    color: #fff;
    padding: 4rem 1rem;
    background: transparent;
    min-height: 100vh;
}

.estudio-container {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr; /* Card izquierda más grande */
    gap: 2rem; /* Reducido de 3rem */
    max-width: 1600px;
    margin: 0 auto;
    align-items: start;
}

/* ===================== CARD IZQUIERDA MÁS GRANDE ===================== */
.estudio-card {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
    border: 2px solid #3b9344;
    height: fit-content;
    position: sticky;
    top: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.estudio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.estudio-card-img {
    width: 100%;
    height: 500px;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.estudio-card:hover .estudio-card-img {
    transform: scale(1.03);
}

/* Padding interno reducido */
.estudio-card-content {
    padding: 1.2rem 1.5rem; /* antes 2rem */
}

.estudio-card h3 {
    color: #eeb914;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.estudio-card p {
    color: #eee;
    line-height: 1.7;
    margin-bottom: 1.5rem; /* antes 2rem */
    font-size: 1.1rem;
}

.estudio-card-features {
    list-style: none;
    padding: 0;
}

.estudio-card-features li {
    color: #eee;
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    font-size: 1.05rem;
}

.estudio-card-features li:before {
    content: "✓";
    color: #3b9344;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===================== CONTENIDO DERECHO ===================== */
.estudio-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    height: 100%; /* <-- Añadido: ocupa toda la altura del contenedor */
}

.estudio-info {
    flex: 1; /* <-- Hace que la descripción ocupe espacio proporcional */
    text-align: left;
    padding: 2rem 2.5rem; 
    background: rgba(30, 30, 30, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(238, 185, 20, 0.4);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.estudio-galeria {
    flex: 1; /* <-- Hace que la galería ocupe espacio proporcional */
    padding: 2.5rem;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(238, 185, 20, 0.4);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.estudio-info h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #eeb914;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.estudio-info p {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.8;
    color: #eee;
    margin-bottom: 2rem;
}

/* Botón centrado */
.estudio-btn-wrapper {
    text-align: center;
    margin-top: 1rem;
}

/* ===================== BOTÓN ===================== */
.estudio-section .btn {
    font-size: 1.3rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #eeb914;
    color: #000;
    font-weight: 700;
    border: 2px solid #3b9344;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estudio-section .btn:hover {
    background: #3b9344;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.estudio-section .btn:focus {
    outline: 2px solid #eeb914;
    outline-offset: 2px;
}

/* ===================== GALERÍA ===================== */
.estudio-galeria {
    padding: 2.5rem;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(238, 185, 20, 0.4);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.estudio-galeria h2 {
    font-size: 1.8rem;
    color: #eeb914;
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.galeria-section {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 0 4rem;
}

.galeria-container {
    overflow: hidden;
    border-radius: 15px;
    position: relative;
}

.galeria-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 1.5rem;
}

.galeria-item {
    display: flex;               /* hace que su contenido sea flexible */
    justify-content: center;     /* centra horizontalmente */
    align-items: center;         /* centra verticalmente */
    flex-direction: column;      /* por si hay texto o info dentro */
    flex: 0 0 calc(50% - 0.75rem);
    min-width: calc(50% - 0.75rem);
    height: 400px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #1a1a1a;
}
.galeria-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.8);
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.galeria-item:hover img {
    transform: scale(1.08);
}

.galeria-info {
    display: none;
}

/* Flechas */
.galeria-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #eeb914;
    color: #eeb914;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.galeria-btn:hover {
    background: #eeb914;
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

.galeria-btn.prev { left: 10px; }
.galeria-btn.next { right: 10px; }

.galeria-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
}

.galeria-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.galeria-dot.active {
    background: #eeb914;
    transform: scale(1.2);
}

/* Placeholder */
.galeria-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #3b9344 0%, #2a6b31 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
}

.galeria-placeholder i {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: #eeb914;
}

.galeria-placeholder h3 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
}

.galeria-placeholder p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ================== MODAL ====================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalZoomIn 0.3s ease;
}

@keyframes modalZoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
    padding: 20px;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border: 2px solid #eeb914;
    background: #000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: zoom-in;
}

/* Permitir zoom */
.modal-image.zoomable { cursor: zoom-in; transition: transform 0.2s ease; }
.modal-image.zoomed { cursor: zoom-out; transform: scale(1.5); }

.modal-close, .modal-nav {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #eeb914;
    color: #eeb914;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.modal-close { position: fixed; top: 20px; right: 20px; width: 50px; height: 50px; border-radius: 50%; }
.modal-close:hover { background: #eeb914; color: #000; transform: scale(1.1); }

.modal-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 60px; height: 60px; border-radius: 50%; }
.modal-prev { left: 20px; }
.modal-next { right: 20px; }
.modal-nav:hover { background: #eeb914; color: #000; transform: translateY(-50%) scale(1.1); }

.modal-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.1rem;
    background: rgba(0,0,0,0.8);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #3b9344;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1400px) {
    .estudio-container { grid-template-columns: 1fr 1fr; max-width: 1200px; }
}

@media (max-width: 1200px) {
    .estudio-container { grid-template-columns: 1fr; gap: 2rem; }
    .estudio-card { position: static; max-width: 700px; margin: 0 auto; }
    .estudio-card-img { max-height: 500px; }
    .galeria-item { flex: 0 0 calc(50% - 0.75rem); min-width: calc(50% - 0.75rem); }
}

@media (max-width: 992px) {
    .galeria-item { height: 350px; }
}

/* ===================== MEJORAS ESPECÍFICAS PARA MÓVIL ===================== */
@media (max-width: 768px) {
    .estudio-galeria {
        padding: 1.5rem 1rem;
        margin: 0 -0.5rem;
        width: calc(100% + 1rem);
        border-radius: 12px;
    }
    
    .galeria-section {
        padding: 0 0.5rem;
        max-width: 100vw;
    }
    
    .galeria-container {
        border-radius: 10px;
    }
    
    .galeria-item {
        flex: 0 0 95%;
        min-width: 95%;
        height: 380px; /* Mayor altura en móvil */
        margin: 0 2.5%;
        border-radius: 10px;
    }
    
    .galeria-track {
        gap: 1rem;
    }
    
    .galeria-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .galeria-btn.prev { left: 5px; }
    .galeria-btn.next { right: 5px; }
    
    .estudio-info, .estudio-galeria { 
        padding: 1.5rem; 
    }
    
    .estudio-card-content { 
        padding: 1.2rem 1.5rem; 
    }
    
    /* Mejorar escalabilidad de imágenes en móvil */
    .galeria-item img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 576px) {
    .galeria-section { 
        padding: 0 0.25rem; 
    }
    
    .galeria-item { 
        flex: 0 0 98%;
        min-width: 98%;
        height: 320px; /* Altura optimizada para móviles pequeños */
        margin: 0 1%;
    }
    
    .estudio-section { 
        padding: 2rem 0.5rem; 
    }
    
    .estudio-info, .estudio-galeria { 
        padding: 1.2rem; 
        margin: 0 -0.25rem;
        width: calc(100% + 0.5rem);
    }
    
    .estudio-card-img { 
        height: 300px; 
    }
    
    .galeria-placeholder {
        height: 300px;
        padding: 1.5rem;
    }
    
    .galeria-placeholder i {
        font-size: 3.5rem;
    }
    
    .galeria-placeholder h3 {
        font-size: 1.4rem;
    }
    
    .galeria-placeholder p {
        font-size: 1rem;
    }
    
    /* Botones más accesibles en móvil */
    .galeria-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Para pantallas muy pequeñas (menos de 400px) */
@media (max-width: 400px) {
    .galeria-item {
        height: 280px;
    }
    
    .estudio-section {
        padding: 1.5rem 0.25rem;
    }
    
    .estudio-info, .estudio-galeria {
        padding: 1rem;
    }
}

/* Animaciones */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-up {
    opacity: 0;
    animation: fadeUp 0.8s forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.2s; }
.fade-up:nth-child(2) { animation-delay: 0.4s; }
.fade-up:nth-child(3) { animation-delay: 0.6s; }
.fade-up:nth-child(4) { animation-delay: 0.8s; }

#cargandoEstudio {
    display: none !important; /* fuerza que no se muestre hasta que JS lo active */
}