:root {
    --azul-dark: #0f172a;
    --azul-brand: #3b82f6;
    --azul-soft: #f1f5f9;
    --white: #ffffff;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
    font-size: clamp(14px, 1.2vw, 18px);
}

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

body {
    font-family: var(--font-main);
    color: var(--azul-dark);
    line-height: 1.6;
    background-color: var(--white);
    scroll-behavior: smooth;
}

.hidden { display: none !important; }

/* NAVIGATION */
header {
    position: fixed;
    width: 100%;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.nav-logo { height: 70px; }

nav ul { display: flex; list-style: none; gap: 30px; }
nav ul li a {
    text-decoration: none;
    color: var(--azul-dark);
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}
nav ul li a:hover { color: var(--azul-brand); }

/* HERO */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: #000;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('imagenes/Puente_plateado.jfif');
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: white;
    animation: fadeInUp 1s ease;
}

.hero .badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(147, 197, 253, 0.3);
}

.badge {
    background: #dbeafe;
    color: var(--azul-brand);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

h1 { font-size: 4.5rem; line-height: 1.1; margin: 20px 0; font-weight: 800; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.gradient-text {
    background: linear-gradient(90deg, var(--azul-dark), var(--azul-brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2.5rem; margin-bottom: 10px; }
.section-title p { color: #64748b; font-size: 1.05rem; }

.btn-primary {
    background: var(--azul-dark);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: 0.3s;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* TOOLS SECTION */
.tools-section { padding: 100px 5%; background: var(--azul-soft); }
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto;
}

.tool-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    transition: 0.4s;
}
.tool-card:hover { transform: scale(1.03); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.tool-card.highlight { background: var(--azul-dark); color: white; }
.tool-card.highlight .btn-text { color: var(--azul-brand); }
.tool-icon { font-family: 'Material Symbols Outlined'; font-size: 2.5rem; color: var(--azul-brand); margin-bottom: 20px; }
.btn-text { color: var(--azul-brand); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.btn-text:hover { text-decoration: underline; }

/* AUTH SECTION */
.auth-section { padding: 100px 5%; background: var(--white); }

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.auth-tab.active { color: var(--azul-brand); border-bottom-color: var(--azul-brand); }
.auth-tab:hover { color: var(--azul-dark); }

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}
.form-group input {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}
.form-group input:focus { border-color: var(--azul-brand); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

.auth-message {
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 8px;
    display: none;
}
.auth-message.error { display: block; background: #fef2f2; color: #dc2626; }
.auth-message.success { display: block; background: #f0fdf4; color: #16a34a; }

.btn-auth {
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--azul-dark);
    color: white;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
}
.btn-auth:hover { background: var(--azul-brand); transform: translateY(-2px); }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Logged-in profile card */
.auth-profile {
    max-width: 440px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--azul-brand);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-info { display: flex; flex-direction: column; gap: 4px; }
.profile-name { font-weight: 700; font-size: 1.1rem; }
.profile-email { font-size: 0.85rem; color: #64748b; }

.btn-logout {
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: var(--white);
    color: #64748b;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
    margin-top: 8px;
}
.btn-logout:hover { color: #dc2626; border-color: #dc2626; }

/* FORUM SECTION */
.forum-section { padding: 100px 5%; background: var(--azul-soft); }
.forum-container { max-width: 700px; margin: 0 auto; }
.forum-header { text-align: center; margin-bottom: 40px; }
.forum-header h2 { font-size: 2.5rem; margin-bottom: 10px; }
.forum-header p { color: #64748b; font-size: 1.05rem; }

.chat-mockup {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.chat-messages {
    height: 360px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    background: var(--azul-soft);
    padding: 12px 16px;
    border-radius: 12px;
    align-self: flex-start;
    max-width: 85%;
}
.msg-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}
.msg-meta strong { font-size: 0.85rem; color: var(--azul-dark); }
.msg-time { font-size: 0.7rem; color: #94a3b8; }
.msg-body { font-size: 0.9rem; color: #334155; line-height: 1.5; }

.chat-empty, .chat-loading {
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px;
    font-size: 0.9rem;
}

.chat-name-area {
    padding: 12px 20px 0;
}
.chat-name-area input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    transition: 0.3s;
}
.chat-name-area input:focus { border-color: var(--azul-brand); }

.chat-input-area {
    padding: 12px 20px 20px;
    display: flex;
    gap: 10px;
}
.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    transition: 0.3s;
}
.chat-input-area input:focus { border-color: var(--azul-brand); }

.btn-send {
    background: var(--azul-brand);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: 0.3s;
}
.btn-send:hover { background: var(--azul-dark); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* FOOTER */
footer {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

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

/* RESPONSIVE */
img, video, picture {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    nav { padding: 12px 20px; }
    nav ul { gap: 16px; }
    h1 { font-size: 2.5rem; }
    .section-title h2, .forum-header h2 { font-size: 1.8rem; }
    .auth-card, .auth-profile { padding: 28px 20px; }
    .tools-section, .auth-section, .forum-section { padding: 60px 5%; }
}

@media (max-width: 480px) {
    nav ul { gap: 10px; }
    nav ul li a { font-size: 0.8rem; }
    h1 { font-size: 2rem; }
}
