@tailwind base;
@tailwind components;
@tailwind utilities;

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-col 0.3s ease;
}

/* Smooth scroll behavior enhancement */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 0px;
}

/* Hide horizontal scrollbar */
body, html {
    overflow-x: hidden;
}

/* Skip link for keyboard accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #203553;
    color: #ecdbbd;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #ecdbbd;
}

/* Smooth animations for elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Animation utility classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Stagger animations for multiple elements */
.animate-stagger > * {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }
.animate-stagger > *:nth-child(7) { animation-delay: 0.7s; }
.animate-stagger > *:nth-child(8) { animation-delay: 0.8s; }

.glass-nav {
    background: rgba(236, 219, 189, 0.7); /* raffia with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 2px solid #ecdbbd; /* Strong Solid Raffia Border */
}

.glass-nav.menu-open {
    background: rgba(236, 219, 189, 0.95) !important; /* raffia with higher opacity */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.dark .glass-nav {
    background: rgba(32, 53, 83, 0.7); /* cloud-burst con transparencia*/
    border-bottom: 2px solid #203553;
}

.dark .glass-nav.menu-open {
    background: rgba(32, 53, 83, 0.95) !important; /* cloud-burst with higher opacity */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.text-gradient {
    background: linear-gradient(to right, #ecdbbd, #273f56); /* raffia to rhino */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Acrylic Text Style */
.text-glass {
    color: rgba(236, 219, 189, 0.65);
    -webkit-text-stroke: 1px #ecdbbd;
    paint-order: fill stroke;
    text-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-family: 'Poppins', sans-serif !important;
}

/* Acrylic Floating Card */
.glass-card {
    background: rgba(236, 219, 189, 0.5); /* Raffia variation transparent */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid #ecdbbd; /* Strong Solid Raffia Border */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: rgba(236, 219, 189, 0.75); /* Stronger Raffia on hover */
    border-color: #ecdbbd;
}

.swiper-wrapper {
    align-items: stretch;
}

/* Hide Swiper pagination and navigation */
.swiper-pagination {
    display: none !important;
}

.swiper-button-prev,
.swiper-button-next {
    display: none !important;
}

/* FAQ Glass Morphism Styles */
.faq-details {
    background: rgba(236, 219, 189, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid #ecdbbd;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.dark .faq-details {
    background: rgba(39, 63, 86, 0.5);
    border-color: #ecdbbd;
}

.faq-details:hover {
    background: rgba(236, 219, 189, 0.75);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .faq-details:hover {
    background: rgba(39, 63, 86, 0.75);
}

.faq-summary {
    padding: 1rem 1rem;
    color: #203553;
    list-style: none;
    user-select: none;
    transition: all 0.3s ease;
}

.dark .faq-summary {
    color: #ecdbbd;
}

.faq-summary:hover {
    color: #273f56;
}

.dark .faq-summary:hover {
    color: #f9f9f9;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary::before {
    content: '+';
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
}

details[open] .faq-summary::before {
    transform: rotate(45deg);
}

.faq-content {
    padding: 1rem 1rem;
    border-top: 1px solid rgba(236, 219, 189, 0.3);
    color: #4d5d6b;
}

.dark .faq-content {
    border-top-color: rgba(236, 219, 189, 0.2);
    color: #ecdbbd; /* Changed to raffia for better visibility */
}

.dark .faq-content ul li{
    color: #ecdbbd; /* Changed to raffia for better visibility */
}

/* Alternative Glass Card for Low Contrast Backgrounds (e.g. on solid Raffia) */
.glass-card-alt {
    background: rgba(255, 255, 255, 0.4); /* White transparent for contrast */
    border-color: rgba(255, 255, 255, 0.689);
}

.glass-card-alt:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Blue Glass Card (Dark Acrylic) */
.glass-card-blue {
    background: rgba(39, 63, 86, 0.9); /* High opacity Rhino to fix "sick/pale" look */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid #203553; /* Cloud Burst (Stringer/Darker Blue) border */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Glass Buttons */
.glass-btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    cursor: pointer;
}

.glass-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.glass-btn-primary {
    background: rgba(32, 53, 83, 0.75); /* Cloud Burst / Rhino with transparency */
    border: 2px solid #203553; /* Cloud Burst border for consistent acrylic look */
    color: #ecdbbd; /* Raffia text */
}

.glass-btn-primary:hover {
    background: rgba(236, 219, 189, 0.85);
    border: 2px solid #ecdbbd;
    box-shadow: 0 0 20px rgba(32, 53, 83, 0.4);
    color: #203553;
}

.glass-btn-secondary {
    background: rgba(236, 219, 189, 0.65); /* Raffia with opacity matching glass-nav */
    border: 2px solid #ecdbbd; /* Raffia border matching glass-nav */
    color: #203553; /* Cloud Burst text for contrast */
    text-shadow: none;
}

.glass-btn-secondary:hover {
    background: rgba(32, 53, 83, 0.9);
    border: 2px solid #203553;
    box-shadow: 0 0 20px rgba(236, 219, 189, 0.4);
    color: #ecdbbd;
}

.dark .glass-card {
    background: rgba(236, 219, 189, 0.07); /* raffia muy sutil */
    border: 1px solid rgba(236, 219, 189, 0.2); /* Borde un poco más visible */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.dark .glass-card:hover {
    background: rgba(32, 53, 83, 0.8);
    border-color: rgba(236, 219, 189, 0.3);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.dark .glass-card-alt {
    background: rgba(255, 255, 255, 0.05); /* Subtle light tint in dark mode */
}
.dark .glass-card-alt:hover {
    background: rgba(255, 255, 255, 0.1);
}


#inicio {
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Background Image Layer */
#inicio::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url(../img/background-image.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -2;
}

/* Acrylic Effect Overlay */
#inicio::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(123, 123, 123, 0.253);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: -1;
}

/* Dark Mode Acrylic Adjustment */
.dark #inicio::after {
    background: rgba(15, 23, 42, 0.6);
}

/* Social Media Glass Buttons */
.glass-btn-whatsapp {
    background: rgba(22, 163, 74, 0.65); /* Green-600 with opacity */
    border: 2px solid #16a34a; /* Green-600 solid */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-btn-whatsapp:hover {
    background: rgba(22, 163, 74, 0.85);
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.4);
    border-color: #15803d; /* Green-700 */
}

.glass-btn-instagram {
    background: linear-gradient(to right, rgba(168, 85, 247, 0.65), rgba(236, 72, 153, 0.65)); /* Purple to Pink opacity */
    border: 2px solid #ec4899; /* Pink-500 solid */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-btn-instagram:hover {
    background: linear-gradient(to right, rgba(168, 85, 247, 0.85), rgba(236, 72, 153, 0.85));
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
    border-color: #db2777; /* Pink-600 */
}

/* Navbar Link Acrylic Style */
.glass-nav-link {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.1s ease;
    border: 1px solid transparent; /* Prevent layout shift */
    color: var(--color-textlight); /* or define explicitly */
}

.glass-nav-link:hover {
    background: rgba(236, 219, 189, 0.4); /* Raffia transparent */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: #ecdbbd;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .glass-nav-link:hover {
     background: rgba(32, 53, 83, 0.6); /* Cloud burst */
     border-color: rgba(236, 219, 189, 0.3);
}

/* Icon Button Acrylic Style (for Theme Toggle) */
.glass-icon-btn {
    padding: 0.625rem; /* p-2.5 */
    border-radius: 0.5rem; /* rounded-lg */
    transition: all 0.1s ease;
    border: 1px solid transparent;
}

.glass-icon-btn:hover {
    background: rgba(236, 219, 189, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: #ecdbbd;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .glass-icon-btn:hover {
     background: rgba(32, 53, 83, 0.6);
     border-color: rgba(236, 219, 189, 0.3);
}

.swiper-button-next,
.swiper-button-prev {
    color: #203553;
    background-color: rgba(236, 219, 189, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(236, 219, 189, 0.8);
}

.dark .swiper-button-next,
.dark .swiper-button-prev {
    color: #ecdbbd;
    background-color: rgba(32, 53, 83, 0.5);
}

.dark .swiper-button-next:hover,
.dark .swiper-button-prev:hover {
    background-color: rgba(32, 53, 83, 0.8);
}

.swiper-pagination-bullet {
    background-color: #203553;
}

.dark .swiper-pagination-bullet {
    background-color: #ecdbbd;
}

.swiper-pagination-bullet-active {
    background-color: #273f56;
}

.dark .swiper-pagination-bullet-active {
    background-color: #bfb9a9;
}
/* Mobile Menu Styles */
.mobile-menu {
    animation: slideDown 0.3s ease-out;
    z-index: 40;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    border-radius: 0 0 0 1rem;
}

.mobile-menu.hidden {
    animation: slideUp 0.3s ease-out forwards;
    display: none;
}

/* Solid background when menu is open */
.mobile-menu.open {
    background: rgba(236, 219, 189, 0.95) !important; /* raffia with higher opacity */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.dark .mobile-menu.open {
    background: rgba(32, 53, 83, 0.95) !important; /* cloud-burst with higher opacity */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.mobile-menu-link {
    position: relative;
    overflow: hidden;
}

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: #273f56;
    transition: left 0.3s ease;
}

.dark .mobile-menu-link::after {
    background: #ecdbbd;
}

.mobile-menu-link:hover::after {
    left: 0;
}