/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

/* Fondo animado principal */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(-45deg, #e3f2fd, #f3e5f5, #e8f5e8, #fff3e0);
    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%;
    }
}

/* Formas flotantes animadas */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.floating-shapes::before,
.floating-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.floating-shapes::before {
    width: 80px;
    height: 80px;
    background: #4CAF50;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-shapes::after {
    width: 60px;
    height: 60px;
    background: #FF5722;
    top: 60%;
    right: 15%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.1;
    }
}

/* Partículas adicionales */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 87, 34, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(103, 58, 183, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: particleMove 25s ease-in-out infinite;
}

@keyframes particleMove {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    33% {
        transform: translateX(30px) translateY(-30px);
    }
    66% {
        transform: translateX(-20px) translateY(20px);
    }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header con efecto glassmorphism */
header {
    background: rgba(76, 175, 80, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.logo i {
    margin-right: 10px;
    animation: puzzlePulse 3s ease-in-out infinite;
}

@keyframes puzzlePulse {
    0%, 100% {
        transform: scale(1);
        color: #fff;
    }
    50% {
        transform: scale(1.1);
        color: #FFE082;
    }
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

nav ul li a:hover::before {
    left: 100%;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

nav ul li a.active {
    background: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

/* Hero section con animaciones */
.hero {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.8), rgba(255, 87, 34, 0.8));
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="puzzle" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M10,0 Q15,5 10,10 Q5,5 10,0" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23puzzle)"/></svg>') repeat;
    animation: puzzlePattern 30s linear infinite;
}

@keyframes puzzlePattern {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(20px) translateY(20px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.3s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    margin-top: 30px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    background: #FF5722;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 30px;
    margin: 0 10px;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: white;
    color: #4CAF50;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

/* Secciones con animaciones de entrada */
.features, .stats, .about-content-section, .symptoms-content-section, .resources-section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 15px;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #FF5722);
    border-radius: 2px;
}

/* Cards con efectos hover */
.cards {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 20px;
    width: 30%;
    min-width: 280px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #FF5722, #673AB7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 50px;
    color: #4CAF50;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
    color: #FF5722;
}

.card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Estadísticas animadas */
.stats {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(255, 87, 34, 0.1));
    position: relative;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 200px;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 10px;
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-text {
    color: #666;
    font-size: 1.1rem;
}

/* Subpage hero */
.subpage-hero {
    background: linear-gradient(135deg, #4CAF50, #FF5722);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.subpage-hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subpage-hero p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Contenido de texto */
.about-text, .symptoms-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
}

.about-text h2, .symptoms-text h2 {
    color: #4CAF50;
    margin: 40px 0 20px 0;
    font-size: 2rem;
}

.about-text h3, .symptoms-text h3 {
    color: #FF5722;
    margin: 30px 0 15px 0;
    font-size: 1.5rem;
}

.about-text ul, .symptoms-text ul {
    margin: 20px 0;
    padding-left: 30px;
}

.about-text li, .symptoms-text li {
    margin: 10px 0;
}

/* Lista de recursos */
.resources-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.resources-list li {
    background: rgba(255, 255, 255, 0.9);
    margin: 20px 0;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 5px solid #4CAF50;
}

.resources-list li:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.resources-list a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.resources-list a:hover {
    color: #FF5722;
}

.resources-list p {
    margin-top: 10px;
    color: #666;
    line-height: 1.6;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: 50px;
}

/* Animaciones de entrada para elementos */
.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .cards {
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        width: 90%;
        max-width: 400px;
    }
    
    .stats-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Accesibilidad - Respeta las preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .animated-background,
    .floating-shapes::before,
    .floating-shapes::after,
    body::before,
    .logo i,
    .hero::before {
        animation: none;
    }
    
    .card:hover,
    .stat-item:hover,
    .btn:hover,
    .resources-list li:hover {
        transform: none;
    }
}
