/* ===== VARIABLES Y RESET ===== */
:root {
    /* Paleta calmante Kodyan Care - Mejorada */
    --color-primary: #6D67E4;         /* Lila principal */
    --color-primary-light: #8A85FF;   /* Lila claro */
    --color-primary-dark: #564FCC;    /* Lila oscuro */
    --color-secondary: #F2F7FF;       /* Blanco azulado */
    --color-accent: #453F90;          /* Lila oscuro profundo */
    --color-background: #E6F7FF;      /* Fondo azul claro */
    --color-surface: #FFFFFF;         /* Superficies blancas */
    
    /* Colores semánticos */
    --color-text: #003B46;            /* Texto principal azul oscuro */
    --color-text-light: #5B7E87;      /* Texto secundario */
    --color-emergency: #FF6B6B;       /* Rojo para emergencia */
    --color-emergency-light: #FFE5E5; /* Fondo emergencia */
    --color-guide: #4ECDC4;           /* Verde azulado para guías */
    --color-guide-light: #E0F7F5;     /* Fondo guías */
    --color-success: #4CAF50;         /* Verde éxito */
    
    /* Efectos */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: rgba(255, 255, 255, 0.98);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(109, 103, 228, 0.1);
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

.logo-pulpo {
    height: 42px;
    width: auto;
    transition: var(--transition);
}

.logo:hover .logo-pulpo {
    transform: rotate(15deg);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
    font-size: 1rem;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--color-text);
}

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

/* Botón de emergencia en la navegación */
.btn-emergencia {
    background: linear-gradient(135deg, var(--color-emergency), #FF5252);
    color: white !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-emergencia:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* BOTÓN DE DONACIONES EN NAVBAR */
.btn-donar {
    background: linear-gradient(135deg, #FFD166, #FFB347);
    color: #333 !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-donar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 71, 0.3);
    background: linear-gradient(135deg, #FFB347, #FF9A3C);
}

/* Hamburger menu para mobile */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--color-primary);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 16rem 0 12rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(109, 103, 228, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(69, 63, 144, 0.06) 0%, transparent 45%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    line-height: 1.2;
    font-weight: 700;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Líneas de fondo animadas */
.care-line {
    position: absolute;
    z-index: 1;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
    opacity: 0.15;
    animation: carePulse 6s ease-in-out infinite;
}

@keyframes carePulse {
    0%, 100% { opacity: 0.1; transform: scaleX(0.95); }
    50% { opacity: 0.2; transform: scaleX(1); }
}

.care-line-1 {
    top: 25%;
    left: 5%;
    width: 90%;
    height: 2px;
}

.care-line-2 {
    bottom: 25%;
    left: 10%;
    width: 80%;
    height: 1px;
    animation-delay: 3s;
}

/* ===== SECTIONS COMMON STYLES ===== */
section {
    padding: 8rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title h2 {
    font-size: 3rem;
    color: var(--color-text);
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.section-title h2:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

.section-title p {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-top: 2.5rem;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== HERRAMIENTAS SECTION ===== */
.herramientas {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-secondary) 100%);
    position: relative;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
}

.tool-item {
    background: var(--color-surface);
    padding: 3rem 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.tool-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    opacity: 0;
    transition: var(--transition);
}

.tool-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.tool-item:hover:before {
    opacity: 1;
}

.pulpo-icon {
    height: 90px;
    width: auto;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.tool-item:hover .pulpo-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-item h3 {
    font-size: 1.6rem;
    color: var(--color-text);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.tool-item p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* ===== REGULACIÓN EMOCIONAL SECTION ===== */
.regulacion-emocional {
    background: linear-gradient(135deg, #f8f5ff 0%, #f0edff 100%);
    position: relative;
}

.regulacion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
}

.regulacion-item {
    background: var(--color-surface);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
}

.regulacion-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.regulacion-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.regulacion-item h3 {
    color: var(--color-text);
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.regulacion-item > p {
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.regulacion-item ul {
    list-style: none;
    margin-bottom: 1.5rem;
    text-align: left;
}

.regulacion-item li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-light);
    line-height: 1.5;
}

.regulacion-item li:before {
    content: "•";
    color: var(--color-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.regulacion-item small {
    color: var(--color-text-light);
    font-style: italic;
    font-size: 0.9rem;
}

.regulacion-extra {
    background: var(--color-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 4rem;
    text-align: center;
    border-left: 4px solid var(--color-primary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== CÓMO AYUDAR SECTION ===== */
.como-ayudar {
    background: linear-gradient(135deg, #f8f5ff 0%, #f0edff 100%);
    padding: 8rem 0;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.help-item {
    background: var(--color-surface);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.help-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.help-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.help-item h3 {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.help-item p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ===== BANNER INSTAGRAM ===== */
.instagram-cta {
    padding: 3rem 0;
    margin: 3rem 0;
    background: transparent;
}

.ig-banner {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    padding: 3rem 2.5rem;
    border: 2px solid var(--color-primary-light);
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.ig-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
}

.ig-icon {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: block;
}

.ig-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.ig-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--color-text-light);
    line-height: 1.6;
    font-weight: 400;
}

.btn-ig {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-ig:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
    gap: 0.5rem;
    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.2), transparent);
    transition: var(--transition);
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border: 2px solid var(--color-primary);
    box-shadow: 0 6px 20px rgba(109, 103, 228, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(109, 103, 228, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(109, 103, 228, 0.2);
}

/* Fix para líneas en botones - SIN !important */
.hero-buttons .btn,
.hero-buttons .btn-primary,
.hero-buttons .btn-outline,
.hero-buttons .btn-ig,
.hero-buttons a {
    text-decoration: none;
}

.hero-buttons a.btn:hover,
.hero-buttons .btn:hover {
    text-decoration: none;
}

/* ===== FOOTER CENTRADO CON GRID ===== */
footer {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-secondary) 100%);
    color: var(--color-text);
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(109, 103, 228, 0.1);
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.footer-about,
.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: block;
    text-decoration: none;
}

.footer-about p {
    color: var(--color-text-light);
    line-height: 1.6;
    font-size: 1.1rem;
    max-width: 300px;
}

.footer-links h4 {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.8rem;
    font-weight: 600;
}

.footer-links h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.footer-links a:hover {
    color: var(--color-text);
    transform: translateY(-2px);
}

/* SECCIÓN DONACIONES EN FOOTER */
.donaciones-footer {
    text-align: center;
    padding: 3rem 2rem;
    margin: 3rem 0;
    background: var(--color-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--color-primary-light);
    position: relative;
    overflow: hidden;
}

.donaciones-footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
}

.donaciones-footer h3 {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.donaciones-footer > p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.plataformas-donacion {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-donacion {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white !important;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 4px 12px rgba(109, 103, 228, 0.3);
    border: 2px solid transparent;
}

.btn-donacion:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(109, 103, 228, 0.4);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-accent));
}

.donaciones-footer small {
    color: var(--color-text-light);
    font-size: 0.95rem;
    font-style: italic;
}

.copyright {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(109, 103, 228, 0.1);
    color: var(--color-text-light);
    font-size: 1rem;
}

.copyright a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.copyright a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .regulacion-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 3.2rem;
    }
    
    .section-title h2 {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1.2rem;
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero {
        padding: 14rem 0 8rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .tools-grid,
    .regulacion-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .section-title p {
        font-size: 1.1rem;
    }
    
    .tool-item,
    .regulacion-item {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .ig-banner {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .ig-icon {
        font-size: 3rem;
    }
    
    .ig-content h3 {
        font-size: 1.3rem;
    }
    
    .ig-content p {
        font-size: 1rem;
    }
    
    .donaciones-footer {
        padding: 2.5rem 1.5rem;
        margin: 2rem 0;
    }
    
    .donaciones-footer h3 {
        font-size: 1.5rem;
    }
    
    .plataformas-donacion {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-donacion {
        width: 250px;
        justify-content: center;
        padding: 0.9rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 12rem 0 6rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        padding: 0.8rem 0;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

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

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

/* ===== ACCESSIBILITY ===== */
button:focus,
a:focus,
input:focus {
    outline: 3px solid var(--color-primary-light);
    outline-offset: 2px;
}

/* Fix para header mobile que tapa contenido */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    
    .herramienta-detalle {
        padding: 2rem 0 4rem;
    }
    
    section[id] {
        scroll-margin-top: 80px;
    }
}

/* Debug: Mostrar imágenes faltantes */
img[src=""], 
img:not([src]), 
img[src*="undefined"],
img[src*="null"] {
    border: 3px solid var(--color-emergency) !important;
    background: var(--color-emergency-light) !important;
    padding: 1rem;
}
