/* =====================================================
   New Cairo Travel — Site-wide Animations
   Scroll reveals, hover motion, top promo marquee.
   Loaded after style.css on every public page.
===================================================== */

/* ---------- 1) Scroll-reveal utility classes ---------- */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal       { transform: translateY(28px); }
.reveal-left  { transform: translateX(-42px); }
.reveal-right { transform: translateX(42px); }

.reveal.in-view,
.reveal-left.in-view,
.reveal-right.in-view {
    opacity: 1;
    transform: translate(0, 0);
}

/* ---------- 2) Hero entrance (plays on every load) ---------- */
.hero-content > * {
    opacity: 0;
    transform: translateY(18px);
    animation: ncFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-content .hero-eyebrow  { animation-delay: 0.05s; }
.hero-content .breadcrumb    { animation-delay: 0.05s; }
.hero-content h1             { animation-delay: 0.2s; }
.hero-content p              { animation-delay: 0.35s; }
.hero-content .hero-cta      { animation-delay: 0.5s; }

.search-widget-wrap {
    opacity: 0;
    animation: ncFadeUpCenter 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.65s;
}

@keyframes ncFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Same fade-up but preserves the element's own horizontal centering
   transform (translateX(-50%)) instead of overwriting it. */
@keyframes ncFadeUpCenter {
    from { opacity: 0; transform: translateX(-50%) translateY(18px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- 3) Top promo marquee ---------- */
.promo-marquee {
    background: linear-gradient(90deg, #0d384d, #14607f);
    color: #ffffff;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    padding: 9px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.promo-marquee .marquee-track {
    display: inline-flex;
    width: max-content;
    animation: ncMarquee 26s linear infinite;
    will-change: transform;
}

.promo-marquee .marquee-track span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 30px;
}

.promo-marquee .marquee-track span i {
    color: #F7B538;
}

.promo-marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes ncMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (max-width: 640px) {
    .promo-marquee { font-size: 11.5px; }
    .promo-marquee .marquee-track span { padding: 0 18px; }
}

/* ---------- 4) Navbar shrink-on-scroll ---------- */
.navbar {
    transition: padding 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}
.navbar-scrolled {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    background-color: rgba(13, 56, 77, 0.65);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ---------- 5) Card & image motion ---------- */
.package-img-container,
.card-img-container {
    overflow: hidden;
}
.package-img-container img,
.card-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.package-card:hover .package-img-container img,
.blog-card:hover .card-img {
    transform: scale(1.09);
}

.testimonial-card,
.trust-item,
.contact-info-item,
.review-badge {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.testimonial-card:hover,
.review-badge:hover {
    transform: translateY(-5px);
}
.trust-item:hover,
.contact-info-item:hover {
    transform: translateX(4px);
}

/* ---------- 6) Buttons: shine sweep ---------- */
.btn-primary,
.btn-outline,
.search-btn,
.form-submit,
.package-cta a {
    position: relative;
    overflow: hidden;
}
.btn-primary::after,
.search-btn::after,
.form-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.65s ease;
    pointer-events: none;
}
.btn-primary:hover::after,
.search-btn:hover::after,
.form-submit:hover::after {
    left: 130%;
}

/* ---------- 7) Logo & social icons ---------- */
.logo-img {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover .logo-img {
    transform: scale(1.08) rotate(-4deg);
}

.social-icons a,
.follow-btn {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, color 0.3s ease;
}
.social-icons a:hover {
    transform: translateY(-4px) scale(1.08);
}

/* ---------- 8) Nav link underline ---------- */
.nav-links > li > a {
    position: relative;
}
.nav-links > li > a:not(.active)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background-color: #F7B538;
    transition: width 0.3s ease;
}
.nav-links > li > a:not(.active):hover::after {
    width: 100%;
}

/* ---------- 9) WhatsApp floating button pulse ---------- */
.whatsapp-float {
    animation: ncPulseFloat 2.6s ease-in-out infinite;
}
.whatsapp-float:hover {
    animation-play-state: paused;
}
@keyframes ncPulseFloat {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    50%      { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* ---------- 10) Form field focus lift ---------- */
.form-group input,
.form-group select,
.form-group textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(247, 181, 56, 0.2);
    transform: translateY(-1px);
}

/* ---------- 11) Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right,
    .hero-content > *,
    .whatsapp-float, .promo-marquee .marquee-track {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .search-widget-wrap {
        animation: none !important;
        opacity: 1 !important;
        transform: translateX(-50%) !important;
    }
}
