/* ===========================================================
   Todos por Vicente — Estilos personalizados
   Paleta suave: blanco, azul claro, verde esperanza y beige
   =========================================================== */

:root {
    --color-blanco: #ffffff;
    --color-azul-soft: #e8f2fb;
    --color-azul: #5a9bd8;
    --color-azul-oscuro: #3f7cb8;
    --color-verde: #6bbf8a;
    --color-verde-oscuro: #4ea672;
    --color-verde-soft: #e7f6ec;
    --color-beige: #f7f2e9;
    --color-beige-soft: #faf6ef;
    --color-texto: #3a4750;
    --sombra-suave: 0 10px 30px rgba(63, 124, 184, 0.10);
    --sombra-mas: 0 16px 40px rgba(63, 124, 184, 0.16);
}

* { scroll-behavior: smooth; }

body {
    font-family: 'Nunito', system-ui, sans-serif;
    color: var(--color-texto);
    background-color: var(--color-blanco);
}

h1, h2, h3, h4, h5, .brand-logo {
    font-family: 'Poppins', sans-serif;
}

/* ---- Utilidades de color ---- */
.text-hope { color: var(--color-verde-oscuro) !important; }
.text-primary-soft { color: var(--color-azul-oscuro) !important; }
.bg-beige-soft { background-color: var(--color-beige-soft); }
.bg-blue-soft { background-color: var(--color-azul-soft); }
.bg-hope-soft { background-color: var(--color-verde-soft); }
.shadow-soft { box-shadow: var(--sombra-suave) !important; }
.py-6 { padding-top: 4.5rem; padding-bottom: 4.5rem; }

.badge-soft {
    background-color: var(--color-azul-soft);
    color: var(--color-azul-oscuro);
    font-weight: 600;
}

/* ---- Botones ---- */
.btn-hope {
    background-color: var(--color-verde);
    border-color: var(--color-verde);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(107, 191, 138, 0.35);
    transition: all .2s ease;
}
.btn-hope:hover {
    background-color: var(--color-verde-oscuro);
    border-color: var(--color-verde-oscuro);
    color: #fff;
    transform: translateY(-2px);
}
.btn-outline-primary-soft {
    border: 2px solid var(--color-azul);
    color: var(--color-azul-oscuro);
    font-weight: 700;
    background: transparent;
    transition: all .2s ease;
}
.btn-outline-primary-soft:hover {
    background-color: var(--color-azul);
    color: #fff;
}

/* ---- Navbar ---- */
.brand-logo { font-size: 1.35rem; }
.navbar .nav-link { font-weight: 600; color: var(--color-texto); }
.navbar .nav-link:hover { color: var(--color-verde-oscuro); }

/* ---- Hero ---- */
.hero-section {
    background: linear-gradient(180deg, var(--color-azul-soft) 0%, var(--color-blanco) 100%);
    padding: 4rem 0 5rem;
}
.hero-title {
    font-size: 3.25rem;
    line-height: 1.12;
}
.hero-copy {
    font-size: 1.08rem;
    line-height: 1.5;
}
.hero-img { object-fit: cover; }

/* ---- Títulos de sección ---- */
.section-title {
    font-weight: 700;
    margin-bottom: .5rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    border-radius: 4px;
    background-color: var(--color-verde);
    margin: .75rem auto 0;
}

/* ---- Historia ---- */
.lead-story {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-azul-oscuro);
    line-height: 1.6;
}
.story-copy {
    line-height: 1.8;
}

/* ---- Timeline ---- */
.timeline {
    position: relative;
    max-width: 1080px;
    padding: 1rem 0;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-verde-soft);
}
.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1rem;
    padding-left: 68px;
    margin-bottom: 1.75rem;
}
.timeline-content,
.timeline-photo-card {
    transition: transform .25s ease, box-shadow .25s ease;
}
.timeline-content:hover,
.timeline-photo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-mas) !important;
}
.timeline-marker {
    position: absolute;
    left: 11px;
    top: 10px;
    width: 32px;
    height: 32px;
}
.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-verde);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 5px var(--color-verde-soft);
}
.timeline-photo-card {
    min-height: 230px;
}
.timeline-photo-button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: var(--color-azul-soft);
    cursor: zoom-in;
}
.timeline-photo {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 230px;
    max-height: 290px;
    object-fit: cover;
}
.timeline-photo-action {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-azul-oscuro);
    background-color: rgba(255, 255, 255, .92);
    box-shadow: var(--sombra-suave);
    transition: transform .2s ease, color .2s ease, background-color .2s ease;
}
.timeline-photo-button:hover .timeline-photo-action,
.timeline-photo-button:focus-visible .timeline-photo-action {
    color: #fff;
    background-color: var(--color-verde);
    transform: scale(1.08);
}
.timeline-photo-button:focus-visible {
    outline: 3px solid var(--color-azul);
    outline-offset: -3px;
}
.timeline-modal-photo {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background-color: var(--color-azul-soft);
}
.timeline-photo-empty {
    display: none;
}

@media (min-width: 768px) {
    .timeline::before { left: 50%; transform: translateX(-50%); }
    .timeline-item {
        grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
        align-items: center;
        row-gap: 0;
        padding-left: 0;
        margin-bottom: 3rem;
    }
    .timeline-content {
        grid-column: 1;
        text-align: right;
    }
    .timeline-content .badge { align-self: flex-end !important; }
    .timeline-marker {
        position: static;
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        align-self: start;
        margin-top: 12px;
    }
    .timeline-photo-card,
    .timeline-photo-empty {
        grid-column: 3;
        grid-row: 1;
    }
    .timeline-item.timeline-reverse .timeline-content {
        grid-column: 3;
        text-align: left;
    }
    .timeline-item.timeline-reverse .timeline-content .badge {
        align-self: flex-start !important;
    }
    .timeline-item.timeline-reverse .timeline-photo-card,
    .timeline-item.timeline-reverse .timeline-photo-empty {
        grid-column: 1;
    }
    .timeline-photo-empty { display: block; }
}

@media (max-width: 767.98px) {
    .timeline-photo-card,
    .timeline-photo,
    .timeline-photo-button {
        min-height: 210px;
    }
    .timeline-photo { max-height: 250px; }
    .timeline-modal-photo { max-height: 60vh; }
}

/* ---- Galería ---- */
.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.gallery-card { transition: transform .25s ease, box-shadow .25s ease; }
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-mas) !important; }

/* ---- Eventos ---- */
.event-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-verde-soft);
    color: var(--color-verde-oscuro);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.event-card { transition: transform .25s ease, box-shadow .25s ease; }
.event-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-mas) !important; }
.event-results-summary {
    border-radius: 8px;
    background-color: var(--color-verde-soft);
}
.event-result-item {
    border: 1px solid #e7edf1;
    border-radius: 8px;
    background-color: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}
.event-result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-suave);
}
.event-result-position {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-verde-oscuro);
    background-color: var(--color-verde-soft);
}
.event-result-evidence-link {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--color-azul-soft);
}
.event-result-evidence {
    display: block;
    width: 100%;
    height: 145px;
    object-fit: cover;
    transition: transform .25s ease;
}
.event-result-evidence-link > span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-azul-oscuro);
    background-color: rgba(255, 255, 255, .92);
    box-shadow: var(--sombra-suave);
}
.event-result-evidence-link:hover .event-result-evidence { transform: scale(1.03); }
.event-result-evidence-link:focus-visible {
    outline: 3px solid var(--color-azul);
    outline-offset: 3px;
}

@media (max-width: 575.98px) {
    .event-result-evidence { height: 190px; }
    .event-result-position {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
}

/* ---- Datos bancarios ---- */
.bank-data li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .25rem;
    border-bottom: 1px dashed #e3e3e3;
}
.bank-data li:last-child { border-bottom: none; }
.bank-data span { color: #8a949c; }

/* ---- Footer ---- */
.footer-section {
    background-color: var(--color-beige);
    border-top: 4px solid var(--color-verde-soft);
}
.footer-social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-azul-oscuro);
    background-color: #fff;
    box-shadow: var(--sombra-suave);
    text-decoration: none;
    transition: transform .2s ease, color .2s ease, background-color .2s ease;
}
.footer-social a:hover {
    color: #fff;
    background-color: var(--color-verde);
    transform: translateY(-3px);
}

/* ---- WhatsApp flotante ---- */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: #25d366;
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
    z-index: 1050;
    transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* ===========================================================
   PANEL ADMINISTRADOR
   =========================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-beige-soft);
}
.admin-sidebar {
    width: 260px;
    background-color: #fff;
    box-shadow: 2px 0 20px rgba(63, 124, 184, 0.06);
}
@media (min-width: 992px) {
    .admin-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        visibility: visible !important;
        transform: none !important;
    }
}
.admin-content { flex: 1; min-width: 0; }

.sidebar-brand { font-family: 'Poppins', sans-serif; font-size: 1.15rem; border-bottom: 1px solid #f0f0f0; }
.sidebar-nav { display: flex; flex-direction: column; gap: .35rem; padding-top: 1rem; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 12px;
    color: var(--color-texto);
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}
.sidebar-link i { font-size: 1.1rem; }
.sidebar-link:hover { background-color: var(--color-azul-soft); color: var(--color-azul-oscuro); }
.sidebar-link.active { background-color: var(--color-verde); color: #fff; }

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-azul-soft);
    color: var(--color-azul-oscuro);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tarjetas resumen */
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-num { font-size: 1.5rem; font-weight: 800; font-family: 'Poppins', sans-serif; line-height: 1; }

/* Botones grandes de acción */
.action-card { transition: transform .25s ease, box-shadow .25s ease; }
.action-card:hover { transform: translateY(-5px); box-shadow: var(--sombra-mas) !important; }
.action-icon {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto;
}

/* Tabla */
.admin-table thead th {
    background-color: var(--color-beige-soft);
    color: #8a949c;
    font-weight: 700;
    border: none;
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .03em;
}
.admin-table td { border-color: #f0f0f0; }

/* Ganadores de eventos */
.winner-form-panel {
    background-color: var(--color-verde-soft);
    border: 1px solid rgba(78, 166, 114, .18);
    border-radius: 8px;
}
.winner-admin-item,
.winner-trash-item,
.winner-empty-state {
    border: 1px solid #e7edf1;
    border-radius: 8px;
    background-color: #fff;
}
.winner-admin-item {
    transition: transform .2s ease, box-shadow .2s ease;
}
.winner-admin-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-suave);
}
.winner-trash-item { background-color: var(--color-beige-soft); }
.winner-empty-state { border-style: dashed; }
.winner-evidence-thumb,
.winner-evidence-empty {
    width: 72px;
    height: 60px;
    border-radius: 8px;
    flex: 0 0 72px;
}
.winner-evidence-thumb {
    display: block;
    object-fit: cover;
}
.winner-evidence-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-azul-oscuro);
    background-color: var(--color-azul-soft);
    font-size: 1.35rem;
}
.winner-actions .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.winner-edit-form { border-top: 1px solid #e7edf1; }

@media (min-width: 992px) {
    .winner-form-panel {
        position: sticky;
        top: 0;
    }
}

/* Formularios */
.form-control, .form-select { border-color: #e3e9ee; padding: .6rem .9rem; }
.form-control:focus, .form-select:focus {
    border-color: var(--color-verde);
    box-shadow: 0 0 0 .2rem rgba(107, 191, 138, 0.2);
}
.form-label { font-weight: 600; font-size: .9rem; }

/* ===========================================================
   FASE 1 Y 2 - Refuerzo visual de paginas publicas
   =========================================================== */
.page-section { min-height: calc(100vh - 88px - 205px); }
.content-band { padding: 4rem 0; }
.navbar .nav-link.active { color: var(--color-verde-oscuro); font-weight: 800; }

.hero-section { padding: 2rem 0 4rem; }
.hero-visual {
    min-height: 360px;
    background:
        radial-gradient(circle at top left, rgba(107, 191, 138, .18), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f6fbff 100%);
    border: 1px solid rgba(90, 155, 216, .16);
}
.hero-visual-icon {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background-color: var(--color-verde-soft);
    color: var(--color-verde-oscuro);
    font-size: 2.2rem;
}
.hero-note {
    background-color: rgba(255, 255, 255, .84);
    border: 1px solid rgba(90, 155, 216, .14);
}
.hero-photo-card {
    position: relative;
    min-height: 460px;
    background:
        radial-gradient(circle at top left, rgba(107, 191, 138, .18), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f6fbff 100%);
    border: 1px solid rgba(90, 155, 216, .16);
}
.hero-photo {
    width: 100%;
    height: 460px;
    display: block;
    object-fit: cover;
}
.hero-photo-fallback {
    min-height: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    color: var(--color-azul-oscuro);
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}
.hero-photo-fallback i {
    font-size: 3rem;
    color: var(--color-verde-oscuro);
}
.mini-stat,
.support-card,
.info-card,
.purpose-card {
    background-color: #fff;
    border: 1px solid rgba(90, 155, 216, .12);
    border-radius: 8px;
    box-shadow: var(--sombra-suave);
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.support-card:hover,
.info-card:hover,
.purpose-card:hover,
.mini-stat:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra-mas);
    border-color: rgba(107, 191, 138, .28);
}
.mini-stat { padding: 1rem; }
.mini-stat strong {
    display: block;
    color: var(--color-azul-oscuro);
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
}
.support-icon,
.info-icon,
.purpose-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-verde-soft);
    color: var(--color-verde-oscuro);
    font-size: 1.4rem;
    flex-shrink: 0;
}
.page-intro {
    max-width: 760px;
    margin: 0 auto;
}
.soft-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 191, 138, .5), transparent);
}
.story-highlight {
    background-color: #fff;
    border-left: 5px solid var(--color-verde);
    transition: transform .25s ease, box-shadow .25s ease;
}
.story-highlight:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-mas) !important;
}
.gallery-placeholder {
    min-height: 220px;
    background:
        radial-gradient(circle at top right, rgba(107, 191, 138, .18), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-azul-oscuro);
    font-size: 2.2rem;
    border-bottom: 1px solid rgba(90, 155, 216, .12);
}
.gallery-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-verde-oscuro);
    background-color: var(--color-verde-soft);
    border-radius: 999px;
    padding: .35rem .7rem;
}
.gallery-trigger {
    border: 0;
    cursor: pointer;
    color: inherit;
    transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-trigger:hover,
.gallery-trigger:focus-visible {
    transform: translateY(-6px);
    box-shadow: var(--sombra-mas) !important;
}
.gallery-trigger:hover .gallery-placeholder i,
.gallery-trigger:focus-visible .gallery-placeholder i {
    transform: scale(1.1);
}
.gallery-placeholder i,
.gallery-action i {
    transition: transform .25s ease;
}
.gallery-action {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--color-azul-oscuro);
    font-weight: 800;
}
.gallery-trigger:hover .gallery-action i {
    transform: translateX(4px);
}
.gallery-modal-visual {
    min-height: 320px;
    background:
        radial-gradient(circle at top left, rgba(107, 191, 138, .22), transparent 30%),
        linear-gradient(135deg, var(--color-azul-soft) 0%, #ffffff 100%);
    color: var(--color-azul-oscuro);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}
.gallery-modal-image {
    max-height: 520px;
    object-fit: cover;
}
.modal-content {
    box-shadow: 0 24px 70px rgba(63, 124, 184, .24);
}
.preview-media {
    max-height: 420px;
    object-fit: cover;
    background-color: var(--color-azul-soft);
}
.preview-empty {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(107, 191, 138, .18), transparent 28%),
        linear-gradient(135deg, var(--color-azul-soft) 0%, #ffffff 100%);
    color: var(--color-verde-oscuro);
    font-size: 3rem;
}
.event-summary {
    background-color: var(--color-beige-soft);
    border: 1px solid rgba(107, 191, 138, .18);
    transition: transform .25s ease, box-shadow .25s ease;
}
.event-summary:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-suave);
}
.donation-note {
    background-color: var(--color-azul-soft);
    border: 1px solid rgba(90, 155, 216, .18);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.donation-note:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-mas);
    border-color: rgba(107, 191, 138, .24);
}
.soft-appear {
    animation: softFadeUp .45s ease both;
}

@keyframes softFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .py-6 { padding-top: 3.25rem; padding-bottom: 3.25rem; }
    .content-band { padding: 3rem 0; }
    .hero-section { padding: 2rem 0 3rem; }
    .hero-title { font-size: 2.35rem; }
    .hero-copy { font-size: 1rem; }
    .hero-visual { min-height: auto; }
    .hero-photo,
    .hero-photo-card,
    .hero-photo-fallback { min-height: 340px; height: 340px; }
    .gallery-modal-visual { min-height: 240px; }
    .bank-data li { flex-direction: column; gap: .25rem; }
}
