/* ============================================================
   GLOBAL ENHANCEMENTS — Tremendous of Rwanda Safaris
   Premium additions: watermark, WhatsApp CTA, footer logo
   ============================================================ */

/* Global watermark image variable */
:root {
    --site-watermark: url("../images/logo2.webp");
}

/* --------------------------------
   HERO LOGO WATERMARK
   Large, softly glowing logo stamp
   in the bottom-right of hero areas.
   -------------------------------- */

.hero-watermark {
    position: relative;
    overflow: hidden;
}

.hero-watermark::after {
    content: "";
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 480px;
    height: 480px;
    background-image: var(--site-watermark);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    filter: brightness(10) drop-shadow(0 0 40px rgba(212, 175, 55, 0.4));
    animation: watermarkFadeIn 1.8s 0.5s ease forwards;
}

@keyframes watermarkFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.85) rotate(-6deg);
    }

    60% {
        opacity: 0.1;
        transform: scale(1.03) rotate(1deg);
    }

    100% {
        opacity: 0.08;
        transform: scale(1) rotate(0deg);
    }
}

/* --------------------------------
   STATS SECTION WATERMARK
   Centred, oversized brand mark
   on the dark stats panel.
   -------------------------------- */

.stats-watermark {
    position: relative;
    overflow: hidden;
}

.stats-watermark::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background-image: var(--site-watermark);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
    filter: brightness(10);
    animation: wmarkBreath 8s ease-in-out infinite;
}

.stats-watermark>* {
    position: relative;
    z-index: 1;
}

@keyframes wmarkBreath {

    0%,
    100% {
        opacity: 0.04;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.07;
        transform: translate(-50%, -50%) scale(1.06);
    }
}

/* --------------------------------
   CTA SECTION WATERMARK
   Bottom-left placement to balance
   the right-aligned hero watermark.
   -------------------------------- */

.cta-watermark {
    position: relative;
    overflow: hidden;
}

.cta-watermark::after {
    content: "";
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 550px;
    height: 550px;
    background-image: var(--site-watermark);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.07;
    pointer-events: none;
    z-index: 1;
    filter: brightness(10) drop-shadow(0 0 30px rgba(212, 175, 55, 0.25));
    animation: wmarkDrift 12s ease-in-out infinite;
}

.cta-watermark>* {
    position: relative;
    z-index: 2;
}

@keyframes wmarkDrift {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(12px, -8px) rotate(2deg);
    }

    66% {
        transform: translate(-8px, 10px) rotate(-1deg);
    }
}

/* --------------------------------
   FOOTER LOGO
   -------------------------------- */

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo-img {
    height: 58px;
    width: auto;
    margin-bottom: 14px;
    display: block;
    /* Gold tint to match the brand palette */
    filter: sepia(1) saturate(3) hue-rotate(5deg) brightness(1.15) opacity(0.9);
    transition:
        filter 0.4s ease,
        transform 0.3s ease;
}

.footer-logo-img:hover {
    filter: sepia(1) saturate(4) hue-rotate(5deg) brightness(1.3);
    transform: scale(1.06);
}

/* --------------------------------
   WHATSAPP FLOATING BUTTON
   Premium, animated, glassmorphism
   pill with label + icon.
   -------------------------------- */

.whatsapp-float {
    position: fixed;
    bottom: 36px;
    right: 36px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    cursor: pointer;

    /* Pill container */
    background: linear-gradient(135deg, #1ebe5d 0%, #128c7e 100%);
    border-radius: 60px;
    padding: 0;
    box-shadow:
        0 8px 32px rgba(37, 211, 102, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease,
        padding 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Start slightly off-screen; animate in */
    animation: waSlideIn 0.8s 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes waSlideIn {
    from {
        transform: translateX(120px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Icon circle inside the pill */
.whatsapp-float .wa-btn {
    width: 56px;
    height: 56px;
    background: rgba(37, 211, 102, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    margin: 4px;
    transition: background 0.3s ease;
}

.whatsapp-float .wa-btn svg {
    width: 30px;
    height: 30px;
    fill: #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

/* Pulsing ring */
.whatsapp-float .wa-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.6);
    z-index: -1;
    animation: waRing 2.6s ease-out infinite;
}

@keyframes waRing {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    70% {
        transform: scale(2);
        opacity: 0;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Text label */
.whatsapp-float .wa-label {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    padding-left: 12px;

    /* Hide label initially, show on hover */
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition:
        max-width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease 0.1s,
        padding 0.4s ease;
}

.whatsapp-float:hover .wa-label {
    max-width: 150px;
    /* Adjust based on label width */
    opacity: 1;
    padding-left: 6px;
}

/* Gold notification dot */
.whatsapp-float .wa-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 13px;
    height: 13px;
    background: #d4af37;
    border: 2.5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.6);
    animation: waDot 2s ease infinite;
}

@keyframes waDot {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(212, 175, 55, 0.6);
    }

    50% {
        transform: scale(1.35);
        box-shadow: 0 4px 16px rgba(212, 175, 55, 0.9);
    }
}

/* --------------------------------
   BACK-TO-TOP BUTTON
   Small gold arrow fixed above the
   WhatsApp button.
   -------------------------------- */

.back-to-top {
    position: fixed;
    bottom: 110px;
    right: 44px;
    z-index: 9998;
    width: 44px;
    height: 44px;
    background: rgba(212, 175, 55, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease,
        box-shadow 0.3s ease;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.back-to-top:hover {
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.65);
    transform: translateY(-3px);
    background: #d4af37;
}

.back-to-top svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --------------------------------
   RESPONSIVE
   -------------------------------- */

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 24px;
        right: 20px;
        padding: 0 14px 0 0;
    }

    .whatsapp-float .wa-btn {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float .wa-btn svg {
        width: 26px;
        height: 26px;
    }

    .whatsapp-float .wa-label {
        font-size: 12px;
    }

    .back-to-top {
        bottom: 94px;
        right: 26px;
        width: 38px;
        height: 38px;
    }

    .hero-watermark::after {
        width: 280px;
        height: 280px;
        bottom: -40px;
        right: -40px;
    }

    .stats-watermark::before {
        width: 400px;
        height: 400px;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-logo-img {
        height: 50px;
    }
}

@media (max-width: 480px) {

    /* On very small screens only show the icon, hide the label */
    .whatsapp-float {
        padding: 0;
        border-radius: 50%;
    }

    .whatsapp-float .wa-label {
        display: none;
    }

    .whatsapp-float .wa-btn {
        margin: 0;
        border-radius: 50%;
        background: transparent;
    }

    /* Re-apply full green bg on mobile-only circle */
    .whatsapp-float {
        width: 58px;
        height: 58px;
        padding: 0;
        border-radius: 50%;
    }
}

/* --------------------------------
   PAGE-SPECIFIC WATERMARK SIZING
   Increase watermark where pages have large hero areas
   and reduce where space is limited.
   -------------------------------- */

/* Default sizes already set above; override per page class */
body.experiences-page .hero-watermark::after,
body.experiences-page .stats-watermark::before {
    width: 820px;
    height: 820px;
    right: -140px;
    bottom: -140px;
    opacity: 0.10;
}

body.blog-page .hero-watermark::after,
body.blog-page .stats-watermark::before {
    width: 380px;
    height: 380px;
    right: -40px;
    bottom: -40px;
    opacity: 0.05;
}

body.itineraries-page .hero-watermark::after,
body.itineraries-page .stats-watermark::before {
    width: 520px;
    height: 520px;
    right: -80px;
    bottom: -80px;
    opacity: 0.07;
}

body.contact-page .cta-watermark::after,
body.contact-page .stats-watermark::before {
    width: 320px;
    height: 320px;
    left: -40px;
    bottom: -40px;
    opacity: 0.06;
}

/* Responsive adjustments so the watermark never overwhelms content */
@media (max-width: 1024px) {
    body.experiences-page .hero-watermark::after {
        width: 620px;
        height: 620px;
        right: -80px;
        bottom: -80px;
    }

    body.itineraries-page .hero-watermark::after {
        width: 420px;
        height: 420px;
        right: -40px;
        bottom: -40px;
    }
}

@media (max-width: 480px) {

    body.experiences-page .hero-watermark::after,
    body.blog-page .hero-watermark::after,
    body.itineraries-page .hero-watermark::after,
    body.contact-page .cta-watermark::after {
        width: 220px;
        height: 220px;
        right: -20px;
        bottom: -20px;
        opacity: 0.04;
    }
}