@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

.hero-bg {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #1e40af 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.03"><circle cx="30" cy="30" r="1"/></g></svg>');
    animation: drift 20s linear infinite;
}

@keyframes drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(60px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.slide-in {
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.golden-gradient {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
}

.fire-effect {
    background: linear-gradient(45deg, #dc2626, #ea580c, #f59e0b);
    background-size: 200% 200%;
    animation: fire 2s ease-in-out infinite;
}

@keyframes fire {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.5); }
    50% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.8); }
}

/* Animations para elementos específicos */
.stagger-animation {
    animation: fadeIn 0.8s ease-out forwards;
}

.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation:nth-child(6) { animation-delay: 0.6s; }

/* Efectos hover para botones */
button:hover,
.btn-hover:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

button:active,
.btn-hover:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Efectos de parallax suave */
.parallax-element {
    transition: transform 0.3s ease-out;
}

/* Animaciones para iconos */
.icon-bounce {
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Efectos de entrada para secciones */
.section-enter {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.section-enter.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efectos para tarjetas de voluntarios */
.volunteer-card {
    transform: perspective(1000px);
    transition: all 0.3s ease;
}

.volunteer-card:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(5deg);
}

/* Gradientes personalizados para cada tipo de unidad */
.bomba-gradient {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.ambulancia-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.rescate-gradient {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

/* Efectos de typing para texto */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid #fbbf24;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #fbbf24; }
}

/* Efectos de ripple para clics */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Animaciones de loading */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Efectos de glow para elementos importantes */
.glow-effect {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
}

/* Animaciones de contador */
.counter {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Efectos de partículas para el fondo */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float-particle 6s ease-in-out infinite;
}

@keyframes float-particle {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.5; }
}

/* Efectos de scroll smooth */
html {
    scroll-behavior: smooth;
}

/* Efectos para formularios */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Efectos de zoom para imágenes */
.zoom-hover {
    overflow: hidden;
    transition: transform 0.3s ease;
}

.zoom-hover:hover {
    transform: scale(1.05);
}

/* Efectos de skew para elementos modernos */
.skew-effect {
    transform: skewY(-2deg);
}

.skew-content {
    transform: skewY(2deg);
}

/* Animaciones de entrada desde diferentes direcciones */
.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.8s ease-out;
}

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

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

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Efectos de escalado dinámico */
.scale-on-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-on-hover:hover {
    transform: scale(1.1);
}

/* Efectos de rotación */
.rotate-on-hover {
    transition: transform 0.5s ease;
}

.rotate-on-hover:hover {
    transform: rotate(5deg);
}

/* Animaciones de texto */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    animation: textSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(100%);
}

@keyframes textSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos de background gradient animado */
.animated-gradient {
    background: linear-gradient(-45deg, #1e3a8a, #3730a3, #1e40af, #1d4ed8);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Media queries para responsividad */
@media (max-width: 768px) {
    .hero-bg {
        min-height: 80vh;
    }
    
    .floating {
        animation-duration: 4s;
    }
    
    .card-hover:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 640px) {
    .slide-in {
        animation-duration: 0.6s;
    }
    
    .bounce-in {
        animation-duration: 0.6s;
    }
}

/* Efectos específicos para elementos de bomberos */
.fire-glow {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    animation: fireGlow 2s ease-in-out infinite alternate;
}

@keyframes fireGlow {
    from { box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }
    to { box-shadow: 0 0 30px rgba(239, 68, 68, 0.6); }
}

.water-effect {
    background: linear-gradient(45deg, #3b82f6, #06b6d4, #0891b2);
    background-size: 200% 200%;
    animation: waterFlow 3s ease-in-out infinite;
}

@keyframes waterFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Efectos para estadísticas */
.stat-number {
    animation: numberPop 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes numberPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}