/* ============================================================
   ENGLISHYHL - ESTILOS PRINCIPALES
   Diseño profesional, moderno y responsive
   ============================================================ */

/* ===== VARIABLES CSS ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    --border-color: #334155;
    --border-light: #475569;
    
    --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #0ea5e9, #6366f1);
    --gradient-3: linear-gradient(135deg, #f59e0b, #ef4444);
    --gradient-hero: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1a1a2e 100%);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 50px -10px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===== RESET Y ESTILOS BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul { list-style: none; }

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

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

.section {
    padding: 6rem 0;
    position: relative;
}

.text-gradient {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}

.btn--primary {
    background: var(--gradient-1);
    color: white;
    border: none;
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
.btn--primary:active {
    transform: translateY(0);
}

.btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}
.btn--outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}

.btn--sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn--full {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

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

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ===== HEADER / NAVEGACIÓN ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow-lg);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}
.nav__logo i {
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav__menu { display: flex; }

.nav__list {
    display: flex;
    gap: 0.25rem;
}

.nav__link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}
.nav__link:hover,
.nav__link.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.nav__user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav__avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
}

.nav__username {
    font-weight: 600;
    font-size: 0.9rem;
}

.nav__level-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    font-weight: 500;
}

.nav__toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== SECCIÓN HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 7rem 0 4rem;
}

.hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero__circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.hero__circle--1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero__circle--2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -50px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.hero__circle--3 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero__description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 540px;
    line-height: 1.7;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero__stats {
    display: flex;
    gap: 2.5rem;
}

.hero__stat {
    text-align: center;
}

.hero__stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero__image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__phone-mockup {
    width: 300px;
    height: 580px;
    background: var(--bg-secondary);
    border-radius: 40px;
    padding: 15px;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    position: relative;
}

.mockup__screen {
    background: var(--bg-primary);
    border-radius: 28px;
    height: 100%;
    overflow: hidden;
    padding: 1rem;
}

.mockup__chat {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mockup__msg {
    max-width: 85%;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    font-size: 0.8rem;
    animation: slideIn 0.4s ease;
}

.mockup__msg--bot {
    background: var(--bg-tertiary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.mockup__msg--user {
    background: var(--primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.mockup__typing {
    display: flex;
    gap: 4px;
    padding: 0.6rem 0.9rem;
    background: var(--bg-tertiary);
    border-radius: 14px;
    align-self: flex-start;
    width: fit-content;
}
.mockup__typing span {
    width: 7px;
    height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}
.mockup__typing span:nth-child(2) { animation-delay: 0.2s; }
.mockup__typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

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

.hero__floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    animation: floatCard 6s ease-in-out infinite;
}

.hero__floating-card--1 {
    top: 10%;
    right: -30px;
    animation-delay: 0s;
}
.hero__floating-card--1 i { color: var(--success); }

.hero__floating-card--2 {
    bottom: 20%;
    left: -40px;
    animation-delay: 3s;
}
.hero__floating-card--2 i { color: var(--accent); }

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

/* ===== SECCIÓN HEADER ===== */
.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section__description {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ===== CARACTERÍSTICAS ===== */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-dark);
}
.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-card__icon--purple { background: rgba(99, 102, 241, 0.2); color: var(--primary-light); }
.feature-card__icon--blue { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
.feature-card__icon--green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.feature-card__icon--orange { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.feature-card__icon--pink { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.feature-card__icon--teal { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; }

.feature-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card__text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== SECCIÓN CHAT ===== */
.chat-auth-required {
    max-width: 500px;
    margin: 0 auto;
}

.chat-auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
}

.chat-auth-icon {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.chat-auth-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.chat-auth-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.chat-auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Contenedor del chat */
.chat-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-height: 600px;
    max-height: 750px;
    box-shadow: var(--shadow-lg);
}

/* Sidebar del chat */
.chat-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chat-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.chat-sidebar__header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
}
.status-badge--online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.chat-sidebar__info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.info-item i {
    margin-top: 2px;
    color: var(--primary-light);
}

.chat-sidebar__topics h4 {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.topic-chip {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-family);
    transition: var(--transition-fast);
}
.topic-chip:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.08);
}

.chat-sidebar__clear {
    margin-top: auto;
}

/* Área principal del chat */
.chat-main {
    display: flex;
    flex-direction: column;
    min-height: 600px;
    max-height: 750px;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-header__info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.bot-avatar {
    background: var(--gradient-1);
    color: white;
}

.chat-header__info h4 {
    font-size: 0.95rem;
}

.chat-status {
    font-size: 0.75rem;
    color: var(--success);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.btn-icon:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* Mensajes del chat */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chat-welcome {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.welcome-bot-msg {
    display: flex;
    gap: 0.75rem;
    max-width: 80%;
}

.bot-msg-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-full);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.bot-msg-content {
    background: var(--bg-tertiary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border-top-left-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.6;
}
.bot-msg-content ul {
    margin: 0.5rem 0;
    padding-left: 0.5rem;
}
.bot-msg-content li {
    padding: 0.2rem 0;
    font-size: 0.85rem;
}

/* Burbujas de mensaje */
.message {
    display: flex;
    gap: 0.5rem;
    max-width: 85%;
    animation: messageIn 0.3s ease;
}

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

.message--user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message--bot {
    align-self: flex-start;
}

.message__avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.message--bot .message__avatar {
    background: var(--gradient-1);
    color: white;
}

.message--user .message__avatar {
    background: var(--secondary);
    color: white;
}

.message__bubble {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.message--bot .message__bubble {
    background: var(--bg-tertiary);
    border-top-left-radius: 4px;
}

.message--user .message__bubble {
    background: var(--primary);
    border-top-right-radius: 4px;
    color: white;
}

.message__time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding: 0 0.25rem;
}

.message--user .message__time {
    text-align: right;
}

/* Input del chat */
.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}
.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.chat-input::placeholder {
    color: var(--text-muted);
}

.btn-send {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: var(--radius-md);
    background: var(--gradient-1);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-send:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}
.btn-send:active {
    transform: scale(0.95);
}

.chat-input-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-align: center;
}
.chat-input-hint kbd {
    background: var(--bg-tertiary);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
}

/* ===== RECURSOS ===== */
.resources__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.resource-card__image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.resource-card__body {
    padding: 1.5rem;
}

.resource-card__body h4 {
    margin-bottom: 0.5rem;
}

.resource-card__body p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.resource-tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--primary-light);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer__brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer__social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.footer__social a {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition-fast);
    color: var(--text-secondary);
}
.footer__social a:hover {
    background: var(--primary);
    color: white;
}

.footer__links h4 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.footer__links ul li {
    margin-bottom: 0.5rem;
}
.footer__links ul li a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: var(--transition-fast);
}
.footer__links ul li a:hover {
    color: var(--primary-light);
}

.footer__newsletter h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.footer__newsletter p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.footer__form {
    display: flex;
    gap: 0.5rem;
}

.footer__input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.85rem;
    outline: none;
}
.footer__input:focus {
    border-color: var(--primary);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===== MODALES ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 90%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    z-index: 1;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal__close:hover {
    background: var(--danger);
    color: white;
}

.modal__header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
}
.modal__icon--blue { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
.modal__icon--purple { background: rgba(99, 102, 241, 0.2); color: var(--primary-light); }

.modal__header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}
.modal__header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-errors {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #fca5a5;
    font-size: 0.85rem;
}
.form-errors ul {
    list-style: disc;
    padding-left: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-group label i {
    color: var(--primary-light);
    font-size: 0.8rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-control::placeholder {
    color: var(--text-muted);
}

.password-wrapper {
    position: relative;
}
.password-wrapper .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    transition: var(--transition-fast);
}
.password-toggle:hover {
    color: var(--text-primary);
}

.modal__footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.modal__footer a {
    color: var(--primary-light);
    font-weight: 600;
}
.modal__footer a:hover {
    text-decoration: underline;
}

/* ===== TOAST NOTIFICACIONES ===== */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.4s ease, toastOut 0.3s ease 3.5s forwards;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--warning { background: var(--warning); color: var(--text-dark); }
.toast--info { background: var(--secondary); }

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero__description { max-width: 100%; }
    .hero__cta { justify-content: center; }
    .hero__stats { justify-content: center; }
    .hero__image { order: -1; }
    .hero__floating-card--1 { right: 10px; }
    .hero__floating-card--2 { left: 10px; }
    
    .chat-container {
        grid-template-columns: 1fr;
        min-height: auto;
        max-height: none;
    }
    .chat-sidebar { display: none; }
    
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    html { font-size: 14px; }
    
    .nav__menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    .nav__menu.active {
        transform: translateY(0);
    }
    .nav__list {
        flex-direction: column;
        gap: 0;
    }
    .nav__link {
        display: block;
        padding: 0.75rem 1rem;
    }
    .nav__toggle { display: block; }
    
    .hero__title { font-size: 2.5rem; }
    .section__title { font-size: 2rem; }
    
    .features__grid {
        grid-template-columns: 1fr;
    }
    
    .chat-main {
        min-height: 500px;
        max-height: 600px;
    }
    
    .footer__grid {
        grid-template-columns: 1fr;
    }
    
    .modal__content {
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero__title { font-size: 2rem; }
    .hero__cta { flex-direction: column; }
    .hero__stats { flex-direction: column; gap: 1rem; }
    
    .nav__actions .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .chat-input-container {
        flex-direction: column;
    }
    .btn-send {
        width: 100%;
    }
    
    .footer__form {
        flex-direction: column;
    }
}
