/* ===== CUSTOM PROPERTIES ===== */
:root {
    --primary-color: #D4C5A0;     /* Amarillo beige elegante */
    --primary-light: #F5EDDC;     /* Beige claro */
    --secondary-color: #1F2937;   /* Gris carbón */
    --accent-color: #047857;      /* Verde esmeralda */
    --text-dark: #111827;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
}

/* ===== HEADER STYLES ===== */
#header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#header.scrolled {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

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

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

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

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
}

.hero-bg img {
    filter: brightness(1.0);
}

/* Parallax effect for hero */
.hero-bg {
    transform: translateZ(0);
    will-change: transform;
}

/* ===== STAT CARDS ===== */
.stat-card {
    transition: all 0.3s ease;
    animation: scaleIn 0.6s ease-out;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15) !important;
}

/* ===== SERVICE CARDS ===== */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ===== SEDE CARDS ===== */
.sede-card {
    transition: all 0.4s ease;
}

.sede-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
}

/* ===== GALLERY ===== */
.gallery-item {
    overflow: hidden;
    transition: all 0.3s ease;
    display: block !important;
    visibility: visible !important;
}

.gallery-item img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Force gallery containers to be visible */
#galeria-canelo,
#galeria-vizcachas {
    opacity: 1 !important;
    transform: translateY(0) !important;
    display: block !important;
    visibility: visible !important;
}

#galeria-canelo .grid,
#galeria-vizcachas .grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
    transition: all 0.3s ease;
    animation: slideInRight 0.6s ease-out;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.whatsapp-float {
    animation: pulse 2s infinite;
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.5);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 8px 40px rgba(34, 197, 94, 0.8);
    }
}

/* ===== FORM STYLES ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

select option {
    background: var(--secondary-color);
    color: white;
}

/* ===== BUTTON EFFECTS ===== */
button,
a {
    position: relative;
    overflow: hidden;
}

button::before,
.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;
}

button:hover::before,
.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 500px;
}

/* ===== LOADING STATE ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* ===== HOVER EFFECTS FOR LINKS ===== */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* ===== SCROLL BAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

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

/* ===== IMAGE OPTIMIZATION ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    header,
    footer,
    .whatsapp-float,
    #mobile-menu-btn {
        display: none !important;
    }
}

/* ===== DARK MODE SUPPORT (Future enhancement) ===== */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

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

/* ===== CUSTOM GRADIENT BACKGROUNDS ===== */
.gradient-bg-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ===== GLASS MORPHISM EFFECT ===== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== SHADOW UTILITIES ===== */
.shadow-elegant {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.shadow-elegant-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-elegant-hover:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ===== TEXT GRADIENT ===== */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* ===== CUSTOM CURSOR (Optional enhancement) ===== */
@media (pointer: fine) {
    a, button {
        cursor: pointer;
    }
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== SUCCESS/ERROR MESSAGES ===== */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* ===== TOOLTIP (Optional) ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
}