/* ========================================
   La Llave de Oro — Cerrajería Nerja
   Custom Styles
======================================== */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(181, 90, 48, 0.15);
    color: #592618;
}

/* ========================================
   Navigation
======================================== */
#navbar {
    background: rgba(253, 249, 246, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all duration-500;
}

#navbar.scrolled {
    border-bottom-color: rgba(212, 192, 168, 0.3);
    box-shadow: 0 1px 0 rgba(212, 192, 168, 0.2);
}

/* ========================================
   Hero Animations
======================================== */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-desc {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-cta {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-info {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

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

/* Floating Card */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

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

/* Scroll Line */
.scroll-line-fill {
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
    }
    50% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* ========================================
   Section Labels (Intersection Observer)
======================================== */
.section-label,
.about-label,
.area-label,
.contact-label {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-title,
.about-title,
.area-title,
.contact-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.about-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.about-values {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.area-locations {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.contact-info {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

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

/* Stagger delays */
.revealed-delay-1 { transition-delay: 0.1s; }
.revealed-delay-2 { transition-delay: 0.2s; }
.revealed-delay-3 { transition-delay: 0.3s; }
.revealed-delay-4 { transition-delay: 0.4s; }
.revealed-delay-5 { transition-delay: 0.5s; }

/* ========================================
   Service Cards
======================================== */
.service-card {
    transition: all 0.5s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

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

#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.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu Button */
#menu-btn .menu-line {
    transition: all 0.3s ease;
}

#menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ========================================
   Image Hover Effects
======================================== */
.overflow-hidden img {
    transition: transform 0.8s ease;
}

.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* ========================================
   Form Focus States
======================================== */
input:focus,
textarea:focus {
    border-bottom-color: #B55A30 !important;
}

input:focus + label,
textarea:focus + label {
    color: #B55A30;
}

/* ========================================
   Button Ripple / Hover
======================================== */
button, 
a[href^="tel"],
a[href^="mailto"] {
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   Responsive Adjustments
======================================== */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
    }
    
    .service-card {
        padding: 2rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* ========================================
   Reduced Motion
======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    nav,
    .floating-card,
    .scroll-line,
    footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
