/* Override default template backgrounds to coffee theme */
.top-row {
    background: linear-gradient(135deg, #1a130e, #2a1f18) !important;
}

.nav-scrollable {
    background: linear-gradient(180deg, rgba(26,19,14,0.98), rgba(15,11,8,0.98)) !important;
}

/* Estilos globales para efectos visuales */

/* Canvas de partículas de fondo */
.particles-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* Tema café y negro — navegación elegante */
.navbar-elegant {
    background: linear-gradient(135deg, #1a130e, #2a1f18); /* espresso oscuro */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

.brand-elegant {
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #f5ebe1 !important; /* crema */
}

.elegant-nav {
    background: linear-gradient(180deg, rgba(26,19,14,0.98), rgba(15,11,8,0.98)); /* café a negro */
    border-right: 1px solid rgba(255,255,255,0.06);
}

.elegant-link {
    color: #ded2c7 !important; /* latte suave */
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    padding: 0.5rem 0.75rem;
}

.elegant-link:hover {
    color: #ffffff !important;
    background: rgba(166, 112, 63, 0.25); /* tostado */
    transform: translateX(3px);
}

.elegant-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(166,112,63,0.35), rgba(54,36,26,0.35));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

/* Fondo de páginas claro para contraste con menú oscuro */
body {
    background-color: #ffffff;
    color: #1f1f1f;
}

/* 1. Carrusel - SIMPLE Y ROBUSTO */
.carousel-wrapper {
    position: relative;
    width: 100%;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    aspect-ratio: 16 / 9;
    background: #121212; /* antes #f0f0f0 */
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
    animation: carouselSlideIn 0.8s ease-out;
}

@keyframes carouselSlideIn {
    0% {
        opacity: 0;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.carousel-image:hover {
    filter: brightness(1.05);
}

/* Carousel Info Overlay */
.carousel-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    pointer-events: none;
}

.carousel-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.carousel-caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-style: italic;
}

/* Controles */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(166, 112, 63, 0.4);
    background: rgba(166, 112, 63, 0.1);
    color: #a6703f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: rgba(166, 112, 63, 0.25);
    border-color: #a6703f;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(166, 112, 63, 0.2);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(166, 112, 63, 0.5);
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-dot:hover {
    border-color: #a6703f;
    background-color: rgba(166, 112, 63, 0.2);
    transform: scale(1.15);
}

.carousel-dot.active {
    background-color: #a6703f;
    border-color: #a6703f;
    box-shadow: 0 0 8px rgba(166, 112, 63, 0.4);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .carousel-nav {
        gap: 1rem;
    }

    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* 2. Lightbox - Elegante y Centrado */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
    animation: lightboxFadeIn 0.3s ease-out;
}

.lightbox-modal {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lightboxZoomIn 0.3s ease-out;
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #a6703f, #8b5a2b);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
    background: linear-gradient(135deg, #c4854a, #a6703f);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(166, 112, 63, 0.4);
}

.lightbox-image-container {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-image {
    max-width: 80vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 1rem;
}

.lightbox-info {
    margin-top: 1.5rem;
    text-align: center;
    max-width: 600px;
    animation: lightboxSlideUp 0.4s ease-out 0.2s both;
}

.lightbox-caption {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lightbox-alt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

/* Animaciones del Lightbox */
@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes lightboxZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes lightboxSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lightbox image swap animations - Solo fade */
.lightbox-image.swap-enter-right,
.lightbox-image.swap-enter-left {
    animation: lightboxFadeSwap 400ms ease-out;
}

@keyframes lightboxFadeSwap {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 3. Image Cards con texto integrado */
.image-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.image-card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.image-card:hover .image-card-img {
    transform: scale(1.05);
}

.image-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-card:hover .image-card-overlay {
    opacity: 1;
}

.image-card-caption {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 0.3rem 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.image-card-alt {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    font-style: italic;
    margin: 0;
}

/* Responsive Image Cards */
@media (max-width: 768px) {
    .image-card-overlay {
        opacity: 1;
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .image-card-caption {
        font-size: 0.85rem;
    }
    
    .image-card-alt {
        font-size: 0.75rem;
    }
}

/* Newspaper columns grid for Home masonry */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 992px) {
    .news-grid { grid-template-columns: repeat(3, 1fr); }
}

.news-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    background: #1a130e; /* espresso oscuro */
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.45); }

.news-card-img { width: 100%; height: 160px; object-fit: cover; display: block; }

.news-card-body { padding: 0.85rem 0.9rem 1rem; }
.news-card-title { color: #f5ebe1; font-weight: 700; font-size: 1rem; line-height: 1.35; margin: 0 0 .35rem 0; }
.news-card-sub { color: #cfc4b9; font-size: .85rem; margin: 0; }

/* Dark overlay title variant (if image has text) */
.news-card.overlay .news-card-body {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.35) 60%, transparent);
}
.news-card.overlay .news-card-title { color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.news-card.overlay .news-card-sub { color: rgba(255,255,255,.85); }

/* 5. Hover effects */
.hover-zoom {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-zoom:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.hover-bright:hover {
    filter: brightness(1.05);
}

/* 6. Loading spinner */
.spinner-ring {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #a6703f;
    animation: spin 0.7s linear infinite;
}

/* 7. Page transition */
.page-transition-enter {
    opacity: 0;
    transform: translateY(10px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* 9. Card flip */
.card-3d {
    perspective: 1200px;
}

.card-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(180deg);
}

.card-3d-front,
.card-3d-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 1rem;
}

.card-3d-back {
    transform: rotateY(180deg);
}

/* 12. Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

/* Dark coffee theme variant */
.glass-panel-dark {
    background: linear-gradient(135deg, rgba(26, 19, 14, 0.92), rgba(42, 31, 24, 0.88));
    border: 1px solid rgba(166, 112, 63, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Coffee themed buttons */
.btn-coffee {
    background: linear-gradient(135deg, #a6703f, #8b5a2b);
    color: #fff;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-coffee:hover {
    background: linear-gradient(135deg, #c4854a, #a6703f);
    color: #fff;
    box-shadow: 0 6px 20px rgba(166, 112, 63, 0.4);
}

.btn-outline-coffee {
    background: transparent;
    color: #f5ebe1;
    border: 2px solid rgba(166, 112, 63, 0.6);
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-outline-coffee:hover {
    background: rgba(166, 112, 63, 0.25);
    color: #fff;
    border-color: #a6703f;
}

/* 16. Masonry grid */
.masonry-grid {
    column-count: 2;
    column-gap: 1rem;
}

@media (min-width: 992px) {
    .masonry-grid {
        column-count: 3;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
}

/* 20. Wave section separator */
.wave-section {
    position: relative;
    overflow: hidden;
}

.wave-section::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 80px;
    background: url("/images/wave-bottom.svg") repeat-x bottom;
    background-size: cover;
    opacity: 0.85;
}

/* Entrance animations - Scroll triggered */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Slower variations */
.animate-on-scroll.slow {
    transition-duration: 1.4s;
}

.animate-on-scroll.fast {
    transition-duration: 0.7s;
}

/* Staggered delays for grouped items */
.animate-on-scroll.delay-1 { transition-delay: 150ms; }
.animate-on-scroll.delay-2 { transition-delay: 300ms; }
.animate-on-scroll.delay-3 { transition-delay: 450ms; }
.animate-on-scroll.delay-4 { transition-delay: 600ms; }
.animate-on-scroll.delay-5 { transition-delay: 750ms; }
.animate-on-scroll.delay-6 { transition-delay: 900ms; }

/* Direction variations */
.animate-on-scroll.in-left {
    transform: translateX(-40px);
}
.animate-on-scroll.in-left.visible {
    transform: translateX(0);
}

.animate-on-scroll.in-right {
    transform: translateX(40px);
}
.animate-on-scroll.in-right.visible {
    transform: translateX(0);
}

.animate-on-scroll.in-up {
    transform: translateY(40px);
}
.animate-on-scroll.in-up.visible {
    transform: translateY(0);
}

.animate-on-scroll.in-down {
    transform: translateY(-40px);
}
.animate-on-scroll.in-down.visible {
    transform: translateY(0);
}

/* Scale variation */
.animate-on-scroll.scale-in {
    transform: scale(0.9);
}
.animate-on-scroll.scale-in.visible {
    transform: scale(1);
}

/* Fade-only variant for scroll animations */
.animate-on-scroll.fade {
    opacity: 0;
    transform: none;
    transition: opacity 1s ease-out;
}
.animate-on-scroll.fade.visible {
    opacity: 1;
}

/* Legacy support - keep old classes working but redirect to new system */
.animate-in {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeSlideIn 600ms ease-out forwards;
}
.animate-in.slow { animation-duration: 900ms; }
.animate-in.delay-1 { animation-delay: 120ms; }
.animate-in.delay-2 { animation-delay: 240ms; }
.animate-in.delay-3 { animation-delay: 360ms; }

.in-left { transform: translateX(-16px); }
.in-right { transform: translateX(16px); }
.in-up { transform: translateY(16px); }
.in-down { transform: translateY(-16px); }

@keyframes fadeSlideIn {
    0% { opacity: 0; transform: translateY(16px) scale(0.98); }
    60% { opacity: 1; transform: translateY(4px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile tuning */
@media (max-width: 576px) {
    .animate-in { animation-duration: 500ms; }
    .animate-on-scroll {
        transition-duration: 0.8s;
    }
    .animate-on-scroll.slow {
        transition-duration: 1.1s;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    z-index: 9998;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    color: white;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-10px);
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: #1a130e;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #1a130e;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    }
}

/* Contact Page Styles */
.contact-card {
    background: linear-gradient(135deg, rgba(26,19,14,0.95), rgba(15,11,8,0.95)) !important;
    border: 1px solid rgba(166, 112, 63, 0.25) !important;
    color: #f5ebe1;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.feature-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.whatsapp-icon-large {
    display: inline-block;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive WhatsApp Float */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
}

/* Site footer */
.site-footer {
    background: linear-gradient(180deg, #1a130e, #0f0b08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer .footer-link {
    color: #ded2c7;
    text-decoration: none;
}
.site-footer .footer-link:hover { color: #ffffff; }
.site-footer .footer-social {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #ded2c7;
    background: rgba(255,255,255,0.06);
}
.site-footer .footer-social:hover { color: #fff; background: rgba(166,112,63,0.25); }

/* Panel elegante con margen y borde café */
.panel-coffee {
    background: linear-gradient(135deg, rgba(26,19,14,0.96), rgba(15,11,8,0.94));
    border: 1px solid rgba(166,112,63,0.28);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}
.panel-coffee + .panel-coffee { margin-top: 1rem; }

/* Secciones con margen vertical amplio */
.section-gap { margin-top: 2rem; margin-bottom: 2rem; }

/* Tarjeta destacada con borde café y separador */
.feature-coffee {
    background: #1a130e;
    border: 1px solid rgba(166,112,63,0.3);
    border-radius: 16px;
    overflow: hidden;
}
.feature-coffee-header {
    padding: 1rem 1.25rem;
    color: #f5ebe1;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.feature-coffee-body { padding: 1rem 1.25rem; color: #cfc4b9; }

/* Botón elegante café (reemplaza azules) */
.btn-primary { background: linear-gradient(135deg, #a6703f, #8b5a2b); border: none; color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #c4854a, #a6703f); }

/* Margen lateral en grids para respirar */
.container .news-grid, .container .row { margin-left: 0; margin-right: 0; }
