/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
:root {
    --bg-dark: #030712;
    --bg-card: rgba(10, 15, 30, 0.55);
    --border-glow: rgba(120, 180, 255, 0.2);
    --border-glow-hover: rgba(0, 255, 204, 0.4);
    
    --color-primary: #78b4ff;
    --color-secondary: #00ffcc;
    --color-accent: #bf5af2;
    
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body, html {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.page-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 2;
}

/* Luces Ambientales */
.ambient-glow-1, .ambient-glow-2 {
    position: fixed;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
}
.ambient-glow-1 {
    background: var(--color-primary);
    top: -10%;
    left: 10%;
    animation: floatGlow 12s infinite alternate ease-in-out;
}
.ambient-glow-2 {
    background: var(--color-accent);
    bottom: -10%;
    right: 10%;
    animation: floatGlow 18s infinite alternate-reverse ease-in-out;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 20px) scale(1.1); }
}

/* ==========================================================================
   2. INTERFAZ Y CONTENEDORES
   ========================================================================== */
.app-container {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glow);
    border-radius: 32px;
    padding: 3.5rem;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: interfaceEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
}

.subpage-container {
    max-width: 900px;
}

@keyframes interfaceEntrance {
    from { opacity: 0; transform: translateY(20px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Selector de Idioma */
.lang-select-wrapper {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 10;
}

.lang-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

.lang-select:hover {
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.1);
}

.lang-select option {
    background: #0d1322;
    color: #ffffff;
}

/* Componentes Tipográficos y Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.25);
    color: var(--color-secondary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-secondary);
}

h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #ffffff 30%, #a5caff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin: 2rem 0 1rem 0;
}

h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin: 1.2rem 0 0.5rem 0;
}

p, ul {
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

ul { padding-left: 1.2rem; }

a.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

a.back-link:hover {
    color: var(--color-secondary);
    transform: translateX(-4px);
}

/* Cajas de contenido legal */
.content-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.info-box {
    background: rgba(0, 255, 204, 0.05);
    border-left: 4px solid var(--color-secondary);
    padding: 1rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}

/* Formularios para Contacto */
.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.input-field, .textarea-field {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.input-field:focus, .textarea-field:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.15);
}

.textarea-field { min-height: 140px; resize: vertical; }

.submit-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 100px;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    align-self: flex-start;
}

.submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

/* ==========================================================================
   3. FOOTER
   ========================================================================== */
.site-footer {
    width: 100%;
    padding: 2rem 4rem;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.footer-left p { color: #6b7280; font-size: 0.85rem; }
.footer-right { display: flex; gap: 2rem; align-items: center; }
.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 1.2rem;
    transition: var(--transition-smooth);
}
.footer-links a:hover { color: var(--color-secondary); }
.social-icons { display: flex; gap: 1rem; }
.social-icons a { color: #6b7280; transition: var(--transition-smooth); }
.social-icons a:hover { color: var(--color-primary); transform: translateY(-2px); }
.social-icons svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 768px) {
    .app-container { padding: 2rem 1.2rem; }
    h1 { font-size: 2.2rem; }
    .site-footer { flex-direction: column; gap: 1.2rem; text-align: center; padding: 2rem 1rem; }
    .footer-right { flex-direction: column; gap: 0.8rem; }
    .footer-links a { margin: 0 0.4rem; }
}