/* ===== Custom Styles for ML Gallery and Co ===== */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #080f1d;
}

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

@keyframes pulseSlow {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(1.05);
    }
}

@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 40px;
        opacity: 1;
    }
    100% {
        height: 0;
        opacity: 0;
    }
}

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

.animate-pulse-slow {
    animation: pulseSlow 4s ease-in-out infinite;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ===== Navbar ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #14b8a6, #f59e0b);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-scrolled {
    background: rgba(8, 15, 29, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu ===== */
.mobile-menu-open #mobileMenu {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
    width: 5px;
    margin-left: 0;
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.03), transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* ===== Gallery ===== */
.gallery-item {
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: rgba(245, 158, 11, 0.3);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 8rem;
    line-height: 1;
    color: rgba(20, 184, 166, 0.05);
    pointer-events: none;
}

/* ===== Gold Accent Lines ===== */
.gold-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #080f1d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #14b8a6, #0f766e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2dd4bf, #14b8a6);
}

/* ===== Selection ===== */
::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #fff;
}

/* ===== Focus ===== */
*:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}
