/* =========================================================
   Saint John's - Tema (light / dark) y mejoras visuales
   Se carga después de style.css y sobrescribe lo necesario.
   ========================================================= */

:root {
    --sj-primary: #1b49d4;
    --sj-primary-2: #3061cb;
    --sj-primary-deep: #070ca9;
    --sj-accent: #ed7002;
    --sj-accent-text: #b45309;

    --sj-bg: #ffffff;
    --sj-bg-alt: #f5f7fb;
    --sj-surface: #ffffff;
    --sj-heading: #1c2333;
    --sj-text: #3d4555;
    --sj-muted: #6b7385;
    --sj-border: #e4e8f0;
    --sj-nav-bg: rgba(255, 255, 255, 0.92);
    --sj-nav-link: #26313c;
    --sj-shadow: 0 10px 30px -12px rgba(16, 24, 64, 0.25);
    --sj-radius: 16px;
    color-scheme: light;
}

html[data-theme="dark"] {
    --sj-primary: #5b8cff;
    --sj-primary-2: #7aa2ff;
    --sj-accent: #ff9a3d;
    --sj-accent-text: #ff9a3d;

    --sj-bg: #0e1320;
    --sj-bg-alt: #141b2c;
    --sj-surface: #1a2236;
    --sj-heading: #f1f4fa;
    --sj-text: #c9d0de;
    --sj-muted: #95a0b5;
    --sj-border: #2a3450;
    --sj-nav-bg: rgba(16, 22, 36, 0.92);
    --sj-nav-link: #e6eaf2;
    --sj-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
    background: var(--sj-bg);
    color: var(--sj-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .3s ease, color .3s ease;
}

html[lang^="zh"] body,
html[lang^="zh"] h1, html[lang^="zh"] h2, html[lang^="zh"] h3,
html[lang^="zh"] h4, html[lang^="zh"] h5, html[lang^="zh"] .button {
    font-family: 'Open Sans', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Hiragino Sans GB', sans-serif;
    letter-spacing: 0;
}

p, table, tr, td, blockquote { color: var(--sj-text); }

.darkcolor, .main-title h2, .heading-title h2, .heading-title h3 { color: var(--sj-heading); }
.defaultcolor { color: var(--sj-accent-text); }

.bglight { background: var(--sj-bg-alt); }
.bg-white, .container-fluid.bg-white { background: var(--sj-surface) !important; }
.whitebox { background: var(--sj-surface); }

:focus-visible {
    outline: 3px solid var(--sj-accent) !important;
    outline-offset: 2px;
}

/* Párrafos largos que el sitio maqueta dentro de <h3>/<h4> */
.video-content-setting h4,
.aboutus h3.darkcolor,
.aboutus h4.darkcolor,
.bglight h4.darkcolor {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--sj-text);
}
.aboutus h3.darkcolor { font-size: 1.2rem; }

.video-content-setting { padding: 3rem 0; }

/* ---------- Imágenes ---------- */
.image img,
.aboutus .image img {
    border-radius: var(--sj-radius);
    box-shadow: var(--sj-shadow);
}
img { max-width: 100%; height: auto; }

/* ---------- Botones ---------- */
.button.btn-primary {
    border-radius: 999px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #1b49d4 0%, #070ca9 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px -8px rgba(27, 73, 212, .7);
    margin: 4px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.button.btn-primary:hover,
.button.btn-primary:focus {
    transform: translateY(-2px);
    border-color: transparent !important;
    background: linear-gradient(135deg, #d35400 0%, #a84300 100%) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px -10px rgba(237, 112, 2, .8);
}

/* ---------- Navegación ---------- */
.fixedmenu {
    background: var(--sj-nav-bg) !important;
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
}
.fixedmenu .navbar-nav .nav-link { color: var(--sj-nav-link); }
.fixedmenu .sidemenu_btn > span:not(.gradient-bg) { background: var(--sj-nav-link) !important; }

.navbar-nav .nav-link.active { position: relative; }
.navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--sj-accent);
    transform: translateX(-50%);
}

.dropdown-menu {
    background: var(--sj-surface);
    border: 1px solid var(--sj-border);
    border-radius: 12px;
    box-shadow: var(--sj-shadow);
}
.dropdown-menu .dropdown-item,
.dropdown-menu .dropdown-title { color: var(--sj-heading); }
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus { background: var(--sj-bg-alt); color: var(--sj-primary) !important; }
.dropdown-menu .dropdown-item.active { color: var(--sj-accent-text); background: transparent; }

/* Controles: idioma + tema */
.sj-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 1rem;
}
.sj-ctrl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    min-width: 38px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.sj-ctrl-btn:hover { background: rgba(255, 255, 255, .25); }
.sj-ctrl-btn.dropdown-toggle::after { margin-left: 2px; }
.fixedmenu .sj-ctrl-btn {
    color: var(--sj-nav-link);
    border-color: var(--sj-border);
    background: transparent;
}
.fixedmenu .sj-ctrl-btn:hover { background: var(--sj-bg-alt); }

.sj-theme-toggle .fa-sun { display: none; }
html[data-theme="dark"] .sj-theme-toggle .fa-sun { display: inline-block; }
html[data-theme="dark"] .sj-theme-toggle .fa-moon { display: none; }

/* El selector de idioma está fuera de .navbar-nav: la plantilla oculta todo .navbar .dropdown-menu en
   escritorio y solo lo muestra al pasar el mouse por el menú principal, así que se define su propio estado. */
.sj-lang { position: relative; }
.navbar .sj-lang .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    min-width: 170px;
    padding: 6px;
    margin: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transform-origin: 100% 0;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.navbar .sj-lang .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s;
}
.sj-lang .dropdown-item {
    padding: 0 .9rem;
    line-height: 38px;
    font-size: 15px;
    border-radius: 8px;
}
.sj-lang .dropdown-item.active { background: var(--sj-bg-alt); font-weight: 600; }

/* Botón "volver arriba" que agrega la plantilla (functions.js) sin estilos: aparecía como una barra bajo el footer */
.back-top { display: none !important; }

@media (max-width: 991.98px) {
    .sj-controls { margin-left: auto; margin-right: 52px; }
}
@media (min-width: 992px) {
    .static-nav .sidemenu_btn { display: none !important; }
}

/* Menú lateral (móvil) */
.side-menu .sj-side-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.5rem;
}
.side-menu .sj-side-controls button {
    border: 1px solid rgba(255, 255, 255, .5);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    cursor: pointer;
}
.side-menu .sj-side-controls button.active,
.side-menu .sj-side-controls button:hover { background: #fff; color: var(--sj-primary-deep); }

/* ---------- Preloader ---------- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(27, 73, 212, .10) 0%, transparent 55%),
        var(--sj-bg);
    transition: opacity .6s ease, visibility .6s ease;
}
html[data-theme="dark"] .loader {
    background:
        radial-gradient(circle at 50% 45%, rgba(91, 140, 255, .16) 0%, transparent 55%),
        var(--sj-bg);
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.sj-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.loader.is-hidden .sj-loader-inner { transform: scale(1.06); }

.sj-loader-ring {
    position: relative;
    width: 116px;
    height: 116px;
}
.sj-loader-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: sj-spin 1.4s linear infinite;
}
.sj-loader-ring .track { fill: none; stroke: var(--sj-border); stroke-width: 3; }
.sj-loader-ring .arc {
    fill: none;
    stroke: url(#sj-loader-grad);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 90 250;
    animation: sj-dash 1.4s ease-in-out infinite;
}
.sj-loader-ring img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    animation: sj-breathe 2.4s ease-in-out infinite;
}
.sj-loader-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--sj-heading);
    padding-left: .32em; /* compensa el letter-spacing para centrar */
    animation: sj-fade-up .8s ease both .15s;
}
.sj-loader-bar {
    position: relative;
    width: 120px;
    height: 2px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--sj-border);
}
.sj-loader-bar span {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sj-primary), var(--sj-accent));
    animation: sj-bar 1.2s ease-in-out infinite;
}

@keyframes sj-spin { to { transform: rotate(360deg); } }
@keyframes sj-dash {
    0% { stroke-dasharray: 60 280; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 190 150; stroke-dashoffset: -70; }
    100% { stroke-dasharray: 60 280; stroke-dashoffset: -340; }
}
@keyframes sj-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}
@keyframes sj-fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
@keyframes sj-bar {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* ---------- Secciones de contenido: texto + imagen (.sj-feature) ---------- */
.sj-intro {
    padding: 5rem 0 1rem;
    text-align: center;
    background: var(--sj-bg);
}
.sj-intro .container { max-width: 760px; }
.sj-intro h2 { font-size: 2.5rem; font-weight: 600; color: var(--sj-heading); margin-bottom: 1rem; }
.sj-intro p { font-size: 16.5px; line-height: 1.85; color: var(--sj-muted); margin: 0; }

.sj-feature { position: relative; padding: 5.5rem 0; background: var(--sj-bg); overflow: hidden; }
.sj-feature.is-alt { background: var(--sj-bg-alt); }

.sj-feature-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 5rem;
    align-items: center;
}
.sj-feature.is-reverse .sj-feature-media { order: 2; }

/* Imagen con bloque decorativo desplazado y trama de puntos */
.sj-feature-media { position: relative; }
.sj-feature-media::before {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -22px;
    width: 70%;
    height: 70%;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--sj-primary) 0%, var(--sj-primary-deep) 100%);
    opacity: .14;
}
.sj-feature-media::after {
    content: "";
    position: absolute;
    left: -26px;
    top: -26px;
    width: 110px;
    height: 110px;
    background-image: radial-gradient(var(--sj-accent) 1.6px, transparent 1.6px);
    background-size: 14px 14px;
    opacity: .45;
}
.sj-feature.is-reverse .sj-feature-media::before { right: auto; left: -22px; }
.sj-feature.is-reverse .sj-feature-media::after { left: auto; right: -26px; }

.sj-feature-img {
    position: relative;
    z-index: 1;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 22px;
    background: var(--sj-surface);
    box-shadow: 0 24px 50px -24px rgba(16, 24, 64, .45);
}
.sj-feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}
.sj-feature-row:hover .sj-feature-img img { transform: scale(1.04); }
/* Gráficos (ya diseñados como tarjeta): tamaño natural, sin recorte */
.sj-feature-img.is-graphic { aspect-ratio: auto; background: transparent; }
.sj-feature-img.is-graphic img { height: auto; object-fit: contain; display: block; }
/* Logos: completos sobre tarjeta blanca */
.sj-feature-img.is-logo { background: #fff; border: 1px solid var(--sj-border); }
.sj-feature-img.is-logo img { object-fit: contain; padding: 10%; }
.sj-feature-row:hover .sj-feature-img.is-graphic img,
.sj-feature-row:hover .sj-feature-img.is-logo img { transform: scale(1.02); }
html[data-theme="dark"] .sj-feature-img { box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8); }
html[data-theme="dark"] .sj-feature-img img { filter: none; }

.sj-feature-link { display: block; }

/* Número de nivel (cursos intensivos) */
.sj-feature-step {
    position: absolute;
    z-index: 2;
    top: -18px;
    left: -18px;
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d35400 0%, #a84300 100%);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 12px 24px -10px rgba(211, 84, 0, .8);
}
.sj-feature.is-reverse .sj-feature-step { left: auto; right: -18px; }

/* Texto */
.sj-feature-title {
    font-size: 2.3rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--sj-heading);
    margin-bottom: 1.4rem;
}
.sj-feature-title .sj-accent { color: var(--sj-accent-text); }
.sj-feature-body > p {
    font-size: 16px;
    line-height: 1.85;
    color: var(--sj-text);
    margin-bottom: 1.1rem;
}
.sj-feature-body > p:last-child { margin-bottom: 0; }

/* Recuadro de dato destacado (horarios) */
.sj-feature-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 1.75rem;
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--sj-bg-alt);
    border: 1px solid var(--sj-border);
}
.sj-feature.is-alt .sj-feature-info { background: var(--sj-surface); }
.sj-feature-info > i,
.sj-feature-points li > i {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--sj-primary);
    background: rgba(27, 73, 212, .10);
}
html[data-theme="dark"] .sj-feature-info > i,
html[data-theme="dark"] .sj-feature-points li > i { background: rgba(91, 140, 255, .14); }
.sj-feature-info strong,
.sj-feature-points strong {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sj-heading);
    margin-bottom: 3px;
}
.sj-feature-info span { display: block; font-size: 15px; line-height: 1.6; color: var(--sj-text); }

/* Lista de puntos con ícono */
.sj-feature-points { list-style: none; padding: 0; margin: .5rem 0 0; }
.sj-feature-points li { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; }
.sj-feature-points li + li { border-top: 1px solid var(--sj-border); }
.sj-feature-points strong { text-transform: none; letter-spacing: 0; font-size: 16px; }
.sj-feature-points p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--sj-text); }

/* Frase destacada */
.sj-feature-highlight {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 18px;
    border-left: 3px solid var(--sj-accent);
    border-radius: 0 12px 12px 0;
    background: var(--sj-bg-alt);
    font-weight: 600;
    color: var(--sj-heading) !important;
}
.sj-feature.is-alt .sj-feature-highlight { background: var(--sj-surface); }
.sj-feature-highlight i { color: var(--sj-accent); margin-top: 5px; }

.sj-feature-cta { margin: 1.9rem 0 0 !important; display: inline-flex !important; align-items: center; gap: 10px; }
.sj-feature-cta i { font-size: 15px; transition: transform .2s ease; }
.sj-feature-cta:hover i { transform: translateX(3px); }

@media (max-width: 991.98px) {
    .sj-feature { padding: 4rem 0; }
    .sj-feature-row { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
    .sj-feature.is-reverse .sj-feature-media { order: 0; }
    .sj-feature-media { max-width: 560px; width: 100%; margin: 0 auto; }
    .sj-feature-title { font-size: 2rem; }
}
@media (max-width: 575.98px) {
    .sj-intro { padding-top: 3.5rem; }
    .sj-intro h2 { font-size: 2rem; }
    .sj-feature { padding: 3.25rem 0; }
    .sj-feature-row { gap: 2.25rem; }
    .sj-feature-media::before { right: -10px; bottom: -10px; }
    .sj-feature.is-reverse .sj-feature-media::before { left: -10px; }
    .sj-feature-media::after { display: none; }
    .sj-feature-step { top: -12px; left: -6px; width: 56px; height: 56px; font-size: 19px; border-radius: 16px; }
    .sj-feature.is-reverse .sj-feature-step { right: -6px; }
    .sj-feature-title { font-size: 1.7rem; }
}

/* ---------- Sección de video (.sj-video) ---------- */
.sj-video {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 20%, rgba(27, 73, 212, .08) 0%, transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(237, 112, 2, .06) 0%, transparent 40%),
        var(--sj-bg-alt);
}
html[data-theme="dark"] .sj-video {
    background:
        radial-gradient(circle at 85% 20%, rgba(91, 140, 255, .12) 0%, transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(255, 154, 61, .07) 0%, transparent 40%),
        var(--sj-bg-alt);
}
.sj-video-row {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr);
    gap: 4.5rem;
    align-items: center;
}
.sj-video-title { font-size: 2.4rem; font-weight: 600; line-height: 1.15; color: var(--sj-heading); margin-bottom: 1.3rem; }
.sj-video-body p { font-size: 16px; line-height: 1.85; color: var(--sj-text); margin-bottom: 0; }

/* Botón "Ver video" */
.sj-video-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 2rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--sj-heading);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color .25s ease;
}
.sj-video-cta-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    background: linear-gradient(135deg, var(--sj-primary) 0%, var(--sj-primary-deep) 100%);
    box-shadow: 0 10px 24px -10px rgba(27, 73, 212, .8);
    transition: transform .25s ease, background .25s ease;
}
.sj-video-cta-icon i { margin-left: 3px; }
.sj-video-cta:hover .sj-video-cta-icon { transform: scale(1.08); background: linear-gradient(135deg, #d35400 0%, #a84300 100%); }
.sj-video-cta:hover { color: var(--sj-primary); }

/* Marco del video */
.sj-video-media { position: relative; padding: 18px; }
.sj-video-deco {
    position: absolute;
    top: 0;
    right: 0;
    width: 62%;
    height: 72%;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--sj-primary) 0%, var(--sj-primary-deep) 100%);
    opacity: .16;
}
.sj-video-media::after {
    content: "";
    position: absolute;
    left: -14px;
    bottom: -14px;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(var(--sj-accent) 1.6px, transparent 1.6px);
    background-size: 14px 14px;
    opacity: .7;
}
.sj-video-frame {
    position: relative;
    z-index: 1;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 24px;
    background: #0a1030;
    box-shadow: 0 34px 70px -30px rgba(10, 18, 60, .65);
}
.sj-video-frame > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: transform 1.2s cubic-bezier(.2, .8, .2, 1);
}
.sj-video-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(6, 10, 34, .75) 0%, rgba(6, 10, 34, 0) 42%),
        linear-gradient(to bottom, rgba(6, 10, 34, .35) 0%, rgba(6, 10, 34, 0) 30%);
}

/* Esquinas de visor de cámara */
.sj-video-corner {
    position: absolute;
    z-index: 2;
    width: 30px;
    height: 30px;
    border: 0 solid rgba(255, 255, 255, .85);
    transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .7s ease;
}
.sj-video-corner.is-tl { top: 20px; left: 20px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 8px; }
.sj-video-corner.is-tr { top: 20px; right: 20px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 8px; }
.sj-video-corner.is-bl { bottom: 20px; left: 20px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 8px; }
.sj-video-corner.is-br { bottom: 20px; right: 20px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 8px; }

/* Indicador REC */
.sj-video-rec {
    position: absolute;
    z-index: 2;
    top: 26px;
    left: 62px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(6, 10, 34, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    transition: transform .6s ease, opacity .6s ease;
}
.sj-video-rec i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; animation: sj-rec 1.4s ease-in-out infinite; }
@keyframes sj-rec { 50% { opacity: .25; } }

/* Botón de play central */
.sj-video-play {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    width: 86px;
    height: 86px;
    margin: -43px 0 0 -43px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--sj-primary-deep);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .55);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), background .3s ease, color .3s ease, opacity .5s ease;
}
.sj-video-play i { position: relative; z-index: 1; margin-left: 5px; }
.sj-video-play:hover { transform: scale(1.08); background: var(--sj-accent); color: #fff; }
.sj-video-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .7);
    animation: sj-ring 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
}
.sj-video-ring + .sj-video-ring { animation-delay: 1.2s; }
@keyframes sj-ring {
    0% { transform: scale(1); opacity: .8; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* Barra tipo reproductor */
.sj-video-bar {
    position: absolute;
    z-index: 2;
    left: 62px;
    right: 62px;
    bottom: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 13px;
    transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .7s ease;
}
.sj-video-bar .fa-youtube { font-size: 20px; color: #ff3b30; }
.sj-video-label { font-family: 'Montserrat', sans-serif; font-weight: 600; white-space: nowrap; }
.sj-video-progress {
    position: relative;
    flex: 1;
    height: 4px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, .28);
}
.sj-video-progress span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 34%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--sj-primary-2), var(--sj-accent));
    transition: width 1.6s cubic-bezier(.2, .8, .2, 1) .9s;
}

/* Reproduciendo: el iframe ocupa el marco */
.sj-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; }
.sj-video-frame.is-playing > :not(iframe) { opacity: 0; pointer-events: none; }
.sj-video-fallback { position: absolute; inset: 0; z-index: 5; }

/* Animación de "armado" al entrar en pantalla (solo si hay JS) */
.sj-anim-ready .sj-video-frame { clip-path: inset(0 100% 0 0 round 24px); transition: clip-path 1s cubic-bezier(.65, 0, .35, 1); }
.sj-anim-ready .sj-video-frame > img { transform: scale(1.18); }
.sj-anim-ready .sj-video-deco { opacity: 0; transform: translate(30px, -30px); transition: opacity .8s ease .2s, transform .9s cubic-bezier(.2, .8, .2, 1) .2s; }
.sj-anim-ready .sj-video-corner { opacity: 0; }
.sj-anim-ready .sj-video-corner.is-tl { transform: translate(-16px, -16px); }
.sj-anim-ready .sj-video-corner.is-tr { transform: translate(16px, -16px); }
.sj-anim-ready .sj-video-corner.is-bl { transform: translate(-16px, 16px); }
.sj-anim-ready .sj-video-corner.is-br { transform: translate(16px, 16px); }
.sj-anim-ready .sj-video-rec { opacity: 0; transform: translateY(-10px); }
.sj-anim-ready .sj-video-play { transform: scale(0); }
.sj-anim-ready .sj-video-bar { opacity: 0; transform: translateY(20px); }
.sj-anim-ready .sj-video-progress span { width: 0; }
.sj-anim-ready .sj-video-body > * { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }

.sj-video.is-built .sj-video-frame { clip-path: inset(0 0 0 0 round 24px); }
.sj-video.is-built .sj-video-frame > img { transform: none; }
.sj-video.is-built .sj-video-frame:hover > img { transform: scale(1.04); }
.sj-video.is-built .sj-video-deco { opacity: .16; transform: none; }
.sj-video.is-built .sj-video-corner { opacity: 1; transform: none; transition-delay: .65s; }
.sj-video.is-built .sj-video-rec { opacity: 1; transform: none; transition-delay: .8s; }
.sj-video.is-built .sj-video-play { transform: scale(1); transition: transform .6s cubic-bezier(.34, 1.56, .64, 1) .9s, background .3s ease, color .3s ease, opacity .5s ease; }
.sj-video.is-built .sj-video-play:hover { transform: scale(1.08); transition-delay: 0s; }
.sj-video.is-built .sj-video-bar { opacity: 1; transform: none; transition-delay: 1s; }
.sj-video.is-built .sj-video-progress span { width: 34%; }
.sj-video.is-built .sj-video-body > * { opacity: 1; transform: none; }
.sj-video.is-built .sj-video-body > :nth-child(2) { transition-delay: .1s; }
.sj-video.is-built .sj-video-body > :nth-child(3) { transition-delay: .2s; }
.sj-video.is-built .sj-video-body > :nth-child(4) { transition-delay: .3s; }

@media (max-width: 991.98px) {
    .sj-video { padding: 4.5rem 0; }
    .sj-video-row { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .sj-video-media { order: -1; max-width: 640px; width: 100%; margin: 0 auto; }
    .sj-video-title { font-size: 2rem; }
}
@media (max-width: 575.98px) {
    .sj-video { padding: 3.5rem 0; }
    .sj-video-media { padding: 10px; }
    .sj-video-media::after { display: none; }
    .sj-video-frame { border-radius: 18px; }
    .sj-video-play { width: 70px; height: 70px; margin: -35px 0 0 -35px; font-size: 20px; }
    .sj-video-corner { width: 22px; height: 22px; }
    .sj-video-corner.is-tl, .sj-video-corner.is-tr { top: 14px; }
    .sj-video-corner.is-bl, .sj-video-corner.is-br { bottom: 14px; }
    .sj-video-corner.is-tl, .sj-video-corner.is-bl { left: 14px; }
    .sj-video-corner.is-tr, .sj-video-corner.is-br { right: 14px; }
    .sj-video-rec { top: 18px; left: 46px; }
    .sj-video-bar { left: 46px; right: 46px; bottom: 18px; }
    .sj-video-label { display: none; }
}

/* ---------- Galería ---------- */
.sj-gallery { padding: 5rem 0 4.5rem; background: var(--sj-bg); }

.sj-gallery-head { text-align: center; max-width: 620px; margin: 0 auto 2.75rem; }
.sj-eyebrow {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--sj-accent-text);
    margin-bottom: .7rem;
}
.sj-gallery-head h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--sj-heading);
    margin-bottom: .8rem;
}
.sj-gallery-head p { color: var(--sj-muted); font-size: 15.5px; margin: 0; }

/* Mosaico: filas cuadradas calculadas a partir del ancho del contenedor */
.sj-gallery-frame { container-type: inline-size; }
.sj-gallery-grid {
    --cols: 4;
    --gap: 14px;
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    grid-auto-rows: 230px;
    grid-auto-flow: dense;
    gap: var(--gap);
}
@supports (width: 1cqw) {
    .sj-gallery-grid { grid-auto-rows: calc((100cqw - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
}
.sj-gallery-item.is-big { grid-column: span 2; grid-row: span 2; }
.sj-gallery-item.is-wide { grid-column: span 2; }
.sj-gallery-grid.is-collapsed .is-extra { display: none; }

.sj-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: var(--sj-bg-alt);
    box-shadow: 0 6px 18px -10px rgba(16, 24, 64, .35);
    cursor: zoom-in;
    isolation: isolate;
    transition: box-shadow .35s ease;
}
.sj-gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .4s ease;
}
.sj-gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(7, 12, 48, .62) 0%, rgba(7, 12, 48, .15) 45%, rgba(7, 12, 48, 0) 70%);
    opacity: 0;
    transition: opacity .35s ease;
}
.sj-gallery-zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .95);
    color: var(--sj-primary-deep);
    font-size: 15px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    opacity: 0;
    transform: translateY(8px) scale(.85);
    transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.sj-gallery-item:hover,
.sj-gallery-item:focus-visible { box-shadow: 0 18px 40px -14px rgba(16, 24, 64, .55); }
.sj-gallery-item:hover img,
.sj-gallery-item:focus-visible img { transform: scale(1.07); }
.sj-gallery-item:hover::after,
.sj-gallery-item:focus-visible::after { opacity: 1; }
.sj-gallery-item:hover .sj-gallery-zoom,
.sj-gallery-item:focus-visible .sj-gallery-zoom { opacity: 1; transform: none; }
html[data-theme="dark"] .sj-gallery-item { box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .7); }

/* Aparición escalonada al hacer scroll (solo si hay JS) */
.sj-reveal-ready .sj-gallery-item {
    opacity: 0;
    transform: translateY(18px) scale(.98);
    transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
    transition-delay: calc(var(--i, 0) * 70ms);
}
.sj-reveal-ready .sj-gallery-item.is-visible { opacity: 1; transform: none; }

/* Botón "Ver todas las fotos" */
.sj-gallery-more { text-align: center; margin-top: 2.25rem; }
.sj-gallery-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: .85rem 1.7rem;
    border-radius: 999px;
    border: 1.5px solid var(--sj-border);
    background: var(--sj-surface);
    color: var(--sj-heading);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px -12px rgba(16, 24, 64, .4);
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.sj-gallery-toggle:hover { border-color: var(--sj-primary); color: var(--sj-primary); transform: translateY(-1px); }
.sj-gallery-toggle i { font-size: 12px; transition: transform .3s ease; }
.sj-gallery-toggle .when-expanded,
.sj-gallery-toggle[aria-expanded="true"] .when-collapsed { display: none; }
.sj-gallery-toggle[aria-expanded="true"] .when-expanded { display: inline; }
.sj-gallery-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

@media (max-width: 991.98px) {
    .sj-gallery-grid { --cols: 3; }
}
@media (max-width: 575.98px) {
    .sj-gallery { padding: 3.5rem 0 3rem; }
    .sj-gallery-head h2 { font-size: 2rem; }
    .sj-gallery-grid { --cols: 2; --gap: 10px; }
    .sj-gallery-item { border-radius: 12px; }
    .sj-gallery-zoom { display: none; }
}

/* Visor de fotos (Lightbox) */
.lightboxOverlay { background-color: #060a18; opacity: .94; }
.lb-outerContainer { background: transparent; border-radius: 14px; }
.lightbox .lb-image {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
.lb-dataContainer { padding-top: 6px; }
.lb-data .lb-caption {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
}
.lb-data .lb-number { font-size: 13px; color: rgba(255, 255, 255, .6); padding-top: 4px; }
.lb-nav a.lb-prev, .lb-nav a.lb-next {
    opacity: .55;
    background-size: 44px 40px !important;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5));
}
.lb-nav a.lb-prev { background-position: 18px 50% !important; }
.lb-nav a.lb-next { background-position: calc(100% - 18px) 50% !important; }
.lb-nav a.lb-prev:hover, .lb-nav a.lb-next:hover { opacity: 1; }
.lb-data .lb-close { background-size: 22px 22px !important; opacity: .7; }
.lb-data .lb-close:hover { opacity: 1; }
.lb-loader .lb-cancel { background-size: 32px 32px !important; }

/* ---------- Contacto ---------- */
.contact-box {
    background: var(--sj-surface);
    border: 1px solid var(--sj-border);
    border-radius: var(--sj-radius);
    padding: 1.5rem 1rem;
    box-shadow: var(--sj-shadow);
}
.contact-box a { color: var(--sj-primary); }
.whitebox .widget {
    background: var(--sj-surface);
    border-radius: var(--sj-radius);
}
.whitebox .widget.top60 { background: transparent; box-shadow: none; padding: 0; }
.heading.darkcolor, .heading .font-normal { color: var(--sj-heading); }
#gmap_canvas {
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: var(--sj-radius);
    box-shadow: var(--sj-shadow);
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp img { width: 60px; height: 60px; }

/* ---------- Footer ---------- */
.sj-footer {
    --sj-f-text: rgba(255, 255, 255, .72);
    --sj-f-line: rgba(255, 255, 255, .10);
    position: relative;
    background: linear-gradient(165deg, #0a1640 0%, #0d1f63 60%, #10287a 100%);
    color: var(--sj-f-text);
    padding: 4.5rem 0 0;
    font-size: 15px;
}
.sj-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sj-primary-2), var(--sj-accent));
}
html[data-theme="dark"] .sj-footer { background: #0a0f1a; }

.sj-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.65fr) minmax(0, 1fr) minmax(0, .8fr);
    gap: 2.5rem;
}

.sj-footer p { color: var(--sj-f-text); font-size: 15px; line-height: 1.7; margin: 0; }
.sj-footer a { color: #fff; transition: color .2s ease; }
.sj-footer a:hover { color: var(--sj-accent); }

/* Marca */
.sj-footer-identity { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 1.25rem; }
.sj-footer-identity img { width: 64px; height: 64px; flex-shrink: 0; }
.sj-footer-identity span { display: flex; flex-direction: column; line-height: 1.25; }
.sj-footer-identity strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .01em;
}
.sj-footer-identity small {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--sj-f-text);
    margin-top: 3px;
}
.sj-footer-brand > p { max-width: 280px; }

.sj-footer-social { display: flex; gap: 10px; margin-top: 1.5rem; }
.sj-footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--sj-f-line);
    transition: background-color .2s ease, transform .2s ease, color .2s ease;
}
.sj-footer-social a:hover { background: var(--sj-accent); border-color: var(--sj-accent); color: #fff; transform: translateY(-2px); }

/* Títulos de columna */
.sj-footer h3 {
    position: relative;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 1.5rem;
    padding-bottom: .85rem;
}
.sj-footer h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--sj-accent);
}

.sj-footer ul { list-style: none; padding: 0; margin: 0; }

/* Contacto */
.sj-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: .9rem;
    line-height: 1.55;
}
.sj-footer-contact li:last-child { margin-bottom: 0; }
.sj-footer-contact i {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--sj-accent);
    background: rgba(255, 255, 255, .07);
    margin-top: -3px;
}
.sj-footer-contact span, .sj-footer-contact a { color: var(--sj-f-text); }
.sj-footer-contact a:hover { color: #fff; }

/* Enlaces */
.sj-footer-links li { margin-bottom: .75rem; }
.sj-footer-links li:last-child { margin-bottom: 0; }
.sj-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--sj-f-text);
    transition: color .2s ease, transform .2s ease;
}
.sj-footer-links a::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: .45;
    transition: opacity .2s ease, background-color .2s ease;
}
.sj-footer-links a:hover { color: #fff; transform: translateX(3px); }
.sj-footer-links a:hover::before { opacity: 1; background: var(--sj-accent); }

/* Barra inferior */
.sj-footer-bottom {
    margin-top: 3.5rem;
    border-top: 1px solid var(--sj-f-line);
    background: rgba(0, 0, 0, .15);
}
.sj-footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}
.sj-footer-bottom p { font-size: 13px; color: rgba(255, 255, 255, .6); }
.sj-footer-bottom a { font-weight: 600; }

@media (max-width: 991.98px) {
    .sj-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; }
}
@media (max-width: 575.98px) {
    .sj-footer { padding-top: 3.5rem; }
    .sj-footer-grid { gap: 2.25rem 1.25rem; }
    .sj-footer-brand, .sj-footer-grid > .sj-footer-col:nth-child(2) { grid-column: 1 / -1; }
    .sj-footer-bottom-inner { flex-direction: column; text-align: center; padding-bottom: 96px; }
}

/* ---------- Dark mode: ajustes puntuales de la plantilla ---------- */
html[data-theme="dark"] .overlay-white { background-color: #0e1320; }
html[data-theme="dark"] .new_footer_area { background: var(--sj-bg-alt); }
html[data-theme="dark"] .main-title p,
html[data-theme="dark"] .heading-title > span { color: var(--sj-muted); }
html[data-theme="dark"] .image img { filter: brightness(.92); }
html[data-theme="dark"] .side-menu.gradient-bg {
    background-image: linear-gradient(to right, #111a33 0%, #1a2550 100%);
}
html[data-theme="dark"] .whitebox,
html[data-theme="dark"] section,
html[data-theme="dark"] .padding { color: var(--sj-text); }
html[data-theme="dark"] .bglight .whitebox { background: var(--sj-surface); }
html[data-theme="dark"] .contact-meta .social-icons li a {
    color: var(--sj-text);
    border-color: var(--sj-border);
}
/* logos sobre fondo blanco (medios de pago, Cambridge) */
html[data-theme="dark"] img[src*="mercadopago"],
html[data-theme="dark"] img[src*="bancosanjuan"],
html[data-theme="dark"] img[src*="pluspagos"],
html[data-theme="dark"] img[src*="cambridge"] {
    background: #fff;
    filter: none;
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
