/* ---------- TARJETA CONTENEDORA ---------- */
.f-gallery-card {
    height: 346px;
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    font-family: system-ui, -apple-system, sans-serif;
}

.section-sub {
    letter-spacing: 0.05em;
    gap: 6px;
}

/* ---------- SLIDER ---------- */
.f-gallery-slider {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.f-gallery-frame {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.f-gallery-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.f-gallery-img.active {
    opacity: 1;
    transform: scale(1);
}

/* ---------- FLECHAS DEL SLIDER ---------- */
.f-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.f-gallery-arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
    color: #111827;
}

.f-prev { left: 8px; }
.f-next { right: 8px; }

/* ---------- DOTS ---------- */
.f-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.f-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #d1d5db;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.f-dot.active {
    width: 24px;
    background: #2d6a4f; /* Tono natural/verde elegante */
}

/* ---------- BOTÓN CTA ---------- */
.f-btn-cta {
    width: 100%;
    margin-top: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #2d6a4f;
    background: transparent;
    color: #2d6a4f;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.f-btn-cta:hover {
    background: #2d6a4f;
    color: #ffffff;
}

/* ---------- POPUP / MODAL ---------- */
.f-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.f-gallery-modal.active {
    display: flex;
    opacity: 1;
}

.f-modal-content {
    width: min(1000px, 90vw);
    max-height: 85vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.f-modal-image {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    object-fit: cover;
}

.f-modal-info {
    padding: 32px;
    color: #f3f4f6;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.f-modal-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #ffffff;
}

.f-modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #d1d5db;
    margin: 0 0 24px 0;
}

.f-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.f-btn-donate,
.f-btn-continue,
.f-btn-next-gallery {
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.f-btn-donate {
    background: #2d6a4f;
    color: #ffffff;
}
.f-btn-donate:hover { background: #40916c; }

.f-btn-continue {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.f-btn-continue:hover { background: rgba(255, 255, 255, 0.2); }

.f-btn-next-gallery {
    background: transparent;
    color: #9ca3af;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}
.f-btn-next-gallery:hover {
    color: #ffffff;
    border-color: #ffffff;
}

/* ---------- CONTROLES DEL MODAL ---------- */
.f-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}
.f-close-modal:hover { background: rgba(255, 255, 255, 0.25); }

.f-modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.f-modal-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}
.f-modal-prev { left: 20px; }
.f-modal-next { right: 20px; }

/* Responsive para el modal */
@media (max-width: 768px) {
    .f-modal-content {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }
    .f-modal-image {
        max-height: 40vh;
    }
    .f-modal-info {
        padding: 24px;
    }
}