
@import "tailwindcss";  


/* Estilos personalizados para dropdowns */
.dropdown .dropdown-content {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.dropdown .dropdown-content.show {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Hover behavior removed - dropdowns only work with click */

/* Efecto de hover en el botón - simplificado */
.dropdown button:hover {
    color: #2563eb;
}

/* Mejorar la experiencia del dropdown en desktop */
.dropdown-content {
    min-width: 200px;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Efectos mejorados para enlaces del dropdown */
.dropdown-content a {
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.25rem;
    margin: 0.125rem 0.25rem;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: #1e40af;
    transform: translateX(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dropdown-content a:active {
    background-color: #e2e8f0;
    transform: translateX(2px);
}

/* Indicador visual para el elemento activo */
.dropdown-content a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #3b82f6;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.dropdown-content a:hover::before {
    transform: scaleY(1);
}

/* Separadores entre grupos de opciones */
.dropdown-content .dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}

/* Mejoras específicas para iconos en dropdown */
.dropdown-content a svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dropdown-content a:hover svg {
    transform: scale(1.1);
}

/* Efecto de brillo en hover */
.dropdown-content a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.dropdown-content a:hover::after {
    opacity: 1;
}

/* Mejorar la tipografía del dropdown */
.dropdown-content .font-medium {
    font-weight: 500;
    color: #1f2937;
}

.dropdown-content .text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

/* Efecto de entrada más suave para elementos del dropdown */
.dropdown-content a {
    animation: dropdownItemFadeIn 0.3s ease forwards;
    animation-delay: calc(var(--item-index, 0) * 0.05s);
    opacity: 0;
    transform: translateX(-10px);
}

@keyframes dropdownItemFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mejorar el espaciado y alineación */
.dropdown-content a>div {
    flex: 1;
    min-width: 0;
}

.dropdown-content a>div>div:first-child {
    margin-bottom: 0.125rem;
}

/* Efecto de profundidad mejorado */
.dropdown-content {
    transform-origin: top center;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Efecto de entrada más suave */
.dropdown-content.show {
    animation: dropdownSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animaciones suaves */
* {
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Efectos hover personalizados */
.hover-lift:hover {
    transform: translateY(-2px);
}

/* Estilos para formularios */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition;
}

.form-textarea {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition resize-none;
}

.btn-primary {
    @apply bg-blue-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-blue-700 transition;
}

.btn-secondary {
    @apply bg-gray-200 text-gray-800 px-6 py-3 rounded-lg font-semibold hover:bg-gray-300 transition;
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dropdown .dropdown-content {
        position: static;
        display: block;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: transparent;
        margin-top: 0;
        pointer-events: auto;
    }

    .dropdown .dropdown-content.show {
        display: block;
    }

    /* Mejorar accesibilidad en móviles */
    .dropdown button {
        padding: 0.5rem 1rem;
        min-height: 44px;
        /* Tamaño mínimo para touch */
    }

    .dropdown-content a {
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Mejoras de accesibilidad para dropdowns */
.dropdown button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.375rem;
}

.dropdown-content a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    border-radius: 0.25rem;
}

/* Animación de entrada para dropdown */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown .dropdown-content.show {
    animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animación para la flecha del dropdown */
.dropdown button[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Mejorar la experiencia visual del dropdown */
.dropdown-content {
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dropdown-content a {
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #f3f4f6;
    transform: translateX(2px);
}

/* Indicador visual para elementos activos */
.dropdown-content a:active {
    background-color: #e5e7eb;
    transform: translateX(1px);
}

/* Efecto de profundidad para el dropdown */
@media (min-width: 768px) {
    .dropdown-content {
        transform-origin: top center;
    }

    /* Efecto de entrada más suave */
    .dropdown-content.show {
        animation: dropdownSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mejorar el botón del dropdown */
@media (min-width: 768px) {
    .dropdown button {
        padding: 0.5rem 0.75rem;
        border-radius: 0.375rem;
        transition: all 0.2s ease;
        position: relative;
    }

    .dropdown button:hover {
        background-color: rgba(59, 130, 246, 0.1);
    }

    .dropdown button:focus {
        background-color: rgba(59, 130, 246, 0.15);
    }

    /* Efecto de subrayado en hover */
    .dropdown button::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background-color: #3b82f6;
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .dropdown button:hover::after {
        width: 80%;
    }

    /* Mejorar la flecha del dropdown */
    .dropdown button svg {
        transition: transform 0.2s ease;
    }

    .dropdown button[aria-expanded="true"] svg {
        transform: rotate(180deg);
    }

    .dropdown button:hover svg {
        transform: translateY(1px);
    }

    .dropdown button[aria-expanded="true"]:hover svg {
        transform: rotate(180deg) translateY(-1px);
    }
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
