/* ===================================================
   THE ADHITRI FILMS - animations.css
   Modern hover effects & scroll reveal animations
=================================================== */

/* ===== SCROLL REVEAL ===== */
[data-reveal] {
    opacity: 0;
    transition: opacity .75s cubic-bezier(.4, 0, .2, 1), transform .75s cubic-bezier(.4, 0, .2, 1);
}

[data-reveal="fade-up"] {
    transform: translateY(40px);
}

[data-reveal="fade-down"] {
    transform: translateY(-40px);
}

[data-reveal="fade-left"] {
    transform: translateX(50px);
}

[data-reveal="fade-right"] {
    transform: translateX(-50px);
}

[data-reveal="fade-scale"] {
    transform: scale(.9);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

[data-reveal]:nth-child(2) {
    transition-delay: .1s;
}

[data-reveal]:nth-child(3) {
    transition-delay: .2s;
}

[data-reveal]:nth-child(4) {
    transition-delay: .3s;
}

/* Child elements inside grids */
.gallery-grid .gallery-item,
.blog-grid .blog-card,
.team-grid .team-card,
.stats-grid .stat-card,
.gallery-page-grid .gallery-page-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s cubic-bezier(.4, 0, .2, 1), transform .6s cubic-bezier(.4, 0, .2, 1);
}

.gallery-grid .gallery-item:nth-child(1),
.blog-grid .blog-card:nth-child(1),
.team-grid .team-card:nth-child(1),
.gallery-page-grid .gallery-page-item:nth-child(1),
.stats-grid .stat-card:nth-child(1) {
    transition-delay: 0s;
}

.gallery-grid .gallery-item:nth-child(2),
.blog-grid .blog-card:nth-child(2),
.team-grid .team-card:nth-child(2),
.gallery-page-grid .gallery-page-item:nth-child(2),
.stats-grid .stat-card:nth-child(2) {
    transition-delay: .1s;
}

.gallery-grid .gallery-item:nth-child(3),
.blog-grid .blog-card:nth-child(3),
.team-grid .team-card:nth-child(3),
.gallery-page-grid .gallery-page-item:nth-child(3),
.stats-grid .stat-card:nth-child(3) {
    transition-delay: .15s;
}

.gallery-grid .gallery-item:nth-child(4),
.blog-grid .blog-card:nth-child(4),
.team-grid .team-card:nth-child(4),
.gallery-page-grid .gallery-page-item:nth-child(4),
.stats-grid .stat-card:nth-child(4) {
    transition-delay: .2s;
}

.gallery-grid .gallery-item:nth-child(5),
.gallery-page-grid .gallery-page-item:nth-child(5) {
    transition-delay: .25s;
}

.gallery-grid .gallery-item:nth-child(6),
.gallery-page-grid .gallery-page-item:nth-child(6) {
    transition-delay: .3s;
}

.gallery-grid .gallery-item:nth-child(7),
.gallery-page-grid .gallery-page-item:nth-child(7) {
    transition-delay: .35s;
}

.gallery-grid .gallery-item:nth-child(8),
.gallery-page-grid .gallery-page-item:nth-child(8) {
    transition-delay: .4s;
}

.gallery-grid.in-view .gallery-item,
.blog-grid.in-view .blog-card,
.team-grid.in-view .team-card,
.stats-grid.in-view .stat-card,
.gallery-page-grid.in-view .gallery-page-item {
    opacity: 1;
    transform: translateY(0);
}

/* ===== BUTTON SHIMMER EFFECT ===== */
.btn {
    isolation: isolate;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0) 70%);
    transform: skewX(-15deg);
    transition: none;
    pointer-events: none;
}

.btn-primary:hover::after {
    left: 125%;
    transition: left .6s cubic-bezier(.4, 0, .2, 1);
}

/* ===== GALLERY HOVER ZOOM ===== */
.gallery-card {
    cursor: pointer;
}

.gallery-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, .3), rgba(26, 35, 50, .5));
    opacity: 0;
    transition: opacity .4s ease;
    z-index: 1;
    border-radius: inherit;
}

.gallery-card:hover::before {
    opacity: 1;
}

.gallery-overlay {
    z-index: 2;
}

/* ===== BLOG CARD HOVER ===== */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card {
    position: relative;
}

/* ===== CONTACT CARD HOVER ===== */
.contact-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 0 0 var(--radius-md);
    transform: scaleY(0);
    transition: transform .3s ease;
    transform-origin: top;
}

.contact-card {
    position: relative;
}

.contact-card:hover::before {
    transform: scaleY(1);
}

/* ===== SOCIAL LINK HOVER ===== */
.social-link,
.social-btn {
    transform-style: preserve-3d;
}

.social-link:hover,
.social-btn:hover {
    animation: socialBounce .4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes socialBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    20% {
        transform: translateY(-8px);
    }

    50% {
        transform: translateY(-4px);
    }

    80% {
        transform: translateY(-6px);
    }
}

/* ===== STAT COUNTER ANIMATION ===== */
.stat-number,
.stat-num {
    display: block;
    animation: countUp .6s ease forwards;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== HERO TITLE ANIMATION ===== */
.hero-title {
    animation: heroTitleIn .9s cubic-bezier(.4, 0, .2, 1) .3s both;
}

.hero-subtitle {
    animation: heroTitleIn .9s cubic-bezier(.4, 0, .2, 1) .5s both;
}

.hero-badge {
    animation: heroTitleIn .9s cubic-bezier(.4, 0, .2, 1) .15s both;
}

.hero-actions {
    animation: heroTitleIn .9s cubic-bezier(.4, 0, .2, 1) .65s both;
}

.hero-stats {
    animation: heroTitleIn .9s cubic-bezier(.4, 0, .2, 1) .8s both;
}

@keyframes heroTitleIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FAQ ARROW ROTATION ===== */
.faq-arrow svg {
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

/* ===== SCROLL TOP BUTTON ANIMATION ===== */
.scroll-top:hover svg {
    animation: arrowUp .4s ease infinite alternate;
}

@keyframes arrowUp {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-4px);
    }
}

/* ===== NAV LINK UNDERLINE ===== */
.nav-menu li a::after {
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

/* ===== FOOTER LINK HOVER ===== */
.footer-links a::before {
    content: '→';
    display: inline-block;
    margin-right: .25rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity .3s, transform .3s;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ===== CONTACT FORM INPUT FOCUS ===== */
.form-group input,
.form-group select,
.form-group textarea {
    transition: border-color .3s, box-shadow .3s, transform .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: translateY(-1px);
}

/* ===== TEAM CARD HOVER ===== */
.team-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .4s ease;
}

.team-card {
    position: relative;
}

.team-card:hover::after {
    transform: scaleX(1);
}

/* ===== BRAND LOGO HOVER ===== */
.brand-slide {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    transition: background .3s ease;
}

.brand-slide:hover {
    background: rgba(74, 144, 226, .08);
}

/* ===== FILTER TAB ANIMATION ===== */
.filter-tab.active {
    animation: tabActivate .3s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes tabActivate {
    from {
        transform: scale(.95);
    }

    to {
        transform: scale(1);
    }
}

/* ===== LIGHTBOX ANIMATION ===== */
.lightbox-modal.open .lightbox-content {
    animation: lightboxIn .4s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes lightboxIn {
    from {
        opacity: 0;
        transform: scale(.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== PAGE BANNER TEXT ANIMATION ===== */
.page-banner-content h1 {
    animation: heroTitleIn .8s cubic-bezier(.4, 0, .2, 1) .2s both;
}

.page-banner-content .breadcrumb {
    animation: heroTitleIn .8s cubic-bezier(.4, 0, .2, 1) .4s both;
}

/* ===== MOBILE NAV SLIDE ===== */
.main-nav .nav-menu li {
    opacity: 0;
    transform: translateX(20px);
}

.main-nav.open .nav-menu li {
    opacity: 1;
    transform: translateX(0);
    transition: opacity .35s ease, transform .35s ease;
}

.main-nav.open .nav-menu li:nth-child(1) {
    transition-delay: .1s;
}

.main-nav.open .nav-menu li:nth-child(2) {
    transition-delay: .15s;
}

.main-nav.open .nav-menu li:nth-child(3) {
    transition-delay: .2s;
}

.main-nav.open .nav-menu li:nth-child(4) {
    transition-delay: .25s;
}

.main-nav.open .nav-menu li:nth-child(5) {
    transition-delay: .3s;
}

/* ===== HERO PARTICLES ===== */
@keyframes floatParticle {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.4;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(-120px) rotate(360deg);
        opacity: 0.2;
    }
}

/* ===== SECTION DIVIDER ANIMATION ===== */
.label-line {
    animation: lineGrow .75s cubic-bezier(.4, 0, .2, 1) .3s both;
}

@keyframes lineGrow {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }

    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* ===== FAQ ANSWER SLIDE ===== */
.faq-answer {
    transition: max-height .45s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
    opacity: 0;
}

.faq-item.faq-open .faq-answer {
    opacity: 1;
}

/* ===== BLOG DATE BADGE APPEAR ===== */
.blog-date-badge {
    transition: transform .4s ease, box-shadow .4s ease;
}

.blog-card:hover .blog-date-badge {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 144, 226, .4);
}

/* ===== SCROLL-TOP HOVER ===== */
.scroll-top {
    transition: opacity .4s ease, visibility .4s ease, transform .3s ease, background .3s ease, box-shadow .3s ease;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}