/* ========================================
   APRODE PERÚ - Footer Styles
   ======================================== */

/* ---- Footer principal ---- */
.footer-main {
    position: relative;
    background: url('../img/footer_index.webp') center center / cover no-repeat fixed;
    color: white;
    overflow: hidden;
}

.footer-main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 70, 0.658);
    z-index: 0;
}

.footer-main .container,
.footer-main .footer-content,
.footer-main .footer-bottom,
.footer-main .footer-logo {
    position: relative;
    z-index: 2;
}

/* ---- Logo ---- */
.footer-logo img {
    width: 300px;
    height: 270px;
    animation: fadeInUp 1.2s ease;
}

.footer-org-name {
    font-weight: 900;
    letter-spacing: 1px;
    margin: 0 10px;
    animation: fadeInUp 1.5s ease;
}

.gold-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, gold, orange);
    margin: 15px auto 0;
    border-radius: 2px;
    animation: fadeInUp 1.8s ease;
}

/* ---- Títulos y listas ---- */
.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.footer-list {
    list-style: none;
    padding: 0;
}

.footer-list li {
    margin-bottom: 0.8rem;
    padding-left: 25px;
    position: relative;
    transition: transform 0.3s ease;
}

.footer-list li:hover { transform: translateX(5px); }

.footer-list li i {
    position: absolute;
    left: 0;
    top: 3px;
    color: gold;
}

.footer-list a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-list a:hover { color: gold; }

/* ========================================
   FLOATING BUTTONS
   ======================================== */
.floating-buttons {
    position: fixed;
    left: 20px;
    top: 75%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.float-btn {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}

.float-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 22px rgba(0,0,0,.32);
}

.whatsapp-btn { background: #25D366; }
.whatsapp-btn i { color: #fff; font-size: 28px; }

.donate-btn { background: linear-gradient(135deg, var(--red), #ff4d4d); }
.news-btn   { background: linear-gradient(135deg, #1e3a5f, #294c75); }
.store-btn  { background: linear-gradient(135deg, var(--gold), var(--orange)); }

.float-img-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.float-img-icon-noticias {
    width: 52px;
    height: 42px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.float-btn:hover .float-img-icon { transform: scale(1.15); }

/* ---- Tooltips ---- */
.float-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    background: #1a1a2e;
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    z-index: 1000;
}

.float-btn::before {
    content: '';
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    border: 6px solid transparent;
    border-right-color: #1a1a2e;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 1000;
}

.float-btn:hover::after,
.float-btn:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ========================================
   POPUP WHATSAPP
   ======================================== */
.joinchat__chatbox {
    display: none;
    position: fixed;
    width: 300px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.22), 0 4px 16px rgba(37,211,102,.12);
    animation: jcPopIn .35s cubic-bezier(.34,1.56,.64,1) both;
    z-index: 1200;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.joinchat__chatbox.active { display: block; }

@keyframes jcPopIn {
    from { opacity: 0; transform: scale(.82) translateY(18px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Cabecera */
.joinchat__header {
    background: #25D366;
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 10px;
}

#joinchat__label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.joinchat__wa-icon { font-size: 22px; }

.joinchat__close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,.15);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background .2s, transform .2s;
}

.joinchat__close:hover {
    background: rgba(0,0,0,.28);
}

.joinchat__close::before,
.joinchat__close::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 12px; height: 2px;
    background: #fff;
    border-radius: 2px;
}

.joinchat__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.joinchat__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Cuerpo */
.joinchat__scroll {
    background-color: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9bfb5' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.joinchat__content {
    padding: 20px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Burbuja */
.joinchat__chat { display: flex; }

.joinchat__bubble {
    background: #fff;
    border-radius: 4px 14px 14px 14px;
    padding: 12px 14px 8px;
    font-size: 14px;
    color: #303030;
    line-height: 1.55;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    max-width: 90%;
    position: relative;
    animation: jcBubbleIn .4s .1s cubic-bezier(.34,1.56,.64,1) both;
}

.joinchat__bubble::before {
    content: '';
    position: absolute;
    top: 0; left: -9px;
    border-width: 0 10px 10px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
}

@keyframes jcBubbleIn {
    from { opacity: 0; transform: translateY(10px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.joinchat__sender {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #25D366;
    margin-bottom: 4px;
}

/* Botón Iniciar Chat */
.joinchat__open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    padding: 12px 22px;
    align-self: flex-end;
    box-shadow: 0 4px 16px rgba(37,211,102,.4);
    transition: transform .2s ease, box-shadow .2s ease, background .2s;
    animation: jcBubbleIn .4s .3s cubic-bezier(.34,1.56,.64,1) both;
}

.joinchat__open:hover {
    background: #20bf5a;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 22px rgba(37,211,102,.5);
    color: #fff;
}

.joinchat__open__text { font-size: 14px; font-weight: 700; }

/* SVG paths alternantes */
.joinchat__open__icon { width: 22px; height: 22px; overflow: visible; }

.joinchat__pa,
.joinchat__pb {
    fill: none;
    stroke: #fff;
    stroke-width: 20;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity .3s ease;
}

.joinchat__pb { opacity: 0; }
.joinchat__chatbox.show-bubble .joinchat__pa { opacity: 0; }
.joinchat__chatbox.show-bubble .joinchat__pb { opacity: 1; }

/* ========================================
   FOOTER BOTTOM
   ======================================== */
.footer-bottom {
    background: rgba(0,0,0,0.3);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.1rem;
    transition: background 0.3s, transform 0.3s;
}

.social-icon:hover {
    background: var(--red);
    color: #fff;
    transform: translateY(-3px);
}

/* ========================================
   SCROLL TO TOP
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1100;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.scroll-top.show { opacity: 1; visibility: visible; }

.scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .floating-buttons {
        left: 10px;
        top: 70%;
        gap: 8px;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .float-btn::after,
    .float-btn::before { display: none; }

    .joinchat__chatbox {
        width: calc(100vw - 80px);
        max-width: 280px;
    }

    .scroll-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        top: 75%
    }
}