/* ===== VARIABLES CSS ===== */
:root {
    --color-principal: #011f3e;
    --color-apoyo-1: #5A6C7D;
    --color-dorado: #D4AF37;
    --color-blanco: #FFFFFF;
    --color-gris-claro: #F5F7F9;
    --color-fondo: #ECF0F1;
    --color-texto: #2C3E50;
}

/* ===== SELECTOR DE IDIOMAS ===== */
#selector-idiomas {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

#selector-idiomas button {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#selector-idiomas button:hover {
    background-color: rgba(212, 175, 55, 0.2);
    border-color: var(--color-dorado);
}

#selector-idiomas button.active {
    background-color: var(--color-dorado);
    color: var(--color-principal);
    border-color: var(--color-dorado);
}

/* ===== REGLA GLOBAL MULTIMEDIA ===== */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== ESTILOS BASE ===== */
body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    color: var(--color-texto);
    background-color: var(--color-gris-claro);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* ===== NAVBAR ===== */
.navbar {
    background-color: var(--color-principal) !important;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0;
}

/* ===== ANIMACIÓN DEL LOGO (FASE 2) ===== */

/* Requisito 2.2: Definición de @keyframes con 3 estados mínimo */
@keyframes logoEntrada {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
        color: var(--color-blanco);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2) rotate(10deg);
        color: var(--color-dorado);
        text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        color: var(--color-dorado);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Animación sutil continua para el pulso */
@keyframes logoPulso {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Requisito 2.1: Logo ubicado en el navbar */
.logo-letter {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dorado);
    display: inline-block;
    /* Requisito 2.3: Aplicación de animation con iteration-count y fill-mode */
    animation: logoEntrada 1.5s ease-out forwards;
    animation-fill-mode: forwards;
}

.logo-text {
    font-size: 1.5rem;
    color: white;
    margin-left: 0.1rem;
}

/* Animación continua sutil en hover */
.navbar-brand:hover .logo-letter {
    animation: logoPulso 1s ease-in-out infinite;
}

/* ===== FIN ANIMACIÓN DEL LOGO ===== */

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger:focus {
    outline: none;
}

.hamburger-line {
    width: 2rem;
    height: 0.25rem;
    background: white;
    border-radius: 10px;
    transition: all 0.3s linear;
}

.navbar-nav-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-principal);
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    z-index: 9;
}

.navbar-nav-container.active {
    display: flex;
}

.navbar-nav {
    flex-direction: column;
    width: 100%;
    text-align: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ===== FASE 1: TRANSICIONES EN NAVEGACIÓN ===== */

/* Requisito 1.1: Feedback de estado con transiciones suaves */
.navbar-nav .nav-link {
    color: white !important;
    font-weight: 400;
    padding: 1rem;
    display: block;
    width: 100%;
    border-radius: 5px;
    text-decoration: none;
    /* Transición específica para múltiples propiedades */
    transition: background-color 0.3s ease,
                color 0.3s ease,
                transform 0.3s ease,
                box-shadow 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(212, 175, 55, 0.3);
    transform: translateX(5px);
    box-shadow: -4px 0 0 0 var(--color-dorado);
}

/* ===== FIN FASE 1 ===== */

/* ===== TÍTULOS DE SECCIÓN ===== */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--color-principal);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--color-dorado);
    padding-left: 0.75rem;
}

/* ===== BOTONES CTA ===== */
.btn-cta {
    background-color: var(--color-dorado);
    color: var(--color-principal);
    padding: 0.75rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    text-decoration: none;
    display: inline-block;
    width: 100%;
    text-align: center;
    /* Transiciones mejoradas */
    transition: background-color 0.3s ease,
                color 0.3s ease,
                transform 0.3s ease,
                box-shadow 0.3s ease;
}

.btn-cta:hover {
    background-color: var(--color-blanco);
    color: var(--color-principal);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--color-principal);
    color: white;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
}

.footer-seccion {
    margin-bottom: 2rem;
}

.footer-seccion h5 {
    color: var(--color-dorado);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-seccion a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease,
                opacity 0.3s ease,
                transform 0.3s ease;
}

.footer-seccion a:hover {
    color: var(--color-dorado);
    opacity: 1;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: background-color 0.3s ease,
                transform 0.3s ease;
}

.social-links a:hover {
    background-color: var(--color-dorado);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* ===== HERO SECTION ===== */
.hero {
    background-image: linear-gradient(rgba(0, 32, 64, 0.85), rgba(90, 108, 125, 0.85)), url('images/imagenHero.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
    min-height: 350px;
    position: relative;
}

.hero h2 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

/* ===== TARJETAS ===== */
.tarjeta {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    border: 2px solid transparent;
    margin-bottom: 1.5rem;
    /* Transiciones mejoradas */
    transition: transform 0.3s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(44, 95, 124, 0.3);
    border-color: var(--color-principal);
}

.tarjeta h3 {
    color: var(--color-principal);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.tarjeta p {
    color: var(--color-apoyo-1);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.tarjeta ul {
    list-style: none;
    padding-left: 0;
}

.tarjeta ul li {
    padding: 0.5rem 0;
    color: var(--color-principal);
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.tarjeta ul li::before {
    content: "✓";
    color: var(--color-dorado);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ===== PROCESO ===== */
#proceso {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

#proceso ol {
    padding-left: 1.5rem;
}

#proceso ol li {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--color-principal);
}

#proceso ol li strong {
    color: var(--color-principal);
}

/* ===== TESTIMONIOS ===== */
.testimonios {
    background-color: white;
    padding: 2rem 1.5rem;
    margin: 2rem 0;
    border-radius: 12px;
}

.testimonio {
    background-color: var(--color-gris-claro);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--color-dorado);
    height: 100%;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.testimonio:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.testimonio-texto {
    font-style: italic;
    color: var(--color-apoyo-1);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.testimonio-autor {
    font-weight: 600;
    color: var(--color-principal);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.testimonio-rol {
    font-size: 0.85rem;
    color: var(--color-apoyo-1);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background-color: var(--color-principal);
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
    margin: 2rem 0;
}

.cta-section h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* ===== FORMULARIO ===== */
.contacto-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-label {
    font-weight: 400;
    color: var(--color-texto);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.75rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--color-principal);
    box-shadow: 0 0 0 0.2rem rgba(0, 51, 102, 0.1);
}

.btn-enviar {
    background-color: var(--color-principal);
    color: white;
    padding: 0.75rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    width: 100%;
    transition: background-color 0.3s ease,
                color 0.3s ease,
                transform 0.3s ease,
                box-shadow 0.3s ease;
}

.btn-enviar:hover {
    background-color: var(--color-dorado);
    color: var(--color-principal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ===== MAPA ===== */
.mapa-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    margin-bottom: 2rem;
}

.mapa-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

/* ===== TABLA ===== */
.tabla-contacto {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
}

caption {
    caption-side: top;
    text-align: left;
    font-size: 0.85rem;
    color: var(--color-apoyo-1);
    margin-bottom: 1rem;
    font-style: italic;
}

thead {
    background-color: var(--color-principal);
    color: white;
}

th {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

th,
td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border: 1px solid #ddd;
}

tbody tr:nth-child(even) {
    background-color: var(--color-gris-claro);
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

tfoot {
    background-color: #f5f5f5;
    font-weight: 400;
}

/* ===== MEDIA QUERIES: TABLETAS (481px+) ===== */
@media (min-width: 481px) {
    .hero {
        background-image: linear-gradient(rgba(0, 32, 64, 0.85), rgba(90, 108, 125, 0.85)), url('images/imagenHero.png');
        min-height: 400px;
        padding: 4rem 2rem;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn-cta {
        width: auto;
        padding: 0.85rem 2rem;
    }

    footer {
        padding: 2.5rem 2rem;
    }

    .contacto-card {
        padding: 2rem;
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.85rem 0.75rem;
    }

    .mapa-container iframe {
        height: 400px;
    }
}

/* ===== MEDIA QUERIES: ESCRITORIO (769px+) ===== */
@media (min-width: 769px) {
    .hero {
        background-image: linear-gradient(rgba(0, 32, 64, 0.85), rgba(90, 108, 125, 0.85)), url('images/imagenHero.png');
        min-height: 500px;
        padding: 6rem 2rem;
        background-attachment: fixed;
    }

    .navbar {
        padding: 1.5rem 3rem;
    }

    .navbar-brand {
        font-size: 2rem;
        letter-spacing: 3px;
    }

    .logo-letter {
        font-size: 2.5rem;
    }

    .logo-text {
        font-size: 2rem;
    }

    .hamburger {
        display: none;
    }

    .navbar-nav-container {
        display: flex !important;
        position: static;
        width: auto;
        background-color: transparent;
        padding: 0;
        flex-direction: row;
    }

    .navbar-nav {
        flex-direction: row;
        width: auto;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        margin: 0 0.5rem;
        width: auto;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        transform: translateY(-2px);
        box-shadow: 0 4px 0 0 var(--color-dorado);
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        border-left-width: 5px;
        padding-left: 1rem;
    }

    .btn-cta {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }

    footer {
        padding: 3rem 2rem 2rem 2rem;
    }

    .footer-seccion {
        margin-bottom: 0;
    }

    .footer-bottom {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .hero {
        padding: 6rem 2rem;
        min-height: 500px;
    }

    .hero h2 {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }

    .tarjeta {
        padding: 2rem;
        margin-bottom: 0;
    }

    .tarjeta:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(44, 95, 124, 0.3);
    }

    .tarjeta h3 {
        font-size: 1.5rem;
    }

    .tarjeta p,
    .tarjeta ul li {
        font-size: 1rem;
    }

    #proceso {
        padding: 2rem;
    }

    #proceso ol {
        padding-left: 2rem;
    }

    #proceso ol li {
        font-size: 1.05rem;
    }

    .testimonios {
        padding: 3rem 2rem;
        margin: 3rem 0;
    }

    .testimonio {
        padding: 2rem;
        margin-bottom: 0;
    }

    .testimonio-texto {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }

    .testimonio-autor {
        font-size: 1.05rem;
    }

    .testimonio-rol {
        font-size: 0.9rem;
    }

    .cta-section {
        padding: 4rem 2rem;
        margin: 3rem 0;
    }

    .cta-section h2 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .cta-section p {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

    .contacto-card {
        padding: 2.5rem;
    }

    .form-label {
        font-size: 1rem;
    }

    .mapa-container iframe {
        height: 450px;
    }

    .tabla-contacto {
        padding: 2.5rem;
    }

    table {
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    caption {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 1rem;
    }
}

/* ===== REPRODUCTOR DE AUDIO ===== */
.audio-player-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(1, 31, 62, 0.15);
    border: 2px solid var(--color-gris-claro);
    transition: border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.audio-player-container:hover {
    border-color: var(--color-dorado);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

#audio-momentum {
    width: 100%;
    height: 54px;
    border-radius: 8px;
    outline: none;
}

#audio-momentum::-webkit-media-controls-panel {
    background-color: var(--color-principal);
    border-radius: 8px;
}

#audio-momentum::-webkit-media-controls-play-button,
#audio-momentum::-webkit-media-controls-pause-button {
    background-color: var(--color-dorado);
    border-radius: 50%;
}

#audio-momentum::-webkit-media-controls-current-time-display,
#audio-momentum::-webkit-media-controls-time-remaining-display {
    color: var(--color-blanco);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

#audio-momentum::-webkit-media-controls-timeline {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    margin: 0 10px;
}

#audio-momentum::-webkit-media-controls-volume-slider {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
}

#audio-momentum::-moz-range-track {
    background-color: var(--color-principal);
    border-radius: 8px;
}

#audio-momentum::-moz-range-thumb {
    background-color: var(--color-dorado);
    border: none;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: var(--color-gris-claro);
    border-radius: 8px;
    color: var(--color-apoyo-1);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
}

.audio-info i {
    color: var(--color-dorado);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .audio-player-container {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    #audio-momentum {
        height: 48px;
    }
}

@media (min-width: 769px) {
    .audio-player-container {
        padding: 2.5rem;
    }
}