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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(60px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-60px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-60px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(60px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===========================
   FLOATING ANIMATIONS
   =========================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* ===========================
   HOVER ANIMATIONS
   =========================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 165, 116, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 165, 116, 0.8);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   PARALLAX EFFECT
   =========================== */

.parallax-bg {
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* ===========================
   ENTRANCE ANIMATIONS
   =========================== */

[data-scroll-animate] {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

[data-scroll-animate]:nth-child(2) {
    animation-delay: 0.1s;
}

[data-scroll-animate]:nth-child(3) {
    animation-delay: 0.2s;
}

[data-scroll-animate]:nth-child(4) {
    animation-delay: 0.3s;
}

[data-scroll-animate]:nth-child(5) {
    animation-delay: 0.4s;
}

[data-scroll-animate]:nth-child(6) {
    animation-delay: 0.5s;
}

/* ===========================
   INTERACTIVE ANIMATIONS
   =========================== */

.btn {
    position: relative;
    overflow: hidden;
}

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

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* ===========================
   NAVIGATION ANIMATIONS
   =========================== */

.hamburger span {
    transition: all 0.3s ease-in-out;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-8px, -8px);
}

/* ===========================
   LOADING ANIMATION
   =========================== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 4px solid rgba(26, 95, 122, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===========================
   FORM ANIMATIONS
   =========================== */

input, textarea, select {
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(26, 95, 122, 0.2);
}

input::placeholder,
textarea::placeholder {
    transition: color 0.3s ease;
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: transparent;
}

/* ===========================
   TRANSITION EFFECTS
   =========================== */

.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

.float {
    animation: float 3s ease-in-out infinite;
}

.bounce {
    animation: bounce 2s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* ===========================
   CARD FLIP ANIMATION
   =========================== */

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
}

/* ===========================
   STAGGERED ANIMATIONS
   =========================== */

.staggered-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.staggered-item:nth-child(1) { animation-delay: 0s; }
.staggered-item:nth-child(2) { animation-delay: 0.1s; }
.staggered-item:nth-child(3) { animation-delay: 0.2s; }
.staggered-item:nth-child(4) { animation-delay: 0.3s; }
.staggered-item:nth-child(5) { animation-delay: 0.4s; }
.staggered-item:nth-child(6) { animation-delay: 0.5s; }

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

.text-shimmer {
    background: linear-gradient(90deg, var(--text-dark) 0%, var(--secondary-color) 50%, var(--text-dark) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2s linear infinite;
}

/* ===========================
   FADE IN ON SCROLL
   =========================== */

.fade-in-section {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
}

/* ===========================
   REVEAL ANIMATIONS
   =========================== */

.reveal {
    position: relative;
    overflow: hidden;
}

.reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    animation: reveal 0.6s ease-out;
    z-index: 1;
}

@keyframes reveal {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
