:root {
    --primary-dark: #1a2a3a;
    --accent-red: #e74c3c;
    --bg-light: #f4f6f8;
    --border-color: #eee;
}

.course-page {
    padding: 40px 20px;
    background: #fff;
}

.hero-course {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    background-size: cover;
    background-position: center 18%;
    background-repeat: no-repeat;
    color: white;
    padding: 60px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    border-left: 10px solid var(--accent-red);
}

.hero-course-combate {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.4)), url('../assets/brigada.jpg');
}

.hero-course h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.tag-corporativo {
    background: var(--accent-red);
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.section-card {
    margin-bottom: 24px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.03);
}

.section-card h2 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 5px;
    width: fit-content;
}

.description-box { line-height: 1.7; color: #444; margin-bottom: 30px; }
.description-box p { margin-bottom: 15px; }

.temario-clase { background: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid var(--border-color); }
.temario-clase ol { padding-left: 20px; }
.temario-clase ol li { margin-bottom: 10px; line-height: 1.6; }
.temario-clase ol li ol { list-style-type: lower-alpha; padding-left: 18px; margin-top: 8px; }

.temario-clase ol li::marker { color: var(--accent-red); font-weight: 700; font-size: 1rem; }
.temario-clase ol li ol li::marker { color: var(--accent-red); font-weight: 700; font-size: 0.95rem; }

.description-box ul { list-style: disc; margin-left: 1.1rem; padding-left: 1.1rem; }
.description-box ul li { margin-bottom: 8px; padding-right: 14px; }
.description-box ul li::marker { color: var(--accent-red); }

.sidebar-info { background: var(--bg-light); padding: 25px; border-radius: 8px; position: sticky; top: 10px; border: 1px solid #e0e0e0; }
.info-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #ddd; font-size: 0.95rem; }
.info-row strong { color: var(--primary-dark); }

.inscription-box { margin-top: 25px; text-align: center; }
.btn-payment { background: #009ee3; color: white; padding: 12px; border-radius: 5px; display: block; margin-top: 10px; font-weight: bold; text-decoration: none; transition: opacity 0.3s; }
.btn-whatsapp { background: #25d366; color: white; padding: 12px; border-radius: 5px; display: block; font-weight: bold; text-decoration: none; }

.eval-box { background: #e3f2fd; padding: 25px; border-radius: 8px; border-left: 6px solid #1976d2; }

.brigade-gallery {
    margin-top: 32px;
    padding: clamp(24px, 4vw, 48px);
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 100% 0, rgba(231, 76, 60, 0.18), transparent 38%),
        linear-gradient(135deg, #172635, #0d1822 72%);
    box-shadow: 0 18px 48px rgba(13, 24, 34, 0.18);
}

.brigade-gallery-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.brigade-gallery-kicker {
    display: block;
    margin-bottom: 10px;
    color: #ff887b;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.brigade-gallery h2 {
    width: auto;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    letter-spacing: -0.035em;
}

.brigade-gallery-intro {
    margin: 0;
    color: #c1cbd3;
    font-size: 0.98rem;
}

.brigade-gallery-controls {
    display: flex;
    flex: 0 0 auto;
}

.brigade-gallery-stage {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 14px;
}

.brigade-gallery-button {
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    align-content: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.brigade-gallery-button svg {
    display: block;
    width: 20px;
    height: 20px;
}

.brigade-gallery-button:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #ff887b;
    background: var(--accent-red);
}

.brigade-gallery-button:focus-visible {
    outline: 3px solid #ff887b;
    outline-offset: 3px;
}

.brigade-gallery-button:disabled {
    cursor: default;
    opacity: 0.35;
}

.brigade-gallery-track {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 4px 4px 14px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    list-style: none;
    transition: height 260ms ease;
}

.brigade-gallery-track::-webkit-scrollbar {
    display: none;
}

.brigade-gallery-slide {
    display: grid;
    flex: 0 0 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: #14212d;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    place-items: center;
    scroll-snap-align: start;
}

.brigade-gallery-slide img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(68vh, 760px);
    height: auto;
    object-fit: contain;
    transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.brigade-gallery-count {
    align-self: center;
    margin-right: 8px;
    color: #fff;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.brigade-gallery-count > span {
    color: #ff887b;
}

.brigade-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 24px;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid #e8e9eb;
    border-radius: 16px;
    background: linear-gradient(115deg, #f7f8fa, #fff 70%);
}

.brigade-cta-copy {
    max-width: 650px;
}

.brigade-cta .brigade-gallery-kicker {
    color: var(--accent-red);
}

.brigade-cta h2 {
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
}

.brigade-cta p {
    margin: 0;
    color: #58616a;
    line-height: 1.65;
}

.brigade-cta-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 10px;
    min-width: 190px;
}

.brigade-cta-primary,
.brigade-cta-secondary {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.brigade-cta-primary {
    background: var(--accent-red);
    color: #fff;
}

.brigade-cta-primary:hover {
    transform: translateY(-2px);
    background: #d83d30;
}

.brigade-cta-secondary {
    border-color: #d5d9dd;
    background: #fff;
    color: var(--primary-dark);
}

.brigade-cta-secondary:hover {
    border-color: var(--primary-dark);
    background: #f4f6f8;
}

.brigade-cta-primary:focus-visible,
.brigade-cta-secondary:focus-visible {
    outline: 3px solid var(--accent-red);
    outline-offset: 3px;
}

@media (max-width: 992px) { .grid-container { grid-template-columns: 1fr; } .sidebar-info { position: static; } .main-content { order: 2; } .sidebar { order: 1; } }

@media (max-width: 700px) {
    .brigade-cta {
        align-items: stretch;
        flex-direction: column;
        gap: 22px;
    }

    .brigade-cta-actions {
        min-width: 0;
    }

    .brigade-gallery {
        padding: 24px 18px 18px;
        border-radius: 14px;
    }

    .brigade-gallery-header {
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 20px;
    }

    .brigade-gallery-controls {
        align-self: flex-start;
    }

    .brigade-gallery-button {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .brigade-gallery-stage {
        position: relative;
        display: block;
    }

    .brigade-gallery-stage .brigade-gallery-button {
        position: absolute;
        z-index: 1;
        top: 50%;
        transform: translateY(-50%);
        border-color: rgba(255, 255, 255, 0.55);
        background: rgba(13, 24, 34, 0.78);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
        backdrop-filter: blur(4px);
    }

    .brigade-gallery-stage .brigade-gallery-button:hover:not(:disabled) {
        transform: translateY(calc(-50% - 2px));
    }

    .brigade-gallery-stage [data-gallery-previous] {
        left: 10px;
    }

    .brigade-gallery-stage [data-gallery-next] {
        right: 10px;
    }

    .brigade-gallery-slide {
        border-radius: 10px;
    }

    .brigade-gallery-slide img {
        max-height: 62vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brigade-gallery-track {
        scroll-behavior: auto;
    }

    .brigade-gallery-button,
    .brigade-cta-primary,
    .brigade-cta-secondary {
        transition: none;
    }
}
