/* === NEW STYLE GUIDE === */
:root {
    --glow-green: #9AF4B0;
    --dark-text: #4a4a4a;
    --light-text: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e2f0;
}

html {
    font-size: 70%; /* 1rem = 10px. Reduce el tamaño base para un mejor control. */
}

/* === ESTILOS BASE === */
body {
    margin: 0;
    padding: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 1.6rem; /* Ahora equivale a 16px */
    color: var(--dark-text); /* UPDATED */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrapper {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

a {
    color: var(--glow-green);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--dark-text);
}

/* === CABECERA === */
.cabezal {
    padding: 15px 0;
    background: transparent;
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px; /* Para el offset del scroll */
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.cabezal.scrolled {
    background: var(--white);
    border-bottom-color: var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cabezal .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo_corner {
    height: 46px;
    overflow: hidden;
    color: var(--white);
    text-decoration: none;
    transition: color .2s ease;
}
.logo-navbar {
 height: 50px;
 width: auto;
}

.cabezal.scrolled .logo_corner {
    color: var(--dark-text);
}

.mobile_only { display: none !important; }

/* --- Responsive para mobile --- */
@media (max-width: 768px) {
    .desktop_only { display: none !important; }
    .mobile_only { display: block !important; }

    .hamburguesa {
        font-size: 24px;
        cursor: pointer;
        color: var(--white);
        text-decoration: none;
        transition: color .2s ease;
    }

    .cabezal.scrolled .hamburguesa {
        color: var(--dark-text);
    }

    .desplegable_mobile {
        position: fixed;
        top: -100vh;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: 2000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: top 0.3s ease-in-out;
    }

    .desplegable_mobile a {
        font-size: 2rem;
        padding: 15px;
        text-decoration: none;
        color: var(--dark-text);
    }

    .desplegable_mobile a:hover {
        color: var(--glow-green);
    }

    .boton_X {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }
}

/* === ESTILOS PÁGINA INSTITUCIONAL === */
.menutop { display: flex; align-items: center; justify-content: flex-end; }
.navbar-nav { list-style: none; padding-left: 0; margin: 0; }
.nav-item { position: relative; margin-left: 25px; float: left; }

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 5px;
    display: block;
    font-size: 1.5rem;
    transition: color .2s ease;
}
.nav-link:hover { color: var(--glow-green); }

.cabezal.scrolled .nav-link {
    color: var(--dark-text);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 240px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1); /* Softer shadow */
    z-index: 100;
    list-style: none;
    padding: 10px 0;
    border-radius: 8px; /* Rounded corners */
    border: 1px solid var(--border-color);
}
.dropdown-menu a { color: var(--dark-text); padding: 10px 20px; text-decoration: none; display: block; font-size: 1.4rem; font-weight: 400; }
.dropdown-menu a:hover { background-color: var(--background-light); color: var(--glow-green); }
.nav-item:hover .dropdown-menu { display: block; }

/* --- Hero Header Institucional --- */
.heroheader-institucional {
    margin-top: -70px; /* Pull up behind transparent header */
    padding: 150px 20px 80px 20px; /* 80px original + 70px header height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #004550;
    box-sizing: border-box;
}

.heroheader-institucional .wrapper {
    position: relative;
    z-index: 1;
}

.heroheader-institucional h1 {
    font-size: 3.2rem;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 300;
}

.heroheader-institucional h1 strong {
    font-weight: 700;
    color: var(--glow-green);
}

/* --- Carousel Section (Home) --- */
.carousel-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

/* --- Quienes Somos Section (Home) --- */
.highlight-box {
    background-color: #F0E4CA; /* bg-third-2 */
    border-left: 5px solid #E59900; /* bg-third-1 */
    padding: 25px 30px;
    margin: 60px auto 0 auto;
    max-width: 800px;
    text-align: center;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.highlight-box p {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
    color: var(--dark-text);
    line-height: 1.5;
}

/* --- Logo Carousel --- */
.logo-carousel {
    max-width: 960px;
    margin: 40px auto 0 auto;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
}
.logo-carousel:hover .logo-carousel-track {
    animation-play-state: paused;
}

.logo-carousel-track {
    display: flex;
    /* Ancho: (ancho de slide) * (numero de slides) */
    width: calc(200px * 16);
    animation: scroll 40s linear infinite; /* Slower animation */
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-200px * 8)); } /* Mitad del ancho total para el loop */
}

.logo-slide {
    width: 200px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-slide img {
    max-width: 120px;
    max-height: 50px;
    filter: grayscale(100%) contrast(0.5); /* Softer grayscale */
    opacity: 0.5;
    transition: all 0.3s ease;
}
.logo-slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* --- Secciones de Contenido --- */
.content-section {
    padding: 80px 20px;
}
.content-section h2 { text-align: center; font-size: 2.8rem; margin-bottom: 20px; color: var(--dark-text); font-weight: 700; }
.content-section .section-subtitle { text-align:center; max-width: 800px; margin: 0 auto 60px auto; color: var(--light-text); font-size: 1.8rem; }

.content-section h3 { font-size: 2.2rem; color: var(--dark-text); margin-top: 0; margin-bottom: 20px; border-bottom: 3px solid var(--glow-green); padding-bottom: 10px; display: inline-block; }
.alternate-bg { background-color: var(--background-light); }

.bg-primary-1 {
    background-color: #009597 ;
}
.bg-primary-2 {
    background-color: #00B9A5 ;
}
.bg-primary-3 {
    background-color: #87F9A0  ;
}
.bg-primary-4 {
    background-color: #D2FFD9  ;
}
.bg-third-1 {
    background-color: #E59900   ;
}
.bg-third-2 {
    background-color: #F0E4CA   ;
}
.bg-secondary-1 {
    background-color: #016B7C    ;
}
.bg-secondary-2 {
    background-color: #004550     ;
}

.bg-primary-3.content-section h3,
.bg-primary-3 .content-section h3 {
    border-bottom-color: #009597;
}
.bg-third-2.content-section h3,
.bg-third-2 .content-section h3 {
    border-bottom-color: #E59900;
}


/* --- Estilos de página específicos (Cobrar / Integrar) --- */
#quiero-pagar, #quiero-cobrar, #quiero-integrar {
    margin-top: -70px; /* Pull up behind transparent header */
}

#quiero-cobrar, #quiero-integrar {
    /* background-color: #D2FFD9; */ /* Reemplazado por secciones individuales */
}

.page-banner {
    padding: 150px 20px 80px 20px; /* 80px original + 70px header height */
    background-color: #004550;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.page-banner h1, .page-banner h2 {
    font-size: 3.2rem;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 300;
}

.page-banner h2 {
    font-size: 2.8rem; /* Ligeramente más pequeño para subpáginas */
}

.page-banner h1 strong {
    font-weight: 700;
    color: var(--glow-green);
}

.page-banner .section-subtitle {
    opacity: 0.5;
    color: var(--white);
    margin-bottom: 0;
}

.page-main-content {
    padding: 0;
}

#quiero-pagar .page-main-content {
    background-color: var(--white);
}

/* --- Componentes Reutilizables --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--glow-green);
    color: var(--dark-text);
    border: none;
    border-radius: 50px; /* Pill shape */
    cursor: pointer;
    font-weight: bold;
    font-size: 1.6rem;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(154, 244, 176, 0.4);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(154, 244, 176, 0.6);
}

.card-container {
    display: flex;
    justify-content: space-around;
    text-align: left;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 30px;
}
.card {
    flex: 1;
    min-width: 180px;
    padding: 30px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.card h4 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--dark-text);
    font-weight: 700;
}
.card h4::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--glow-green);
    margin-bottom: 15px;
}
.card p {
    color: var(--light-text);
    line-height: 1.6;
}

/* --- Split Layout Component (Modalidades) --- */
.split-layout-container {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.split-nav {
    flex: 0 0 250px; /* Ancho fijo para la navegación */
}

.split-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.split-nav-button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--dark-text);
    text-align: left;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.split-nav-button:hover {
    background-color: var(--background-light);
    border-color: #ccc;
}

.split-nav-primario.active {
    background-color: #004550; /* .bg-primary-2 */
    color: var(--white);
    border-color: #004550;
}
.split-nav-secundario.active {
    background-color: #E59900; /* .bg-primary-2 */
    color: var(--white);
    border-color: #E59900;
}

.split-content {
    flex: 1;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    overflow: hidden; /* para que el borde del titulo no se salga */
}

.split-content-panel { display: none; }
.split-content-panel.active { display: block; }

.split-content-title {
     /* .bg-secondary-2 */
    color: var(--white);
    padding: 20px 30px;
    margin: 0;
    font-size: 2rem;
}

.split-primario{
 background-color: #004550;
}
.split-secundario{
 background-color: #E59900;
}

.split-content-body {
    padding: 30px;
    font-size: 1.6rem;
    line-height: 1.7;
}

/* --- Componente de Pasos --- */
.steps-container {
    margin-top: 40px;
    position: relative;
    padding-left: 20px;
}

.steps-container::before {
    content: '';
    position: absolute;
    left: 45px; /* Alineado con el centro del número */
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #F0E4CA;
    z-index: 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #F0E4CA;
    color: var(--dark-text);
    font-weight: 700;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
    z-index: 1;
    border: 4px solid #F0E4CA; /* Para que se destaque sobre la línea */
}

.step-content p {
    margin: 0;
    padding-top: 12px; /* Para alinear el texto con el centro del número */
    color: var(--dark-text);
    line-height: 1.6;
}

/* --- Módulo "Quiero Pagar" --- */
.channels-container {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin: 40px 0;
    flex-wrap: wrap;
    gap: 20px;
}
.channel-item {
    flex: 1;
    min-width: 150px;
    padding: 20px;
}
.channel-item img {
    height: 50px;
    margin-bottom: 10px;
    filter: invert(79%) sepia(15%) saturate(1477%) hue-rotate(83deg) brightness(102%) contrast(91%); /* Tints SVG to glow-green */
}
.feature-list {
    list-style: none;
    padding-left: 0;
}
.feature-list li {
    margin-bottom: 15px;
    font-size: 1.6rem;
    color: var(--dark-text);
}
.feature-list li::before {
    content: '✔';
    color: var(--glow-green);
    margin-right: 10px;
    font-weight: bold;
}
.benefits-container {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 20px;
}
.benefit-item {
    flex: 1;
    min-width: 200px;
    padding: 20px;
}
.benefit-item img {
    height: 60px;
    margin-bottom: 15px;
}
.benefit-item h4 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-weight: 700;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.tag {
    background: #e9fdee; /* Light green */
    color: var(--dark-text);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 1.4rem;
    font-weight: 500;
}

.faq-item {
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.faq-question h4 {
    margin: 0;
    padding: 10px 0;
    font-size: 1.6rem;
    font-weight: 700;
}
.faq-answer p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 10px 0;
}
.faq-question::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
    color: var(--dark-text);
}
.faq-item.active .faq-question::after {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.contact-card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Adjust if content is taller */
    padding-top: 15px;
}

.contact-card {
    flex: 1;
    min-width: 200px;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}
.contact-card p {
    margin: 5px 0 0 0;
}

@media (max-width: 768px) {
    .split-layout-container {
        flex-direction: column;
    }
    .split-nav {
        flex: 0 0 auto;
    }
}

/* --- Media Block Component --- */
.media-block {
    display: flex;
    align-items: center;
    gap: 60px;
}

.media-block-text {
    flex: 1;
    min-width: 0; /* Fix for flexbox overflow */
}

.media-block-text h2,
.media-block-text .section-subtitle,
.media-block-text .highlight-box {
    text-align: left;
}

.media-block-text .section-subtitle {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

.media-block-text .highlight-box {
    margin: 60px 0 0 0;
    max-width: 100%;
}

.media-block-image {
    flex: 1;
    text-align: center;
}

.media-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Reverse order for alternating layout */
.media-block.reverse {
    flex-direction: row-reverse;
}

.media-block-text h4 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 10px;
    color: var(--dark-text);
    font-weight: 700;
}

@media (max-width: 992px) {
    .media-block, .media-block.reverse {
        flex-direction: column;
        gap: 40px;
    }
}

/* --- Módulo "Quiero Integrar" --- */
.interactive-numbers {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin: 40px 0 60px 0;
    flex-wrap: wrap;
}
.interactive-numbers > div { padding: 10px 20px; }
.interactive-numbers .number { font-size: 3.6rem; font-weight: 700; color: var(--glow-green); }
.interactive-numbers p { font-size: 1.6rem; color: var(--light-text); margin-top: 5px; } /* Default color */

.page-banner .interactive-numbers {
    margin-top: 40px;
}
.page-banner .interactive-numbers p {
    color: var(--white);
    opacity: 0.8;
}

/* --- Formulario de Contacto --- */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
}
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.contact-form input, .contact-form textarea {
    flex: 1 1 300px;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--glow-green);
}
.form-full-width {
    margin-bottom: 20px;
}
.form-submit-container {
    text-align: center;
}
.success-message {
    text-align:center;
    padding: 15px;
    background-color: #e9fdee;
    color: #333;
    border: 1px solid var(--glow-green);
    border-radius: 8px;
    margin-bottom: 20px;
    max-width: 800px;
    margin: 20px auto;
}

/* --- Footer --- */
#footer {
    background-color: #2b2b2b;
    color: #ccc;
    padding: 0; /* Remove padding from footer, apply to children */
    border-top: 5px solid var(--glow-green); /* UPDATED */
}

#footer .footer-top {
    padding: 60px 0;
}

/* 
 * Se establece un tamaño de fuente pequeño y se usa !important para asegurar que esta regla 
 * anule cualquier otro estilo conflictivo que pueda estar afectando desde la caché del 
 * navegador o desde hojas de estilo antiguas.
*/
#footer p, #footer .footer-info2 a, #footer .footer-newsletter2 {
    font-size: 1.2rem !important; /* Equivale a 12px. Ajustado para legibilidad. */
}

#footer .container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 20px;
}

#footer .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

#footer .col-12, #footer .col-md-6, #footer .col-md-8, #footer .col-md-4 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    #footer .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    #footer .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    #footer .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    #footer .col-md-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
    #footer .col-md-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }
}

#footer .footer-info img {
    max-width: 150px;
    margin-bottom: 20px;
    display: block;
}

#footer .footer-info {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

#footer .footer-info .footer-description {
    margin-top: 0;
    line-height: 1.7;
}

#footer .social-links {
    margin-top: 20px;
}

.footer-contact {
    padding-left: 30px;
}

.footer-contact-info {
    margin-top: 15px;
}

.footer-contact-info p {
    line-height: 1.7;
    margin: 0;
}
.footer-contact-info a {
    color: var(--glow-green);
}
.footer-contact-info a:hover {
    color: var(--white);
}

#footer .social-links p {
    display: inline-block;
    margin-right: 10px;
    font-weight: bold;
}

#footer .social-links a {
    color: #ccc;
    margin: 0 8px;
    font-size: 1.8rem;
    transition: color 0.3s ease;
}
#footer .social-links a:hover {
    color: var(--glow-green);
}

#footer .container:last-child {
    padding-bottom: 40px;
}

#footer .container:last-child .row {
    border-top: 1px solid #444;
    padding-top: 30px;
    align-items: center;
}

#footer .footer-info2 a {
    color: #ccc;
    margin: 0 10px;
}
#footer .footer-info2 a:hover {
    color: var(--white);
}

#footer .footer-newsletter2 {
    text-align: right;
}

@media (max-width: 768px) {
    #footer .footer-info img {
        display: block;
        margin: 0 auto 20px auto;
    }
    #footer .footer-info {
        flex-direction: column;
        text-align: center;
    }
    #footer .footer-contact {
        text-align: center;
        padding-left: 15px;
        margin-top: 30px;
    }
    #footer .social-links p {
        display: block;
    }
    #footer .footer-info2, #footer .footer-newsletter2 {
        text-align: center;
        flex: 0 0 100%;
        max-width: 100%;
    }
    #footer .footer-info2 {
        margin-bottom: 15px;
    }
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.d-inline {
    display: inline !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

/* === TABS PARA INSTRUCCIONES === */
.instructions-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.tab-button {
    padding: 10px 24px;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-text);
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.tab-button:hover {
    background-color: var(--background-light);
    transform: translateY(-1px);
}

.tab-button.active {
    background-color: #E59900; /* Color que combina con el fondo bg-third-2 */
    color: var(--white);
    border-color: #E59900;
    box-shadow: 0 4px 12px rgba(229, 153, 0, 0.3);
}

.instructions-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.instructions-content.active {
    display: block;
}

/* === TARJETAS GIRATORIAS 3D (FLIPPING CARDS) === */
.flip-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.flip-card {
    background-color: transparent;
    height: 250px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-radius: 12px;
}

.flip-card:hover .flip-card-inner {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flip-card-front {
    background-color: var(--white);
    color: var(--dark-text);
    border: 1px solid var(--border-color);
}

.flip-card-back {
    background-color: #004550;
    color: var(--white);
    transform: rotateY(180deg);
}

.flip-card-icon {
    font-size: 3.6rem;
    color: #009597;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.flip-card:hover .flip-card-icon {
    transform: scale(1.1);
}

.flip-card-front h4 {
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.flip-hint {
    font-size: 1.2rem;
    color: var(--light-text);
    opacity: 0.7;
    margin-top: 10px;
    font-weight: 500;
}

.flip-card-back h4 {
    font-size: 1.8rem;
    margin: 0 0 15px 0;
    font-weight: 700;
    color: var(--glow-green);
}

.flip-card-back p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsividad para tarjetas giratorias */
@media (max-width: 992px) {
    .flip-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .flip-cards-container {
        grid-template-columns: 1fr;
    }
    .flip-card {
        height: 220px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === NAVBAR ACTIVE STATE === */
.nav-link.active {
    color: var(--glow-green) !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 5px;
    right: 5px;
    height: 3px;
    background-color: var(--glow-green);
    border-radius: 2px;
}

/* Active state when header is scrolled (white background) */
.cabezal.scrolled .nav-link.active {
    color: #009597 !important; /* Brand green/blue with high contrast */
}

.cabezal.scrolled .nav-link.active::after {
    background-color: #009597;
}

/* === GRID-4 FOR FLIPPING CARDS === */
.flip-cards-container.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .flip-cards-container.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .flip-cards-container.grid-4 {
        grid-template-columns: 1fr;
    }
}

/* === MODERN CONTACT SECTION === */
.contact-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 960px;
    margin: 40px auto 0 auto;
}

.contact-card-modern {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    color: var(--dark-text) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.contact-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    transition: background-color 0.3s ease;
}

/* Colores superiores de tarjetas */
.contact-card-modern.whatsapp::before {
    background-color: #25D366;
}
.contact-card-modern.phone::before {
    background-color: #009597;
}
.contact-card-modern.email::before {
    background-color: #E59900;
}

.contact-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    border-color: transparent;
}

.contact-card-icon-modern {
    font-size: 4rem;
    margin-bottom: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-card-modern.whatsapp .contact-card-icon-modern {
    background-color: rgba(37, 211, 102, 0.1);
    color: #25D366;
}
.contact-card-modern.phone .contact-card-icon-modern {
    background-color: rgba(0, 149, 151, 0.1);
    color: #009597;
}
.contact-card-modern.email .contact-card-icon-modern {
    background-color: rgba(229, 153, 0, 0.1);
    color: #E59900;
}

.contact-card-modern:hover .contact-card-icon-modern {
    transform: scale(1.1);
}

.contact-card-modern h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--dark-text);
}

.contact-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0 0 20px 0;
}

.contact-btn-modern {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.contact-card-modern.whatsapp:hover .contact-btn-modern {
    color: #25D366;
}
.contact-card-modern.phone:hover .contact-btn-modern {
    color: #009597;
}
.contact-card-modern.email:hover .contact-btn-modern {
    color: #E59900;
}

@media (max-width: 768px) {
    .contact-grid-modern {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
}

/* === MODERN CONTACT FORM CARD === */
.contact-form-card {
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 40px auto 0 auto;
    padding: 40px;
    box-sizing: border-box;
    text-align: left;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.contact-form-group {
    display: flex;
    flex-direction: column;
}

.contact-form-group.full-width {
    grid-column: span 2;
}

.contact-form-group label {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-text);
}

.contact-form-input {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-light);
    color: var(--dark-text);
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}

.contact-form-input:focus {
    outline: none;
    border-color: #009597;
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 149, 151, 0.1);
}

.contact-form-input::placeholder {
    color: #bbb;
}

@media (max-width: 768px) {
    .contact-form-grid {
        grid-template-columns: 1fr;
    }
    .contact-form-group.full-width {
        grid-column: span 1;
    }
    .contact-form-card {
        padding: 30px 20px;
        margin: 30px 10px 0 10px;
    }
}

/* === CONTACT BUTTON SMOOTH TRANSITIONS === */
.btn-bounce {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.btn-bounce.animate-bounce {
    opacity: 1;
    transform: translateY(0);
}

.btn-bounce:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 8px 25px rgba(154, 244, 176, 0.6) !important;
}