/* ========================================
   BAR EL CAÑAHUECA - Custom Styles
   Charcoal + Coral Editorial Theme
   ======================================== */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #FF6B6B;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E85555;
}

/* Selection */
::selection {
    background: #FF6B6B;
    color: #121212;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

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

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

.animate-fade-in-delay {
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.3s forwards;
}

.animate-fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.6s forwards;
}

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

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

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; }

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

/* ========================================
   NAVBAR
   ======================================== */

#navbar {
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease, background-color 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    backdrop-filter: blur(20px);
    background-color: rgba(18, 18, 18, 0.9);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B6B;
    transition: width 0.3s ease;
}

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

/* ========================================
   HERO SECTION
   ======================================== */

#inicio {
    position: relative;
}

#inicio::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, #121212, transparent);
    pointer-events: none;
}

/* ========================================
   SECTION HEADERS
   ======================================== */

section h2 {
    position: relative;
    display: inline-block;
}

/* ========================================
   CARDS & ELEMENTS
   ======================================== */

.group:hover .group-hover\:bg-coral-500\/20 {
    background-color: rgba(255, 107, 107, 0.2);
}

/* ========================================
   BUTTONS
   ======================================== */

a {
    text-decoration: none;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .font-serif {
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

:focus-visible {
    outline: 2px solid #FF6B6B;
    outline-offset: 4px;
}

/* 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;
    }
    
    .reveal, .reveal-left, .reveal-right, .reveal-scale, .stagger-children > * {
        opacity: 1;
        transform: none;
    }
}
