/* Custom Fonts */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

/* Animations */
@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Carousel Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in-down {
    animation: fade-in-down 1s ease-out;
}

.animate-fade-in-up {
    animation: fade-in-up 1s ease-out;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out;
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Header Effects */
.header-scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    animation: fadeIn 0.8s ease-in-out;
}

.carousel-slide.slide-in-right {
    animation: slideInRight 0.8s ease-in-out;
}

.carousel-slide.slide-in-left {
    animation: slideInLeft 0.8s ease-in-out;
}

.carousel-slide.slide-out-left {
    animation: slideOutLeft 0.8s ease-in-out;
}

.carousel-slide.slide-out-right {
    animation: slideOutRight 0.8s ease-in-out;
}

/* Carousel Controls */
.carousel-control {
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.carousel-control:active {
    transform: translateY(-50%) scale(0.95);
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    gap: 0.75rem;
}

.indicator {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Carousel content animation delays */
.carousel-slide.active .animate-fade-in-down {
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

/* Social Media Icons */
.social-icon {
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.social-icon:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-icon::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.social-icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Social icon specific colors - more vibrant */
.social-icon.facebook {
    background: #1877F2;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.whatsapp {
    background: #25D366;
}

.social-icon.messenger {
    background: #0084FF;
}

.social-icon.tiktok {
    background: #000000;
}

.social-icon.telegram {
    background: #0088CC;
}

.social-icon.gmail {
    background: #EA4335;
}

/* Social Media Cards */
.social-card {
    position: relative;
    overflow: hidden;
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.social-card:hover::before {
    left: 100%;
}

.social-card:active {
    transform: scale(0.95) !important;
}

/* Navigation Link Hover Effect */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #d97706;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Service Card Hover Effects */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Brand Card Effects */
.brand-card {
    cursor: pointer;
    filter: grayscale(0%);
    transition: all 0.3s ease;
}

.brand-card:hover {
    filter: grayscale(0%) brightness(1.1);
}

/* Feature Item Animation */
.feature-item {
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

/* Button Effects */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* Gallery Grid */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Event Card Animation */
.event-card {
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.event-card:hover::before {
    left: 100%;
}

/* Form Focus Effects */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Intersection Observer Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: fade-in-down 0.3s ease-out;
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotateZ(45deg) translate(-100%, -100%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: rotateZ(45deg) translate(-100%, -100%);
    }
    100% {
        transform: rotateZ(45deg) translate(100%, 100%);
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .service-card:hover {
        transform: translateY(0);
    }
    
    .gallery-overlay {
        transform: translateY(0);
        background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    }
    
    /* Carousel responsive */
    .carousel-slide h1 {
        font-size: 2.5rem;
    }
    
    .carousel-slide p {
        font-size: 1.125rem;
    }
    
    .carousel-slide img[alt*="Logo"] {
        height: 5rem;
    }
    
    .carousel-control {
        width: 48px;
        height: 48px;
    }
    
    .carousel-control.prev {
        left: 0.5rem;
    }
    
    .carousel-control.next {
        right: 0.5rem;
    }
    
    .carousel-indicators {
        bottom: 5rem;
        gap: 0.5rem;
    }
    
    .indicator {
        width: 0.625rem;
        height: 0.625rem;
    }
    
    /* Ajustar botones flotantes en móvil */
    .floating-btn {
        width: 56px;
        height: 56px;
        right: 1rem;
    }
    
    .whatsapp-btn {
        bottom: 5rem;
    }
    
    .messenger-btn {
        bottom: 9rem;
    }
    
    #scrollToTop {
        right: 1rem;
        bottom: 1rem;
        width: 48px;
        height: 48px;
    }
    
    /* Ocultar tooltips en móvil y mostrar solo al tocar */
    .tooltip-text {
        display: none;
    }
    
    .floating-btn.show-tooltip-mobile .tooltip-text {
        display: block;
        opacity: 1;
    }
}

/* Floating Buttons Styles */
.floating-btn {
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.floating-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.floating-btn:active {
    transform: scale(0.95) !important;
}

/* Pulsing animation for floating buttons */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.floating-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.3;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.whatsapp-btn::before {
    background: #25D366;
}

.messenger-btn::before {
    background: #0084FF;
}

/* Tooltip styles */
.tooltip-text {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #1f2937;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* Stagger animation for floating buttons */
.floating-btn:nth-child(1) {
    animation: float-in 0.5s ease-out 0.2s both;
}

.floating-btn:nth-child(2) {
    animation: float-in 0.5s ease-out 0.4s both;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Print Styles */
@media print {
    header,
    #scrollToTop,
    .floating-btn,
    footer {
        display: none;
    }
}

/* 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 */
*:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}