/* styles.css - Versión MEJORADA con corrección de title-line */

:root {
    --primary: #7553E8;
    --secondary: #FF6B9A;
    --light: #e5defb;
    --dark: #333;
    --white: #fff;
    --text: #444;
    --logo-text: #FEFFF9;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f9f7ff;
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: opacity 0.3s ease;
}

body.menu-open {
    overflow: hidden;
}

/* Reset enlaces y listas */
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* === HEADER MEJORADO === */
header {
    background: linear-gradient(135deg, var(--primary), #5a40c9);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(117, 83, 232, 0.3);
    border-bottom: 2px solid rgba(254, 255, 249, 0.2);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.logo-section:hover { 
    transform: scale(1.02); 
}

.logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    transition: all 0.25s ease;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo:hover { 
    transform: rotate(-5deg) scale(1.05); 
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--logo-text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
    z-index: 1002;
    transition: transform 0.3s ease;
}

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

.hamburger-line {
    width: 28px;
    height: 3px;
    background: var(--logo-text);
    transition: all 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.menu-toggle.active .hamburger-line:nth-child(1) { 
    transform: rotate(45deg) translate(6px, 6px); 
}
.menu-toggle.active .hamburger-line:nth-child(2) { 
    opacity: 0; 
}
.menu-toggle.active .hamburger-line:nth-child(3) { 
    transform: rotate(-45deg) translate(6px, -6px); 
}

/* Navegación */
.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--logo-text);
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.25s ease;
    white-space: nowrap;
    background: rgba(254, 255, 249, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(254, 255, 249, 0.15);
    position: relative;
    overflow: hidden;
}

.nav-item i {
    color: var(--logo-text);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.nav-item:hover i {
    transform: scale(1.2);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-item:hover {
    background: rgba(254, 255, 249, 0.25);
    transform: translateY(-2px);
    border-color: rgba(254, 255, 249, 0.3);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.nav-item:hover::after {
    transform: translateX(0);
}

.nav-item.active {
    background: rgba(254, 255, 249, 0.3);
    border-color: rgba(254, 255, 249, 0.4);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2), inset 0 1px 0 rgba(254, 255, 249, 0.4);
}

.nav-item.active::after {
    transform: translateX(0);
    background: var(--secondary);
}

/* Join + Login buttons */
.join-link,
.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14.5px;
    white-space: nowrap;
    transition: all 0.25s ease;
    border: 1px solid rgba(254, 255, 249, 0.2);
    margin-left: 6px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.join-link::before,
.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(254, 255, 249, 0.1);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
}

.join-link:hover::before,
.login-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.join-link {
    background: linear-gradient(135deg, var(--secondary), #ff4f85);
    color: var(--logo-text);
    box-shadow: 0 4px 15px rgba(255, 107, 154, 0.4);
}

.join-link:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(255, 107, 154, 0.5);
    border-color: rgba(254, 255, 249, 0.4);
}

.join-link i {
    color: var(--logo-text);
    transition: transform 0.3s;
}

.join-link:hover i {
    transform: scale(1.2);
}

.login-btn {
    background: rgba(254, 255, 249, 0.15);
    color: var(--logo-text);
    border: 1px solid rgba(254, 255, 249, 0.25);
    cursor: pointer;
}

.login-btn:hover { 
    background: rgba(254, 255, 249, 0.3); 
    transform: translateY(-3px); 
    border-color: rgba(254, 255, 249, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.login-btn i {
    color: var(--logo-text);
    transition: transform 0.3s;
}

.login-btn:hover i {
    transform: scale(1.2);
}

/* === FOOTER MEJORADO - LOGO SIN FILTRO BLANCO === */
footer {
    background: linear-gradient(135deg, var(--primary), #5a40c9);
    padding: 60px 20px 40px;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

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

.footer-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.footer-logo:hover .footer-logo-img {
    transform: rotate(-10deg);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--logo-text);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.footer-text {
    text-align: center;
    color: rgba(254, 255, 249, 0.9);
    line-height: 1.8;
}

.footer-text p:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary);
}

.footer-text p:last-child {
    font-size: 0.95rem;
    opacity: 0.9;
}

.social-media {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-media a {
    color: var(--logo-text);
    font-size: 1.5rem;
    transition: all 0.3s;
    background: rgba(254, 255, 249, 0.1);
    padding: 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(254, 255, 249, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.social-media a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    z-index: -1;
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.social-media a:hover { 
    color: white; 
    transform: scale(1.15) translateY(-3px);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.social-media a:hover::before {
    transform: scale(1);
}

/* === TÍTULOS CORREGIDOS - Línea ahora debajo del texto === */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 60px;          /* Más espacio abajo para la línea */
    font-size: 2.1rem;
    color: var(--primary);
    font-weight: 700;
    padding: 0 20px;
    z-index: 1;
}

.section-title span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 10px;
    position: relative;
    z-index: 4;
    background-color: #f9f7ff;
    display: inline-block;
}

.title-line {
    position: absolute;
    bottom: -10px;                /* Debajo del texto */
    left: 20px;                   /* Alineado con el padding */
    right: 20px;
    height: 5px;                  /* Grosor visible pero elegante */
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    border-radius: 4px;
    z-index: 2;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .nav-item span, .join-link span, .login-btn span { 
        display: none; 
    }
    
    .nav-item, .join-link, .login-btn { 
        padding: 10px 14px; 
    }
    
    .nav-item i, .join-link i, .login-btn i {
        font-size: 16px;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 14px;
    }
    
    .menu-toggle { 
        display: flex; 
        z-index: 1002;
    }
    
    .logo { 
        width: 55px; 
        height: 55px; 
    }
    
    .brand-name { 
        font-size: 1.2rem; 
    }
    
    /* Menú móvil */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(117, 83, 232, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 20px 20px;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 35px rgba(0,0,0,0.25);
        z-index: 1001;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .main-nav.open { 
        transform: translateX(0); 
    }
    
    .nav-item, .join-link, .login-btn {
        width: 100%;
        justify-content: flex-start;
        margin: 8px 0;
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 12px;
        background: rgba(254, 255, 249, 0.12);
    }
    
    .nav-item span, .join-link span, .login-btn span {
        display: inline-block !important;
    }
    
    .footer-content {
        gap: 25px;
    }
    
    .footer-logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .footer-brand {
        font-size: 1.3rem;
    }
    
    .footer-logo-img {
        width: 70px;
        height: 70px;
    }
}

/* Soporte ultra pequeño */
@media (max-width: 480px) {
    .header-container { 
        height: 65px; 
        padding: 0 12px; 
    }
    
    .logo { 
        width: 50px; 
        height: 50px; 
    }
    
    .brand-name { 
        font-size: 1.1rem; 
    }
    
    .main-nav { 
        padding: 70px 15px 15px; 
    }
    
    .nav-item, .join-link, .login-btn { 
        padding: 14px 18px; 
        font-size: 15px; 
    }
    
    .footer-logo-img {
        width: 60px;
        height: 60px;
    }
    
    .footer-brand {
        font-size: 1.2rem;
    }
    
    .social-media a { 
        font-size: 1.3rem; 
        width: 45px; 
        height: 45px; 
        padding: 10px;
    }
}