/* =================================================
   COMPONENTS — Buttons, Cards, Stats, Team, Donate, Location
   ================================================= */

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border-radius: 999px;
    text-decoration: none;
    transition: .35s;
    font-weight: 600;
}

.btn-primary { background: var(--blue); color: white; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-3px); background: #086491; }

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, .3);
    color: white;
    backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: white; color: black; }

/* ---- Cards ---- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, 340px);
    gap: 28px;
    justify-content: center;
    transition: all .2s;
}

.card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    border: 0.5px solid #e4e4e4;
    transition: transform .3s, box-shadow .4s ease;
    padding: 0;
}

.card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
}

.card-img-wrap { padding: 14px 14px 0 14px; }

.card-img-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center 65%;
    border-radius: 12px;
    display: block;
}

.card-icon-wrap { padding: 14px 14px 0 14px; }

.card-icon {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background: #EBF5FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}

.card-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #d4d4d4, transparent);
    margin: 14px 14px 0 14px;
}

.card-body { padding: 22px 24px 28px; }

.card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--carbon);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body h3::before {
    content: '';
    display: block;
    width: 3px;
    height: 18px;
    border-radius: 2px;
    background: var(--blue);
    flex-shrink: 0;
}

.card-body p { font-size: .93rem; color: #666; line-height: 1.8; margin: 0; }

/* ---- Stat Cards ---- */
.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 36px 20px;
    color: white;
    border-right: 1px solid rgba(255, 255, 255, .15);
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    transition: background .35s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background .35s;
}
.stat-card:hover::before { background: rgba(255, 255, 255, .07); }

/* Borders: remove right on last column, remove bottom on last row */
.stat-card:nth-child(4n)                                            { border-right: none; }
.stat-card:nth-child(5),
.stat-card:nth-child(6),
.stat-card:nth-child(7),
.stat-card:nth-child(8)                                             { border-bottom: none; }

@media (max-width: 1100px) {
    .stat-card:nth-child(4n) { border-right: 1px solid rgba(255, 255, 255, .15); }
    .stat-card:nth-child(2n) { border-right: none; }
    .stat-card:nth-child(7) { border-bottom: 1px solid rgba(255, 255, 255, .15); }
}

.stat-number  { font-size: 2.8rem; font-weight: 800; font-family: 'Jost', sans-serif; line-height: 1; margin-bottom: 10px; letter-spacing: -1px; }
.stat-heart   { font-size: 2.6rem; margin-bottom: 10px; line-height: 1; }
.stat-title   { font-size: .95rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.stat-desc    { font-size: .72rem; line-height: 1.55; opacity: .85; max-width: 150px; }

@media (max-width: 768px) {
    .stat-number { font-size: 2rem; }
    .stat-desc   { display: none; }
}

/* ---- Team ---- */
.member {
    background: white;
    padding: 34px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: .3s;
}
.member:hover { transform: translateY(-8px); }

.avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--blue);
    margin: auto;
    margin-bottom: 22px;
}
.role { margin-top: 12px; color: var(--green); font-weight: 700; }

/* ---- Donate Section ---- */
.donate { background: linear-gradient(135deg, var(--blue), #085882); color: white; text-align: center; }
.donate h2 { font-size: 3rem; margin-bottom: 20px; }
.donate p  { max-width: 700px; margin: auto; line-height: 1.9; margin-bottom: 45px; }

.donation-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 50px; }

.amount {
    background: white;
    color: var(--blue);
    padding: 16px 28px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}
.amount:hover { transform: scale(1.05); }

.mp-box {
    background: white;
    color: var(--carbon);
    max-width: 720px;
    margin: auto;
    padding: 50px;
    border-radius: 26px;
}
.mp-box h3 { color: var(--blue); margin-bottom: 18px; }

/* ---- Location / Donde ---- */
.location-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #E8F7F2;
    color: var(--green);
    font-size: .85rem;
    font-weight: 700;
}





/* =================================================
   SLIDER — Sección Colegios
   Agregar a components.css
   ================================================= */

/* ---- Wrapper general ---- */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

/* ---- Viewport (máscara) ---- */
.slider-viewport {
    overflow: hidden;
    width: calc(340px * 3 + 28px * 2); /* exacto: 3 cards + 2 gaps */
    max-width: 100%;
    cursor: grab;
    margin: 0 auto;
    border-radius: 19px;
}

.slider-viewport:active { cursor: grabbing; }

/* ---- Track (fila de cards) ---- */
.slider-track {
    display: flex;
    gap: 28px;
    will-change: transform;
    /* transition se inyecta por JS */
}

/* ---- Cada card dentro del slider ---- */
.slider-track .card {
    flex: 0 0 340px;
    width: 340px;
}

/* ---- Botones prev / next ---- */
.slider-btn {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .12);
    background: white;
    color: var(--carbon);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background .25s, color .25s, transform .2s;
    z-index: 2;
}

.slider-btn:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
    transform: scale(1.07);
}

.slider-btn:active { transform: scale(.96); }

/* ---- Dots ---- */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: background .3s, transform .3s, width .3s;
}

.slider-dot.active {
    background: var(--blue);
    width: 24px;
    border-radius: 999px;
    transform: none;
}

@media (max-width: 768px) {

    /* ---- Slider ---- */
    .slider-wrapper {
        position: relative;
        gap: 0;
        padding: 0;
        justify-content: center;
    }

    .slider-viewport {
        /* width: 340px; */
        width: min(340px, calc(100vw - 100px)); /* 100px = espacio para los dos botones */

        padding: 0;
        overflow: hidden;
    }

   .slider-track .card {
    flex: 0 0 min(340px, calc(100vw - 100px));
    width: min(340px, calc(100vw - 100px));
}

    .slider-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        z-index: 3;
    }

.slider-btn--prev { left: 0; }
.slider-btn--next { right: 0; }

    /* ---- Cards ---- */
    .card-img-wrap,
    .card-icon-wrap {
        padding: 10px 10px 0 10px;
    }

    .card-img-wrap img,
    .card-icon {
        height: 170px;
    }

    .card-body {
        padding: 16px 16px 20px;
    }

    .card-body h3 {
        font-size: 1rem;
        white-space: normal;
        overflow: visible;
    }

    .card-body p {
        font-size: .88rem;
        white-space: normal;
        overflow: visible;
    }

     .slider-btn:hover {
        transform: translateY(-50%);
    }

    .slider-btn:active {
        transform: translateY(-50%) scale(.96);
    }
}

/* ---- Card Member (variante) ---- */
.card--member .card-img-wrap img{
    object-fit: unset;
}

.card--member .card-members-list {
    list-style: none;
    margin: 0;
    padding: 0 16px 18px;
}

.card--member .card-members-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 0.5px solid #f0f0f0;
    transition: all .3s;
    cursor: pointer;
}

.card--member .card-members-list li:hover{
    background-color: var(--green);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 7px 10px;
}

.card--member .card-members-list li:hover .ml-role{
    /* color: white; */
    color: var(--ivory);
    font-weight: 600;
}


.card--member .card-members-list li:hover .ml-rjm{
    /* color: white; */
    color: var(--ivory);
    font-weight: 600;
}

.card--member .card-members-list li:last-child { border-bottom: none; }

.card--member .ml-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    flex-shrink: 0;
    border: 2px solid #EBF5FF;
}

.card--member .ml-avatar-ph {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #EBF5FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--blue);
    flex-shrink: 0;
}


/* .card--member .card-members-list li:nth-child(odd) .ml-avatar-ph{
    color: var(--green);
    background-color: #4AAE8C38;
} */


.card--member .ml-info { flex: 1; min-width: 0; }

.card--member .ml-role {
    font-size: .67rem;
    color: #999;
    margin: 0;
    line-height: 1.2;
}

.card--member .ml-name {
    font-size: .86rem;
    font-weight: 600;
    color: var(--carbon);
    margin: 0;
    line-height: 1.3;
}

.card--member .ml-rjm {
    font-size: .68rem;
    font-weight: 400;
    color: #bbb;
}













/* 05 - Scroll to top button */
/*------------------------------------------------------------------------------------*/

.scroll-to-top {
    position: fixed;
    bottom: 60px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(16, 146, 210, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #086491;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(16, 123, 210, 0.61);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top::before {
    content: '↑';
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 660px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 49px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}