/**
 * NutriCrecer - Estilos Principales
 * Archivo: public/css/styles.css
 */

:root {
    /* Colores principales del nicho de nutrición infantil */
    --verde-natural: #4CAF50;
    --verde-oscuro: #2E7D32;
    --naranja-energia: #FF9800;
    --naranja-suave: #FFB74D;
    --coral: #FF6B6B;
    --celeste: #4ECDC4;
    --morado-suave: #9B59B6;
    --amarillo: #FFC107;
    
    /* Colores neutros */
    --blanco: #FFFFFF;
    --gris-claro: #F5F5F5;
    --gris-medio: #9E9E9E;
    --texto-oscuro: #2C3E50;
    
    /* Sombras */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    
    /* Fuentes */
    --font-display: 'Righteous', cursive;
    --font-body: 'Nunito', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--texto-oscuro);
    overflow-x: hidden;
    background: var(--gris-claro);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== UTILIDADES ==================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.gradient-text {
    background: linear-gradient(135deg, var(--verde-natural), var(--celeste));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--verde-natural), var(--verde-oscuro));
    color: white;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--verde-oscuro);
    border: 2px solid var(--verde-natural);
}

.btn-secondary:hover {
    background: var(--verde-natural);
    color: white;
    transform: translateY(-3px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.4);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--gris-medio);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== NAVBAR ==================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 5%;
    box-shadow: var(--shadow-md);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    font-weight: 600;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--verde-natural), var(--naranja-energia));
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==================== HERO ==================== */

.hero {
    margin-top: 80px;
    min-height: 90vh;
    padding: 4rem 5%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero.gradient-orange {
    background: linear-gradient(135deg, 
        #FFE5B4 0%, 
        #FFD700 25%, 
        #FFA07A 50%, 
        #FF8C69 75%, 
        #FF7F50 100%);
}

.hero.gradient-green {
    background: linear-gradient(180deg, 
        #E8F5E9 0%, 
        #C8E6C9 50%, 
        #A5D6A7 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.3), transparent);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.3), transparent);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

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

.hero-content {
    position: relative;
    z-index: 1;
}

/* ==================== CARDS ==================== */

.card {
    background: white;
    border-radius: 25px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-body {
    margin-bottom: 1.5rem;
}

.card-footer {
    margin-top: auto;
}

/* ==================== GRID LAYOUTS ==================== */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ==================== FORMS ==================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--texto-oscuro);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--gris-claro);
    border-radius: 15px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--verde-natural);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--gris-claro);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-checkbox:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(78, 205, 196, 0.1));
    transform: translateX(5px);
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ==================== BADGES ==================== */

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
}

.badge-primary {
    background: linear-gradient(135deg, var(--verde-natural), var(--celeste));
    color: white;
}

.badge-secondary {
    background: linear-gradient(135deg, var(--naranja-energia), var(--coral));
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, var(--amarillo), var(--naranja-suave));
    color: white;
}

/* ==================== TESTIMONIALS ==================== */

.testimonial-card {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.testimonial-quote {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--morado-suave), var(--celeste));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

/* ==================== PRODUCT CARDS ==================== */

.product-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
}

.product-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--verde-natural), var(--celeste));
}

.product-body {
    padding: 2rem;
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin: 1rem 0;
}

.price-current {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--verde-oscuro);
}

.price-original {
    font-size: 1.2rem;
    text-decoration: line-through;
    color: var(--gris-medio);
}

/* ==================== FOOTER ==================== */

.footer {
    background: var(--texto-oscuro);
    color: white;
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

/* ==================== ANIMATIONS ==================== */

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 3%;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero {
        min-height: auto;
        padding: 3rem 3%;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1.5rem;
        border-radius: 20px;
    }
}

/* ==================== LOADING STATES ==================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* ==================== ALERTS ==================== */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(78, 205, 196, 0.1));
    border: 2px solid var(--verde-natural);
    color: var(--verde-oscuro);
}

.alert-error {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 142, 83, 0.1));
    border: 2px solid var(--coral);
    color: #c0392b;
}

.alert-info {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(155, 89, 182, 0.1));
    border: 2px solid var(--celeste);
    color: var(--morado-suave);
}
