/* Hero Banner Section */
.hero {
    position: relative;
    background-color: #0b192c;
    background-image: linear-gradient(90deg, rgba(11, 25, 44, 0.72) 35%, rgba(15, 81, 40, 0.42) 100%),
        url('/img/planta.jpg');
    background-position: center, right center;
    background-size: 100% 100%, cover;
    background-repeat: no-repeat;
    color: white;
    padding: 6rem 2rem;
    min-height: 580px;
    display: flex;
    align-items: center;
}

body.announcements-open {
    overflow: hidden;
}

.flyer-wrapper {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(5, 18, 28, 0.72);
    backdrop-filter: blur(6px);
}

.flyer-wrapper.is-hidden {
    display: none;
}

.flyer-sheet {
    position: relative;
    width: min(620px, 100%);
    max-height: min(88vh, 860px);
    overflow-y: auto;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55)),
        url('/img/planta.jpg') center/cover no-repeat;
    color: #f8fafc;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255,255,255,0.15);
}

.flyer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    border: 1px solid rgba(255,255,255,0.25);
}

.flyer-card-main {
    position: relative;
    padding: 1.8rem 1.8rem 1.6rem;
    background:
        linear-gradient(135deg, rgba(16,185,129,0.9), rgba(5,150,105,0.95));
    border-radius: 18px;
    overflow: hidden;
}

.flyer-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.flyer-text h2 {
    margin: 0.3rem 0 0.5rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(0,0,0,0.25);
    letter-spacing: -0.2px;
}

.flyer-text p {
    margin: 0;
    color: #ecfdf5;
    font-size: 0.95rem;
    line-height: 1.6;
    letter-spacing: -0.1px;
}

.flyer-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.flyer-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0b1c2e;
    color: #f8fafc;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.25);
    letter-spacing: -0.1px;
}

.flyer-meta-pill i {
    color: #6ee7b7;
}

.flyer-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    color: #065f46;
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    width: fit-content;
    letter-spacing: -0.1px;
    margin-top: 1.2rem;
}

.flyer-badge-top {
    position: absolute;
    top: 1.2rem;
    left: 1.4rem;
    background: #f97316;
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.flyer-image-col {
    width: 100%;
    height: 260px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0,0,0,0.15);
}

.flyer-image-col img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.flyer-extra {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1.2rem 2.4rem 2rem;
    background: rgba(15,23,42,0.55);
}

.flyer-card-mini {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.flyer-card-mini h4 {
    margin: 0 0 0.4rem;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.flyer-card-mini span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #cbd5e1;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.flyer-cta-mini {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #6ee7b7;
    font-weight: 800;
    font-size: 0.8rem;
    text-decoration: none;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--emerald);
    color: var(--emerald);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
}

.hero h1 span {
    color: #4ade80;
}

.hero p {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--primary-green);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(21, 128, 61, 0.4);
    text-align: center;
}

.btn-primary:hover {
    background-color: var(--dark-green);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    text-align: center;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Quick Stats Bar */
.stats-bar {
    background-color: white;
    margin: -3rem auto 4rem;
    max-width: 1180px;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 10;
    border-bottom: 4px solid var(--primary-green);
    width: calc(100% - 4rem);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: var(--soft-green);
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-navy);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Section Titles */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.section-subtitle {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--primary-navy);
    margin-top: 0.3rem;
}

/* Course Cards Grid */
.courses-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.course-card {
    background-color: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.course-image {
    height: 210px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.08);
}

.testimonio-image {
    height: 210px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.testimonio-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.testimonio-card:hover .testimonio-image img {
    transform: scale(1.08);
}

.testimonio-card:hover .testimonio-image img {
    transform: scale(1.08);
}

.testimonio-card:hover .course-image img {
    transform: scale(1.08);
}

.course-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(11, 25, 44, 0.85);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.course-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.course-meta i {
    color: var(--accent-blue);
    margin-right: 4px;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.course-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.2rem;
    border-top: 1px solid var(--gray-border);
}

.course-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-green);
}

.btn-course {
    background-color: var(--light-blue);
    color: var(--accent-blue);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-course:hover {
    background-color: var(--accent-blue);
    color: white;
}

/* Showcase Banner */
.showcase-banner {
    max-width: 1280px;
    margin: 6rem auto 0;
    padding: 0 2rem;
}

.showcase-wrapper {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    color: white;
}

.showcase-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.showcase-content h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.showcase-content p {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.feature-list i {
    color: var(--emerald);
    font-size: 1.2rem;
}

.showcase-image {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Responsive Index Queries */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .showcase-wrapper {
        grid-template-columns: 1fr;
    }

    .showcase-content {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .flyer-wrapper {
        align-items: flex-start;
        padding: 1rem;
    }

    .flyer-sheet {
        max-height: 94vh;
    }

    .flyer-card-main {
        padding: 2.2rem 1.4rem 1.8rem;
    }

    .flyer-extra {
        padding: 1rem 1.2rem 1.4rem;
        grid-template-columns: 1fr;
    }

    .stats-bar {
        margin-top: -1.5rem;
        padding: 1.5rem;
    }
}

.rating-toast {
    position: static;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    max-width: 100%;
    width: 100%;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .3s ease, transform .3s ease;
    margin-bottom: 0.6rem;
}

.rating-toast.hide {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.rating-toast-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.rating-toast-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rating-toast-text {
    font-size: 0.9rem;
    color: #0f172a;
    font-weight: 600;
}

.rating-toast-stars {
    color: #f59e0b;
    letter-spacing: 0.1em;
    margin-left: 0.3rem;
}

@media (max-width: 480px) {
    .rating-toast {
        top: 1rem;
        right: 1rem;
        padding: 0.9rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .courses-grid {
        padding: 0 1rem;
    }

    .showcase-banner {
        padding: 0 1rem;
    }
}

.testimonio-modal {
    display: none;
    position: fixed;
    z-index: 1200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.72);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.testimonio-modal.is-open {
    display: flex;
}

.testimonio-modal-content {
    position: relative;
    display: inline-block;
    max-width: 90vw;
    max-height: 85vh;
}

.testimonio-modal-content img {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    background: rgba(0, 0, 0, 0.25);
}

.testimonio-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 1210;
    border: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
}

@media (max-width: 480px) {
    .testimonio-modal-content img {
        max-width: 88vw;
        max-height: 75vh;
    }

    .testimonio-modal-close {
        top: -10px;
        right: -10px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}