:root {
    --primary-color: #1e2b58;
    --secondary-color: #fdb813;
    --accent-blue: #00a9e0;
    --text-dark: #1e2b58;
    --text-light: #fff;
    --bg-light: #f4f7f6;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo img {
    height: 70px;
    max-width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    border: 0;
    background: transparent;
    padding: 8px;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    transition: 0.3s;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(30, 43, 88, 0.85), rgba(30, 43, 88, 0.85)), url('../assets/images/banner_hero.png');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    color: var(--text-light);
    padding: 80px 0;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--secondary-color);
}

.hero-content .subtitle {
    font-size: clamp(1rem, 3vw, 1.4rem);
    margin-bottom: 30px;
    font-weight: 600;
}

.hero-info-box {
    background: rgba(255, 255, 255, 0.1);
    padding: clamp(20px, 5vw, 40px);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 30px;
}

.hero-info-box h3 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-info-box ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    text-align: left;
}

.hero-info-box ul li::before {
    content: '✔';
    color: var(--secondary-color);
    margin-right: 10px;
    font-weight: bold;
}

.warning-text {
    font-style: italic;
    color: #ff9f9f;
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Buttons & Animations */
.btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn:hover {
    background: #e5a700;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

@keyframes premiumButtonLoad {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.page-loading .btn,
body.page-loading .btn-outline,
body.page-loading .btn-cert,
body.page-loading .detalle-navegacion button,
body.page-loading .detalle-volver {
    opacity: 0;
    transform: translateY(8px);
    animation: premiumButtonLoad 400ms ease forwards;
    will-change: opacity, transform;
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #1ebe57;
}


#btn-capacitaciones{
    display: block;
    margin: 20px auto 50px;
}


/* Sections */
section {
    padding: clamp(60px, 10vw, 100px) 0;
}

h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--primary-color);
    position: relative;
    text-transform: uppercase;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    margin: 15px auto 0;
}

/* Nosotros Section */
.nosotros-section {
    background: #fff;
}

.nosotros-intro {
    text-align: center;
    margin-bottom: 40px;
}

.amisi-logo {
    height: 120px;
    margin: 30px auto;
    display: block;
    max-width: 100%;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.nosotros-card {
    padding: 40px;
    background: var(--bg-light);
    border-radius: 15px;
    text-align: center;
    border-bottom: 4px solid var(--secondary-color);
    transition: transform 0.3s;
}

.nosotros-card:hover {
    transform: translateY(-10px);
}

.nosotros-card img {
    width: 80px;
    margin-bottom: 20px;
}

.nosotros-card h3 {
    color: var(--accent-blue);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.marco-legal-text {
    text-align: justify;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 40px auto 0;
}

/* Modal Capacitación Section */

.capacitaciones-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 43, 88, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.capacitaciones-modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    line-height: 1;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.modal-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: 0.3s;
}

.modal-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-10px);
}

.modal-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Certificaciones Section Fix */
.conocer-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.conocer-text {
    flex: 1;
    min-width: 300px;
}

.conocer-img {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.conocer-img img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Paola Section (Restored v2 style) */
.paola-section {
    background: var(--bg-light);
}

.paola-flex {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    justify-content: center;
}

.paola-img img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid var(--primary-color);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.paola-content {
    flex: 1;
    min-width: 300px;
}

.paola-content h2 {
    text-align: left;
}

.paola-content h2::after {
    margin: 15px 0 0;
}

/* Formulario */
.contacto-section {
    background: var(--bg-light);
}

.contacto-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    align-items: start;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.3s;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 169, 224, 0.2);
}

.form-error {
    display: block;
    min-height: 1.2em;
    margin-top: 6px;
    color: #b00020;
    font-size: .88rem;
}

.form-status {
    margin-bottom: 16px;
    font-weight: 600;
}

.form-status.is-success {
    color: #1b7f3a;
}

.form-status.is-error {
    color: #b00020;
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.contacto-form .btn[disabled] {
    cursor: wait;
    filter: saturate(.85);
}

.btn-loading {
    display: none;
}

.contacto-form .btn.is-loading .btn-text {
    display: none;
}

.contacto-form .btn.is-loading .btn-loading {
    display: inline;
}

/* WhatsApp Flotante & Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* WhatsApp Flotante & Pulse Animation */
@keyframes pulso {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(6, 33, 101, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

.whatsapp-label {
    background: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s;
    pointer-events: none;
}

.whatsapp-wrapper:hover .whatsapp-label {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-float {
    background-color: #25d366;
    color: #fff;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-decoration: none;
    animation: pulse 2s infinite;
}

.whatsapp-float img {
    width: 35px;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 110px;
    right: 30px;
    background: var(--primary-color);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 999;
    transition: all 0.3s;
}

.scroll-top:hover {
    transform: translateY(-5px);
    background: var(--accent-blue);
}

/* Checklist Section */
.checklist-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
    color: #fff;
    text-align: center;
}

.checklist-section h2 {
    color: #fff;
}

/* Footer & Social Icons */
footer {
    background: #111;
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
}

.social-icons a {
    transition: transform 0.3s;
}

.social-icons a:hover {
    transform: scale(1.2);
}

.social-icons img {
    height: 45px;
    filter: brightness(0) invert(1);
}

/* Responsividad */
@media (max-width: 992px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 90px;
        right: -100%;
        background: #fff;
        width: 100%;
        height: calc(100vh - 90px);
        height: calc(100dvh - 90px);
        overflow-y: auto;
        overscroll-behavior: contain;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 20px 0; }
    .paola-content h2 { text-align: center; }
    .paola-content h2::after { margin: 15px auto 0; }
}

@media (max-width: 600px) {
    .whatsapp-label { display: none; }
    .hero-info-box ul { grid-template-columns: 1fr; }
}

/* ================================= */
/* CERTIFICACIONES CONOCER */
/* ================================= */

.certificaciones-section{
    background:#f2f2f2;
    padding:100px 0;
}

.cert-title{
    text-align:center;
    color:#a7c400;
    font-size:3rem;
    margin-bottom:60px;
    font-weight:700;
}

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

.cert-card{
    position:relative;
    height:470px;
    border-radius:28px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,0.18);
    transition:0.4s ease;
}

.cert-card:hover{
    transform:translateY(-10px);
}

.cert-card img{
    width:100%;
    height:100%;
    object-fit:cover;
    position:absolute;
    inset:0;
}

.cert-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,0.55);
    z-index:1;
}

.cert-info{
    position:relative;
    z-index:2;
    height:100%;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:40px;
}

.cert-info h3{
    color:#fff;
    font-size:2rem;
    line-height:1.3;
    margin-bottom:20px;
    font-weight:700;
}

.cert-info p{
    color:#fff;
    font-size:1.15rem;
    line-height:1.7;
    margin-bottom:35px;
}

.btn-cert{
    display:inline-flex;
    align-items:center;
    gap:10px;
    background:#a7c400;
    color:#fff;
    text-decoration:none;
    padding:16px 38px;
    border-radius:60px;
    font-size:1.1rem;
    font-weight:700;
    transition:0.3s ease;
}

.btn-cert span{
    font-size:1.8rem;
    line-height:0;
}

.btn-cert:hover{
    background:#8ea700;
    transform:scale(1.05);
}

@media(max-width:1100px){

    .cert-grid{
        grid-template-columns:1fr;
    }

}

/*==================================================
CARRUSEL CERTIFICACIONES
==================================================*/

.certificaciones-section{
    padding:80px 0;
}

.cert-title{
    text-align:center;
    color:var(--primary-color);
    margin-bottom:10px;
}

.cert-subtitle{
    text-align:center;
    max-width:700px;
    margin:0 auto 50px;
    color:#666;
}

/* Swiper */

.certificacionesSwiper{
    padding:20px 45px 70px;
}

.certificacionesSwiper .swiper-slide{
    display:flex;
    justify-content:center;
}

/* Tarjetas */

.cert-card{

    width:100%;

    max-width:330px;

    border-radius:18px;

    overflow:hidden;

    position:relative;

    transition:.35s ease;

    box-shadow:0 15px 35px rgba(0,0,0,.15);

    cursor:pointer;

}

.cert-card:hover{

    transform:translateY(-10px);

    box-shadow:0 25px 45px rgba(0,0,0,.20);

}

.cert-card img{

    width:100%;

    height:360px;

    object-fit:cover;

    display:block;

    transition:.4s;

}

.cert-card:hover img{

    transform:scale(1.05);

}

/* Información */

.cert-info{

    position:absolute;

    bottom:0;

    left:0;

    width:100%;

    padding:25px;

    color:#fff;

    z-index:5;

}

.cert-info h3{

    font-size:1.1rem;

    margin-bottom:12px;

}

.cert-info p{

    font-size:.92rem;

    line-height:1.5;

    margin-bottom:18px;

}

.cert-overlay{

    position:absolute;

    inset:0;

    background:linear-gradient(
        transparent 20%,
        rgba(0,0,0,.85) 100%
    );

    z-index:2;

}

/* Botón */

.btn-cert{

    display:inline-flex;

    align-items:center;

    gap:8px;

    background:#f7b500;

    color:#1d2d5a;

    text-decoration:none;

    padding:10px 18px;

    border-radius:40px;

    font-weight:bold;

    transition:.3s;

}

.btn-cert:hover{

    background:#fff;

    transform:translateX(5px);

}

/* Flechas */

.swiper-button-next,
.swiper-button-prev{

    width:48px;

    height:48px;

    border-radius:50%;

    background:#fff;

    color:var(--primary-color);

    box-shadow:0 8px 20px rgba(0,0,0,.18);

}

.swiper-button-next::after,
.swiper-button-prev::after{

    font-size:18px;

    font-weight:bold;

}

/* Paginación */

.swiper-pagination{

    bottom:0 !important;

}

.swiper-pagination-bullet{

    width:12px;

    height:12px;

    opacity:1;

    background:#d4d4d4;

}

.swiper-pagination-bullet-active{

    background:#f7b500;

    width:30px;

    border-radius:20px;

}

/* Responsive */

@media(max-width:992px){

.certificacionesSwiper{

padding:20px 25px 60px;

}

.cert-card{

max-width:300px;

}

}

@media(max-width:768px){

.cert-card{

max-width:340px;

}

.cert-card img{

height:320px;

}

}

@media(max-width:576px){

.certificacionesSwiper{

padding:10px 10px 50px;

}

}

/* Rediseño del carrusel de certificaciones */
.certificacionesSwiper{
    padding:16px 52px 58px;
}

.certificacionesSwiper .swiper-slide{
    height:auto;
    display:flex;
}

.certificacionesSwiper .cert-card{
    width:100%;
    max-width:none;
    height:auto;
    min-width:0;
    border-radius:14px;
    display:flex;
    flex-direction:column;
    background:#fff;
    box-shadow:0 10px 24px rgba(0,0,0,.15);
    overflow:hidden;
}

.certificacionesSwiper .cert-card:hover{
    transform:translateY(-6px) scale(1.015);
    box-shadow:0 18px 32px rgba(0,0,0,.20);
}

.certificacionesSwiper .cert-image{
    aspect-ratio:16/10;
    overflow:hidden;
}

.certificacionesSwiper .cert-image img{
    position:static;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transition:.4s;
}

.certificacionesSwiper .cert-card:hover .cert-image img{
    transform:scale(1.05);
}

.certificacionesSwiper .cert-info{
    position:static;
    width:100%;
    height:auto;
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    text-align:left;
    padding:18px;
    color:inherit;
}

.certificacionesSwiper .cert-info h3{
    color:inherit;
    font-size:1.1rem;
    line-height:1.3;
    margin-bottom:8px;
}

.certificacionesSwiper .cert-info p{
    color:#666;
    font-size:.88rem;
    line-height:1.45;
    margin-bottom:16px;
}

.certificacionesSwiper .btn-cert{
    margin-top:auto;
    padding:9px 16px;
}

@media(max-width:992px){
    .certificacionesSwiper{ padding:16px 44px 58px; }
}

@media(max-width:576px){
    .certificacionesSwiper{ padding:10px 8px 48px; }
    .certificacionesSwiper .swiper-button-next,
    .certificacionesSwiper .swiper-button-prev{ display:none; }
    .certificacionesSwiper .cert-info{ padding:16px; }
}

@media(max-width:576px){

.swiper-button-next,
.swiper-button-prev{

display:none;

}

.cert-card{

max-width:100%;

}

.cert-card img{

height:280px;

}

}

/* Posicionamiento definitivo de tarjetas y controles */
.certificaciones-hero{
    padding:clamp(50px, 6vw, 56px) 0 16px;
    text-align:center;
}

.certificaciones-hero h1{
    max-width:900px;
    margin:0 auto;
}

.certificaciones-hero p{
    max-width:700px;
    margin:20px auto 0;
    line-height:1.6;
}

.certificaciones-section{
    padding:16px 0 52px;
}

.certificaciones-section .container{
    position:relative;
}

.certificaciones-section .cert-subtitle{
    margin:0 auto 16px;
}

.certificaciones-section .certificacionesSwiper{
    width:calc(100% - 112px);
    padding:8px 0 12px;
}

.certificaciones-section .cert-card{
    height:390px;
    display:flex;
    flex-direction:column;
}

.certificaciones-section .swiper-slide{
    opacity:.80;
    transform:scale(.95);
    transition:opacity .95s ease, transform .95s ease;
}

.certificaciones-section .swiper-slide-active{
    opacity:1;
    transform:scale(1);
}

.certificaciones-section .cert-image{
    flex:0 0 215px;
    aspect-ratio:auto;
}

.certificaciones-section .cert-info{
    flex:1;
    display:flex;
    flex-direction:column;
    min-height:0;
}

.certificaciones-section .cert-info p{
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    line-clamp:3;
}

.certificaciones-section .btn-cert{
    margin-top:auto;
}

.certificaciones-section .swiper-pagination{
    position:relative;
    inset:auto;
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:30px;
    margin-top:10px;
}

.certificaciones-section .swiper-button-prev,
.certificaciones-section .swiper-button-next{
    top:calc(50% + 18px);
    margin-top:-24px;
    width:36px;
    height:48px;
    border-radius:0;
    background:transparent;
    color:#20356D;
    box-shadow:none;
    transition:color .25s ease, transform .25s ease;
}

.certificaciones-section .swiper-button-prev::after,
.certificaciones-section .swiper-button-next::after{
    font-size:29px;
    font-weight:700;
}

.certificaciones-section .swiper-button-prev:hover,
.certificaciones-section .swiper-button-next:hover{
    color:#F4B400;
    transform:scale(1.12);
}

.certificaciones-section .swiper-button-prev{ left:4px; }
.certificaciones-section .swiper-button-next{ right:4px; }

@media(max-width:767px){
    .certificaciones-section{ padding:16px 0 44px; }
    .certificaciones-section .certificacionesSwiper{ width:100%; }
    .certificaciones-section .cert-card{ height:380px; }
    .certificaciones-section .cert-image{ flex-basis:210px; }
}

@media(min-width:768px) and (max-width:1023px){
    .certificaciones-section .swiper-slide-active{
        opacity:1;
        transform:scale(1);
    }
}

.detalle-certificacion .detalle-botones{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:12px;
    margin-top:36px;
}

/* Navegación interna del detalle */
.detalle-certificaciones{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:18px 0 24px;
}

.detalle-certificaciones button,
.detalle-navegacion button,
.detalle-volver{
    font:inherit;
    color:#1d2d5a;
    cursor:pointer;
    transition:background-color 300ms ease, border-color 300ms ease,
        box-shadow 300ms ease, transform 300ms ease;
}

.detalle-certificaciones button{
    flex:0 0 auto;
    padding:8px 14px;
    border:1px solid #d9dce5;
    border-radius:999px;
    background:#fff;
    font-weight:600;
}

.detalle-certificaciones button:hover,
.detalle-certificaciones button.is-active{
    border-color:#f7b500;
    background:#f7b500;
    transform:translateY(-2px);
}

.detalle-certificaciones button.is-active{
    box-shadow:0 5px 14px rgba(29,45,90,.14);
}

.detalle-imagen{
    position:relative;
}

.detalle-contador{
    position:absolute;
    top:12px;
    right:12px;
    z-index:2;
    padding:5px 11px;
    border-radius:999px;
    background:#1d2d5a;
    color:#fff;
    font-weight:700;
    line-height:1.2;
    box-shadow:0 4px 12px rgba(29,45,90,.18);
}

.detalle-navegacion{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-top:32px;
}

.detalle-navegacion button,
.detalle-volver{
    border:1px solid #d9dce5;
    border-radius:10px;
    background:#fff;
    padding:10px 16px;
    font-weight:600;
    text-decoration:none;
}

.detalle-navegacion button:hover,
.detalle-volver:hover{
    border-color:#f7b500;
    background:#f7b500;
    transform:translateY(-2px);
    box-shadow:0 6px 16px rgba(29,45,90,.14);
}

.detalle-volver{
    display:table;
    margin:18px auto 0;
}

.detalle-certificacion .is-entering .detalle-imagen{
    transform:translateY(8px) scale(1.03);
}

@media(max-width:767px){
    .detalle-certificaciones{
        flex-wrap:nowrap;
        width:100%;
        overflow-x:auto;
        padding-bottom:8px;
        scrollbar-width:thin;
        -webkit-overflow-scrolling:touch;
    }

    .detalle-navegacion{
        align-items:stretch;
    }

    .detalle-navegacion button{
        flex:1;
    }
}

@media(max-width:480px){
    .detalle-navegacion{
        flex-direction:column;
    }
}

/* Interacción del detalle de certificación */
.detalle-certificacion{
    scroll-margin-top:110px;
}

.detalle-certificacion .detalle-flex{
    opacity:1;
    transition:opacity 350ms ease;
}

.detalle-certificacion .detalle-flex.is-leaving{
    opacity:0;
    transition-duration:200ms;
}

.detalle-certificacion .detalle-flex.is-entering{
    opacity:0;
}

.detalle-certificacion .detalle-texto h2,
.detalle-certificacion .detalle-texto p,
.detalle-certificacion .detalle-texto ul,
.detalle-certificacion .detalle-botones,
.detalle-certificacion .detalle-imagen{
    opacity:1;
    transform:translateY(0);
    transition:opacity 350ms ease, transform 350ms ease;
}

.detalle-certificacion .is-entering .detalle-texto h2,
.detalle-certificacion .is-entering .detalle-texto p,
.detalle-certificacion .is-entering .detalle-texto ul,
.detalle-certificacion .is-entering .detalle-botones,
.detalle-certificacion .is-entering .detalle-imagen{
    opacity:0;
    transform:translateY(8px);
}

.detalle-certificacion .is-entering .detalle-imagen{
    transform:translateY(8px) scale(1.03);
}

.detalle-certificacion .detalle-texto p{ transition-delay:35ms; }
.detalle-certificacion .detalle-texto ul{ transition-delay:70ms; }
.detalle-certificacion .detalle-imagen{ transition-delay:90ms; }
.detalle-certificacion .detalle-botones{ transition-delay:105ms; }

.detalle-certificacion .detalle-imagen img{
    transition:opacity 350ms ease;
}

.certificaciones-section .btn-cert{
    background:#f7b500;
    color:#1d2d5a;
    box-shadow:0 4px 12px rgba(29,45,90,.12);
    transition:transform 300ms ease, box-shadow 300ms ease, filter 300ms ease;
}

.certificaciones-section .btn-cert span{
    color:#1d2d5a;
    transition:transform 300ms ease;
}

.certificaciones-section .btn-cert:hover{
    background:#f7b500;
    transform:translateY(-2px);
    filter:brightness(1.06);
    box-shadow:0 8px 18px rgba(29,45,90,.2);
}

.certificaciones-section .btn-cert:hover span{
    transform:translateX(6px);
}

.certificaciones-section .btn-cert:active{
    transform:scale(.97);
    transition-duration:100ms;
}

@media(prefers-reduced-motion:reduce){
    body.page-loading .btn,
    body.page-loading .btn-outline,
    body.page-loading .btn-cert,
    body.page-loading .detalle-navegacion button,
    body.page-loading .detalle-volver{
        opacity:1;
        transform:none;
        animation:none;
        will-change:auto;
    }

    .detalle-certificacion .detalle-flex,
    .detalle-certificacion .detalle-texto h2,
    .detalle-certificacion .detalle-texto p,
    .detalle-certificacion .detalle-texto ul,
    .detalle-certificacion .detalle-botones,
    .detalle-certificacion .detalle-imagen{
        transition-duration:1ms;
        transition-delay:0ms;
    }
}

/* Imagen del detalle de certificación */
.detalle-certificacion .detalle-flex{
    display:grid;
    grid-template-columns:minmax(0, 3fr) minmax(320px, 2fr);
    align-items:center;
    gap:40px;
}

.detalle-certificacion .detalle-imagen{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
}

.detalle-certificacion .detalle-imagen img{
    display:block;
    width:100%;
    max-width:520px;
    height:auto;
    max-height:350px;
    object-fit:cover;
    border-radius:18px;
    box-shadow:0 12px 30px rgba(0,0,0,.14);
}

@media(max-width:1024px){
    .detalle-certificacion .detalle-flex{
        grid-template-columns:minmax(0, 55fr) minmax(280px, 45fr);
    }

    .detalle-certificacion .detalle-imagen img{
        max-width:440px;
        max-height:320px;
    }
}

@media(max-width:767px){
    .detalle-certificacion .detalle-flex{
        grid-template-columns:1fr;
    }

    .detalle-certificacion .detalle-imagen img{
        width:100%;
        max-width:100%;
        max-height:350px;
    }
}
