/* 
 * Tema San Patricio - InkaBox Express
 * Efectos irlandeses para marzo
 */

/* Variables CSS para esquemas de colores */
:root {
    --stpatrick-primary: #00A86B; /* Verde irlandés */
    --stpatrick-secondary: #90EE90; /* Verde claro */
    --stpatrick-accent: #FFD700; /* Dorado */
    --stpatrick-dark: #006400; /* Verde oscuro */
}

/* Contenedores de efectos */
.stpatrick-clovers,
.stpatrick-coins,
.stpatrick-sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

/* Tréboles flotantes */
.stpatrick-clover {
    position: absolute;
    top: -20px;
    font-size: 1em;
    pointer-events: none;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
    filter: drop-shadow(0 0 3px rgba(0, 168, 107, 0.3));
}

/* Animaciones de tréboles */
@keyframes cloverFloat {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 20px)) rotate(360deg);
        opacity: 0;
    }
}

@keyframes cloverSway {
    0% {
        transform: translateY(-20px) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) translateX(30px) rotate(90deg);
    }
    50% {
        transform: translateY(50vh) translateX(-20px) rotate(180deg);
    }
    75% {
        transform: translateY(75vh) translateX(15px) rotate(270deg);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 20px)) translateX(0px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes cloverSpin {
    0% {
        transform: translateY(-20px) scale(0.8) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(10vh) scale(1.1) rotate(45deg);
    }
    20% {
        transform: translateY(15vh) scale(0.9) rotate(90deg);
    }
    30% {
        transform: translateY(25vh) scale(1.05) rotate(135deg);
    }
    40% {
        transform: translateY(30vh) scale(0.95) rotate(180deg);
    }
    50% {
        transform: translateY(50vh) scale(1) rotate(225deg);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 20px)) scale(0.8) rotate(360deg);
        opacity: 0;
    }
}

/* Monedas de oro */
.stpatrick-coin {
    position: absolute;
    top: -30px;
    width: 30px;
    height: 30px;
    pointer-events: none;
    animation: coinFall 5s ease-in-out forwards;
    animation-timing-function: ease-in-out;
}

.stpatrick-coin .coin-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #FFD700, #FFA500, #FF8C00);
    border: 2px solid #FFD700;
    border-radius: 50%;
    color: #8B4513;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.6),
                inset 0 1px 3px rgba(255, 255, 255, 0.5),
                inset 0 -1px 3px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@keyframes coinFall {
    0% {
        transform: translateY(-20px) rotateY(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) rotateY(180deg);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 20px)) rotateY(360deg);
        opacity: 0;
    }
}

/* Brillos/Sparkles dorados */
.stpatrick-sparkle {
    position: absolute;
    font-size: 0.8em;
    pointer-events: none;
    animation: sparkleGlow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.8));
}

@keyframes sparkleGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* Efecto de pulso irlandés */
.stpatrick-pulse {
    animation: stpatrickPulse 2s ease-in-out infinite;
}

@keyframes stpatrickPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 168, 107, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 168, 107, 0);
    }
}

/* Modificaciones temáticas cuando está activo */
body.stpatrick-active {
    /* Sin cambios en el body para evitar espacios extra */
}

/* Botones con tema San Patricio */
body.stpatrick-active .btn-primary {
    background: linear-gradient(135deg, var(--stpatrick-primary) 0%, var(--stpatrick-dark) 100%);
    border-color: var(--stpatrick-primary);
    transition: all 0.3s ease;
}

body.stpatrick-active .btn-primary:hover {
    background: linear-gradient(135deg, var(--stpatrick-dark) 0%, var(--stpatrick-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 107, 0.3);
}

/* Enlaces con efecto irlandés */
body.stpatrick-active a {
    transition: color 0.3s ease;
}

body.stpatrick-active a:hover {
    color: var(--stpatrick-primary) !important;
    text-shadow: 0 0 5px rgba(0, 168, 107, 0.3);
}

/* Cards con borde verde */
body.stpatrick-active .card {
    border: 1px solid rgba(0, 168, 107, 0.2);
    transition: all 0.3s ease;
}

body.stpatrick-active .card:hover {
    border-color: var(--stpatrick-primary);
    box-shadow: 0 4px 20px rgba(0, 168, 107, 0.15);
}

/* Hero section con gradiente irlandés */
body.stpatrick-active .hero-section {
    background: linear-gradient(135deg, 
        rgba(0, 168, 107, 0.05) 0%, 
        rgba(144, 238, 144, 0.05) 50%, 
        rgba(255, 215, 0, 0.05) 100%);
}

/* Navbar con toque irlandés */
body.stpatrick-active .navbar {
    border-bottom: 2px solid rgba(0, 168, 107, 0.1);
}

/* Iconos con efecto de brillo */
body.stpatrick-active .fas,
body.stpatrick-active .fab {
    transition: all 0.3s ease;
}

body.stpatrick-active .fas:hover,
body.stpatrick-active .fab:hover {
    color: var(--stpatrick-primary);
    transform: scale(1.1);
}

/* Formularios con borde verde */
body.stpatrick-active .form-control:focus {
    border-color: var(--stpatrick-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 107, 0.25);
}

/* Badges con colores San Patricio */
body.stpatrick-active .badge-primary {
    background-color: var(--stpatrick-primary);
}

body.stpatrick-active .badge-secondary {
    background-color: var(--stpatrick-secondary);
    color: #333;
}

body.stpatrick-active .badge-success {
    background: linear-gradient(135deg, var(--stpatrick-primary) 0%, var(--stpatrick-dark) 100%);
}

/* Alertas con toque irlandés */
body.stpatrick-active .alert-info {
    background-color: rgba(144, 238, 144, 0.1);
    border-color: var(--stpatrick-secondary);
    color: #155724;
}

body.stpatrick-active .alert-success {
    background: linear-gradient(135deg, 
        rgba(0, 168, 107, 0.1) 0%, 
        rgba(144, 238, 144, 0.1) 100%);
    border-color: var(--stpatrick-primary);
    color: #155724;
}

/* Ocultar efectos por defecto */
.stpatrick-effects {
    display: none !important;
}

/* Mostrar cuando está activo */
body.stpatrick-active .stpatrick-effects {
    display: block !important;
}

/* Asegurar que los contenedores no afecten el layout */
.stpatrick-clovers,
.stpatrick-coins,
.stpatrick-sparkles {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 9998 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Animación especial para elementos importantes */
body.stpatrick-active .logo,
body.stpatrick-active .brand {
    animation: stpatrickGlow 3s ease-in-out infinite;
}

@keyframes stpatrickGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0 transparent);
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(0, 168, 107, 0.3));
    }
}

/* Efecto arcoíris sutil en headers */
body.stpatrick-active h1,
body.stpatrick-active h2 {
    background: linear-gradient(90deg, 
        var(--stpatrick-primary) 0%, 
        var(--stpatrick-secondary) 50%, 
        var(--stpatrick-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Botones especiales con efecto dorado */
body.stpatrick-active .btn-success {
    background: linear-gradient(135deg, var(--stpatrick-primary) 0%, var(--stpatrick-accent) 100%);
    border: none;
    color: white;
}

body.stpatrick-active .btn-success:hover {
    background: linear-gradient(135deg, var(--stpatrick-accent) 0%, var(--stpatrick-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stpatrick-clover {
        font-size: 0.8em;
    }
    
    .stpatrick-coin {
        font-size: 0.7em;
    }
    
    .stpatrick-sparkle {
        font-size: 0.6em;
    }
    
    /* Reducir intensidad en móviles */
    body.stpatrick-active .stpatrick-pulse {
        animation-duration: 3s;
    }
}

@media (max-width: 480px) {
    .stpatrick-clover {
        font-size: 0.7em;
    }
    
    .stpatrick-coin {
        font-size: 0.6em;
    }
    
    .stpatrick-sparkle {
        font-size: 0.5em;
    }
}

/* Modo de alto contraste (accesibilidad) */
@media (prefers-reduced-motion: reduce) {
    .stpatrick-clover,
    .stpatrick-coin,
    .stpatrick-sparkle,
    .stpatrick-pulse {
        animation: none !important;
    }
    
    body.stpatrick-active .stpatrick-effects {
        display: none !important;
    }
}

/* Modo oscuro compatibility */
@media (prefers-color-scheme: dark) {
    :root {
        --stpatrick-primary: #00C878;
        --stpatrick-secondary: #98FB98;
        --stpatrick-accent: #FFE55C;
        --stpatrick-dark: #228B22;
    }
    
    .stpatrick-clover {
        filter: drop-shadow(0 0 3px rgba(0, 200, 120, 0.5));
    }
    
    .stpatrick-coin {
        filter: drop-shadow(0 0 3px rgba(255, 229, 92, 0.6));
    }
    
    .stpatrick-sparkle {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.6));
    }
}
