/* ================================================
   OTHMAN ALSHAHRANI - PROFESSIONAL PHOTOGRAPHER
   Animations Stylesheet
   ================================================ */

/* ==================== KEYFRAMES ==================== */

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Preloader Progress */
@keyframes preloaderProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* WhatsApp Pulse */
@keyframes whatsappPulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 40px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

/* Character Reveal */
@keyframes charReveal {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

/* Spin Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

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

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* Slide In Mask */
@keyframes slideInMask {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

/* Border Animation */
@keyframes borderAnimation {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

/* Particle Float */
@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(10px, -20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(-5px, -40px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translate(-15px, -20px) rotate(270deg);
        opacity: 0.5;
    }
}

/* Line Expand */
@keyframes lineExpand {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Text Reveal */
@keyframes textReveal {
    0% {
        width: 100%;
    }
    100% {
        width: 0;
    }
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Background Gradient Animation */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ==================== ANIMATION CLASSES ==================== */

/* Fade Animations */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease forwards;
}

/* Scale Animation */
.animate-scaleIn {
    animation: scaleIn 0.6s ease forwards;
}

/* Float Animation */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Glow Animation */
.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Bounce Animation */
.animate-bounce {
    animation: bounce 2s ease infinite;
}

/* ==================== HOVER EFFECTS ==================== */

/* Underline Hover Effect */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold-primary), var(--color-gold-secondary));
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Reveal Hover Effect */
.hover-reveal {
    position: relative;
    overflow: hidden;
}

.hover-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.hover-reveal:hover::before {
    left: 100%;
}

/* Lift Hover Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Border Hover Effect */
.hover-border {
    position: relative;
}

.hover-border::before,
.hover-border::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--color-gold-primary);
    transition: width 0.3s ease;
}

.hover-border::before {
    top: 0;
    left: 0;
}

.hover-border::after {
    bottom: 0;
    right: 0;
}

.hover-border:hover::before,
.hover-border:hover::after {
    width: 100%;
}

/* Golden Glow Hover */
.hover-golden-glow {
    transition: box-shadow 0.3s ease;
}

.hover-golden-glow:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

/* ==================== SCROLL ANIMATIONS ==================== */

/* Initial States for Scroll Animations */
[data-aos] {
    pointer-events: auto !important;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Children Animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.animate > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animate > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animate > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animate > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animate > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animate > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.animate > *:nth-child(7) { transition-delay: 0.7s; }
.stagger-children.animate > *:nth-child(8) { transition-delay: 0.8s; }

.stagger-children.animate > * {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== TEXT ANIMATIONS ==================== */

/* Text Split Animation */
.text-split .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.text-split.animate .char {
    opacity: 1;
    transform: translateY(0);
}

/* Typewriter Cursor */
.typed-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: var(--color-gold-primary);
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Gradient Text Animation */
.gradient-text-animated {
    background: linear-gradient(
        90deg,
        var(--color-gold-primary),
        var(--color-gold-secondary),
        var(--color-gold-primary)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* ==================== LOADING STATES ==================== */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-secondary) 25%,
        var(--color-bg-tertiary) 50%,
        var(--color-bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    height: 1em;
    border-radius: 4px;
    margin-bottom: 0.5em;
}

.skeleton-image {
    width: 100%;
    padding-top: 100%;
    border-radius: var(--radius-md);
}

/* ==================== PARTICLE EFFECTS ==================== */

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--color-gold-primary);
    border-radius: var(--radius-full);
    opacity: 0.3;
    animation: particleFloat 8s ease-in-out infinite;
}

.particle:nth-child(odd) {
    width: 4px;
    height: 4px;
    animation-duration: 10s;
    animation-delay: -2s;
}

.particle:nth-child(3n) {
    animation-delay: -4s;
}

/* ==================== IMAGE EFFECTS ==================== */

/* Image Zoom */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* Image Reveal */
.img-reveal {
    position: relative;
    overflow: hidden;
}

.img-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-primary);
    transform: translateX(-100%);
}

.img-reveal.revealed::after {
    animation: slideInMask 1s ease forwards;
}

/* Image Grayscale Hover */
.img-grayscale img {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.img-grayscale:hover img {
    filter: grayscale(0%);
}

/* ==================== BUTTON EFFECTS ==================== */

/* Liquid Button Effect */
.btn-liquid {
    position: relative;
    overflow: hidden;
}

.btn-liquid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-liquid:hover::before {
    width: 300px;
    height: 300px;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
    opacity: 0;
}

.ripple:active::after {
    width: 200%;
    padding-top: 200%;
    opacity: 0;
    transition: width 0.5s ease, padding-top 0.5s ease, opacity 0.5s ease;
}

/* ==================== SPECIAL EFFECTS ==================== */

/* Noise Texture Overlay */
.noise-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* Vignette Effect */
.vignette::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background-clip: padding-box;
    border: 2px solid transparent;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--color-gold-primary), var(--color-gold-secondary), var(--color-gold-primary));
    border-radius: inherit;
    z-index: -1;
}

/* Glassmorphism */
.glass {
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== COUNTER ANIMATION ==================== */

.counter-animate {
    display: inline-block;
}

/* ==================== MEDIA QUERIES FOR ANIMATIONS ==================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
