/* ================================================================
   TRUEPATH - CSS RESPONSIVO MEJORADO
   ================================================================
   
   ESTRUCTURA:
   1. Variables CSS (Custom Properties)
   2. Reset y Base Styles
   3. Layout Principal (Mobile-First)
   4. Componentes de UI
   5. Media Queries Progresivas
   6. Utilidades y Estados Especiales
   
   ENFOQUE: Mobile-First Design
   - Diseñamos primero para móviles (320px+)
   - Luego escalamos hacia tablets (768px+)
   - Finalmente optimizamos para desktop (1024px+)
   
   ================================================================ */

/* ================================================================
   1. VARIABLES CSS (CUSTOM PROPERTIES)
   ================================================================ */

:root {
    /* --- Paleta de Colores --- */
    --color-dark-purple: #2D1B4C;
    --color-medium-purple: #4A2E80;
    --color-light-purple: #BE5CFF;
    --color-neon-purple: #BE5CFF;
    --color-dark-bg: #1A0A33;
    --color-card-bg: #4A2E80;
    --color-sidebar-bg: #000000;
    --color-light-pink: #FF5C8D;
    
    /* --- Colores de Texto --- */
    --color-text-white: #FFFFFF;
    --color-text-light-grey: #D0D0D0;
    --color-text-grey: #D0D0D0;
    --color-text-placeholder: #999999;
    
    /* --- Colores de Estado --- */
    --color-success: #10B981;
    --color-error: #EF4444;
    --color-warning: #F59E0B;
    --color-info: #3B82F6;
    --error-red: #e74c3c;       /* rojo para errores */
    --neon-purple: #7c3aed;     /* ejemplo usado en borde izquierdo */
    --text-grey: #6b6b6b;       /* gris para textos secundarios */
    
    /* --- Espaciado (Sistema de 8px) --- */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 1rem;       /* 16px */
    --space-lg: 1.5rem;     /* 24px */
    --space-xl: 2rem;       /* 32px */
    --space-2xl: 3rem;      /* 48px */
    --space-3xl: 4rem;      /* 64px */
    
    /* --- Tipografía --- */
    --font-family-base: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    
    /* --- Pesos de Fuente --- */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* --- Radios de Borde --- */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    
    /* --- Sombras --- */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* --- Breakpoints (para referencia en comentarios) --- */
    /* sm: 640px */
    /* md: 768px */
    /* lg: 1024px */
    /* xl: 1280px */
    
    /* --- Z-index Scale --- */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

/* ================================================================
   2. RESET Y BASE STYLES
   ================================================================ */

/* Reset básico para consistencia entre navegadores */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* HTML y Body - Base responsiva */
html {
    /* Previene zoom horizontal en iOS */
    -webkit-text-size-adjust: 100%;
    /* Mejora renderizado de fuentes */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--color-text-white);
    
    /* Fondo degradado responsivo */
    background: linear-gradient(135deg, var(--color-dark-purple), var(--color-dark-bg));
    background-attachment: fixed; /* Mantiene el fondo fijo durante scroll */
    
    /* Layout flex para sticky footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* Usa dynamic viewport height cuando esté disponible */
    
    /* Previene scroll horizontal en móviles */
    overflow-x: hidden;
}

/* Mejoras de accesibilidad */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
}

/* Estilos base para enlaces */
a {
    color: var(--color-light-purple);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: var(--color-neon-purple);
    outline: none;
}

/* ================================================================
   3. LAYOUT PRINCIPAL (MOBILE-FIRST)
   ================================================================ */

/* Contenedor principal - Diseño mobile-first */
.container {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 0 var(--space-md);
    
    /* En móviles: stack vertical */
    display: flex;
    flex-direction: column;
    border-radius: 0; /* Sin bordes redondeados en móvil */
    box-shadow: none; /* Sin sombra en móvil */
    min-height: 100vh;
    min-height: 100dvh;
}

/* Landing page container */
.landing-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-lg);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Main content area */
main {
    flex-grow: 1;
    width: 100%;
    padding: var(--space-lg) 0 var(--space-3xl) 0; /* Espacio extra abajo para footer */
}

/* Secciones de página */
.page-section {
    padding: var(--space-xl) var(--space-md);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ================================================================
   4. DASHBOARD LAYOUT - MOBILE-FIRST
   ================================================================ */

/* Dashboard container - Mobile: vertical stack */
.dashboard-container {
    display: flex;
    flex-direction: column; /* Mobile: sidebar abajo, contenido arriba */
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

/* Sidebar - Mobile: horizontal scroll en la parte inferior */
.sidebar {
    /* Mobile: posición en la parte inferior */
    order: 2;
    
    width: 100%;
    height: auto;
    background-color: var(--color-sidebar-bg);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    
    /* Permitir scroll horizontal en móviles */
    overflow-x: auto;
    overflow-y: hidden;
    
    /* Flex para items horizontales en móvil */
    display: flex;
    flex-direction: row;
    
    /* Ocultar scrollbar pero mantener funcionalidad */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

/* Logo en sidebar - Mobile: más compacto */
.sidebar-logo {
    /* Mobile: reducir padding */
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-neon-purple);
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Mobile: no shrink */
    flex-shrink: 0;
    white-space: nowrap;
}

.sidebar-logo img {
    width: 2rem; /* 32px - más pequeño en móvil */
    height: auto;
    margin-right: var(--space-sm);
}

/* Navegación en sidebar */
.sidebar nav {
    display: flex;
    flex-direction: row; /* Mobile: horizontal */
    gap: var(--space-xs);
    padding: 0 var(--space-md);
    
    /* Permitir scroll si es necesario */
    overflow-x: auto;
    flex-grow: 1;
}

/* Items de navegación */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Mobile: padding más compacto */
    padding: var(--space-md) var(--space-lg);
    margin: 0; /* Sin margin en mobile */
    
    background-color: transparent;
    color: var(--color-text-white);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    
    /* Mobile: no wrap del texto */
    white-space: nowrap;
    flex-shrink: 0;
    
    /* Bordes redondeados */
    border-radius: var(--radius-md);
    
    /* Transiciones suaves */
    transition: all 0.2s ease;
}

/* Estados del nav-item */
.nav-item:hover {
    background-color: rgba(74, 46, 128, 0.5);
    transform: translateY(-1px);
}

.nav-item.active {
    background-color: var(--color-medium-purple);
    box-shadow: 0 2px 0 var(--color-neon-purple); /* Mobile: shadow abajo en lugar de izquierda */
}

/* Contenido principal del dashboard */
.main-content, .profile-main-content {
    /* Mobile: contenido va arriba */
    order: 1;
    
    flex-grow: 1;
    padding: var(--space-lg);
    background: transparent;
    width: 100%;
    
    /* Evitar overflow horizontal */
    overflow-x: hidden;
}

/* ================================================================
   5. SECCIONES DE LANDING (LEFT/RIGHT)
   ================================================================ */

/* Sección izquierda - Mobile: arriba */
.left-section {
    /* Mobile: ocupa todo el ancho */
    width: 100%;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Mobile: centrado */
    text-align: center; /* Mobile: texto centrado */
    
    padding: var(--space-2xl) var(--space-lg);
    background: var(--color-dark-purple);
    
    /* Mobile: sin bordes redondeados */
    border-radius: 0;
    
    position: relative;
    z-index: 1;
}

/* Logo en sección izquierda */
.logo {
    /* Mobile: centrado en lugar de absolute */
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.logo img {
    width: 3.5rem; /* 56px */
    height: auto;
}

.logo-text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-left: var(--space-sm);
}

/* Título principal - Responsivo */
.main-title {
    font-size: var(--font-size-3xl); /* Mobile: más pequeño */
    font-weight: var(--font-weight-bold);
    margin: 0 0 var(--space-md) 0;
    line-height: 1.2;
}

/* Slogan - Responsivo */
.slogan {
    font-size: var(--font-size-lg); /* Mobile: más pequeño */
    font-weight: var(--font-weight-light);
    margin-bottom: var(--space-sm);
}

/* Sección derecha - Mobile: abajo */
.right-section {
    /* Mobile: ocupa todo el ancho */
    width: 100%;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    background: var(--color-medium-purple);
    padding: var(--space-2xl) var(--space-lg);
    
    position: relative;
    z-index: 2;
}

/* ================================================================
   6. TARJETAS DE FORMULARIO
   ================================================================ */

/* Tarjeta de registro/login - Responsiva */
.register-card {
    background: var(--color-card-bg);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    
    /* Mobile: ocupa todo el ancho disponible */
    width: 100%;
    max-width: 400px;
    
    /* Mobile: sin transformaciones */
    transform: none;
    
    position: relative;
    z-index: 2;
    
    /* Sombra suave */
    box-shadow: var(--shadow-xl);
}

/* Enlaces de acceso */
.access-link {
    text-align: center;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
    color: var(--color-text-light-grey);
}

.access-link a {
    color: var(--color-light-purple);
    font-weight: var(--font-weight-semibold);
}

/* Títulos en tarjetas */
.register-card h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
    text-align: center;
    font-weight: var(--font-weight-bold);
}

.subtitle {
    margin-bottom: var(--space-lg);
    text-align: center;
    color: var(--color-text-light-grey);
    font-size: var(--font-size-sm);
}

/* ================================================================
   7. FORMULARIOS - COMPONENTES RESPONSIVOS
   ================================================================ */

/* Grupos de input - Espaciado responsivo */
.input-group {
    margin-bottom: var(--space-lg);
    width: 100%;
}

/* Inputs base - Totalmente responsivos */
.input-group input,
.input-group select,
.input-select {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: 1.5;
    
    /* Importante para móviles: evita zoom en iOS */
    font-size: 16px;
    
    box-sizing: border-box;
    transition: all 0.2s ease;
    
    /* Mejoras de accesibilidad */
    outline: none;
}

/* Estados de input */
.input-group input:focus,
.input-group select:focus,
.input-select:focus {
    border-color: var(--color-neon-purple);
    box-shadow: 0 0 0 3px rgba(190, 92, 255, 0.1);
    background-color: white;
}

.input-group input:invalid {
    border-color: var(--color-error);
}

/* Placeholder styling */
.input-group input::placeholder {
    color: var(--color-text-placeholder);
    opacity: 0.7;
}

/* Select específico - Con arrow personalizada */
.input-select {
    appearance: none;
    cursor: pointer;
    
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.75rem;
    padding-right: var(--space-2xl);
}

/* Checkbox groups - Layout responsivo */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-sm);
    color: var(--color-text-light-grey);
    
    /* Mobile: permitir wrap */
    flex-wrap: wrap;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.125rem; /* Alineación con primera línea de texto */
    flex-shrink: 0;
}

.checkbox-group label {
    flex-grow: 1;
    line-height: 1.4;
}

/* Nota de campo requerido */
.required-field-note {
    font-size: var(--font-size-xs);
    color: #FFC0CB;
    margin-top: var(--space-xs);
    width: 100%;
    margin-left: var(--space-lg);
}

/* ================================================================
   8. BOTONES - SISTEMA RESPONSIVO
   ================================================================ */

/* Botón base responsivo */
.submit-button,
.action-btn,
.profile-button,
.download-btn,
.create-post-btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    
    background: linear-gradient(135deg, var(--color-neon-purple), #A34AFF);
    color: var(--color-text-white);
    
    border: none;
    border-radius: var(--radius-md);
    
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    text-align: center;
    
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Evitar zoom en móviles */
    touch-action: manipulation;
    
    /* Accesibilidad */
    outline: none;
    
    /* Full width en mobile por defecto */
    width: 100%;
}

/* Estados de botón */
.submit-button:hover,
.action-btn:hover,
.download-btn:hover,
.create-post-btn:hover {
    background: linear-gradient(135deg, #A34AFF, #8B35FF);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.submit-button:active,
.action-btn:active {
    transform: translateY(0);
}

.submit-button:disabled,
.action-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Botón secundario */
.action-btn.secondary,
.clear-btn {
    background: transparent;
    border: 2px solid var(--color-text-grey);
    color: var(--color-text-grey);
}

.action-btn.secondary:hover,
.clear-btn:hover {
    border-color: var(--color-neon-purple);
    color: var(--color-neon-purple);
    background: rgba(190, 92, 255, 0.1);
}

/* ================================================================
   9. COMPONENTES ESPECÍFICOS - RESPONSIVOS
   ================================================================ */

/* Headers de sección */
.cert-header,
.exam-header,
.offer-header,
.social-header,
.courses-header {
    color: var(--color-neon-purple);
    font-size: var(--font-size-2xl); /* Mobile: más pequeño */
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-medium-purple);
    
    /* Responsive text */
    line-height: 1.2;
}

/* Cards/Items - Layout responsivo */
.cert-item,
.exam-card,
.offer-item,
.post-card {
    background-color: rgba(74, 46, 128, 0.3);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(190, 92, 255, 0.2);
    
    /* Mobile: stack vertical */
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    
    /* Evitar overflow */
    overflow: hidden;
    word-wrap: break-word;
}

.cert-item:hover,
.exam-card:hover,
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Grid systems - Responsivos */
.exam-grid,
.faqs-grid {
    display: grid;
    gap: var(--space-lg);
    
    /* Mobile: 1 columna */
    grid-template-columns: 1fr;
    
    /* Auto-fit con mínimo responsivo */
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

/* Profile específico */
.profile-card {
    background: rgba(74, 46, 128, 0.3);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(190, 92, 255, 0.2);
    text-align: center;
    
    /* Mobile: reducir padding */
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 columna */
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
}

/* ================================================================
   10. MENSAJES Y NOTIFICACIONES
   ================================================================ */

/* Sistema de mensajes responsivo */
.message-box,
.notification {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    margin-bottom: var(--space-lg);
    
    /* Mobile: full width */
    width: 100%;
    box-sizing: border-box;
    
    transition: all 0.3s ease;
}

/* Notificaciones flotantes */
.notification {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    left: var(--space-lg); /* Mobile: también left para centrar */
    
    background: var(--color-neon-purple);
    color: var(--color-text-white);
    
    z-index: var(--z-toast);
    box-shadow: var(--shadow-xl);
    
    animation: slideInTop 0.3s ease;
}

/* Estados de mensaje */
.message-box.success,
.notification.success {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--color-success);
    color: var(--color-success);
}

.message-box.error,
.notification.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--color-error);
    color: var(--color-error);
}

.message-box.info {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid var(--color-info);
    color: var(--color-info);
}

/* ================================================================
   11. FOOTER RESPONSIVO
   ================================================================ */

.main-footer {
    background-color: var(--color-dark-bg);
    color: var(--color-text-light-grey);
    padding: var(--space-xl) var(--space-lg);
    
    width: 100%;
    text-align: center;
    font-size: var(--font-size-sm);
    
    /* Sticky footer */
    margin-top: auto;
    
    /* Evitar shrink */
    flex-shrink: 0;
}

.footer-content p {
    margin: var(--space-xs) 0;
}

/* ================================================================
   12. UTILIDADES Y ESTADOS ESPECIALES
   ================================================================ */

/* Loading states */
.loading {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-grey);
}

.loading::after {
    content: "";
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-neon-purple);
    animation: spin 1s ease-in-out infinite;
    margin-left: var(--space-sm);
}

/* Estados vacíos */
.no-posts,
.no-data {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--color-text-grey);
    background: rgba(74, 46, 128, 0.2);
    border-radius: var(--radius-lg);
    border: 2px dashed rgba(190, 92, 255, 0.3);
}

.no-posts h3,
.no-data h3 {
    color: var(--color-neon-purple);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-xl);
}

/* Error messages */
.error-message {
    background-color: var(--color-error);
    color: white;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    text-align: center;
    font-weight: var(--font-weight-semibold);
}

/* ================================================================
   13. ANIMATIONS
   ================================================================ */

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

@keyframes slideInTop {
    from { 
        opacity: 0; 
        transform: translateY(-100%); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

/* ================================================================
   14. MEDIA QUERIES - MOBILE-FIRST APPROACH
   ================================================================ */

/* ================================
   SMALL MOBILE (320px - 480px)
   ================================ */
@media (max-width: 30em) { /* 480px */
    :root {
        /* Ajustar espaciado para pantallas muy pequeñas */
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    
    .main-title {
        font-size: var(--font-size-2xl);
    }
    
    .slogan {
        font-size: var(--font-size-base);
    }
    
    .register-card {
        padding: var(--space-lg);
    }
    
    .sidebar-logo {
        font-size: var(--font-size-base);
    }
    
    .nav-item {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-xs);
    }
}

/* ================================
   LARGE MOBILE (481px - 640px)
   ================================ */
@media (min-width: 30.0625em) { /* 481px */
    .cert-item,
    .post-card {
        /* Permitir layout horizontal en móviles grandes */
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .cert-details {
        flex-grow: 1;
    }
    
    .cert-actions {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }
}

/* ================================
   SMALL TABLET (641px - 768px)
   ================================ */
@media (min-width: 40.0625em) { /* 641px */
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .profile-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .action-btn {
        width: auto;
        min-width: 150px;
    }
    
    .notification {
        left: auto; /* Quitar left en tablets */
        max-width: 400px;
    }
}

/* ================================
   TABLET (769px - 1024px)
   ================================ */
@media (min-width: 48.0625em) { /* 769px */
    
    /* Dashboard layout: sidebar a la izquierda */
    .dashboard-container {
        flex-direction: row;
    }
    
    .sidebar {
        /* Tablet: sidebar vertical a la izquierda */
        order: 1;
        width: 250px;
        height: 100vh;
        height: 100dvh;
        
        /* Volver a layout vertical */
        flex-direction: column;
        overflow-x: visible;
        overflow-y: auto;
        
        /* Shadow a la derecha */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar nav {
        flex-direction: column;
        padding: 0;
        overflow-x: visible;
    }
    
    .nav-item {
        width: 100%;
        justify-content: flex-start;
        padding: var(--space-lg) var(--space-xl);
        margin-bottom: var(--space-xs);
        white-space: normal;
    }
    
    .nav-item.active {
        box-shadow: 5px 0 0 var(--color-neon-purple) inset;
    }
    
    .main-content,
    .profile-main-content {
        order: 2;
        padding: var(--space-2xl);
    }
    
    /* Landing page: lado a lado */
    .container {
        flex-direction: row;
        max-width: 1200px;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-xl);
        overflow: hidden;
    }
    
    .left-section {
        flex: 1.5;
        text-align: left;
        border-top-left-radius: var(--radius-xl);
        border-bottom-left-radius: var(--radius-xl);
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    .logo {
        position: absolute;
        top: var(--space-2xl);
        left: var(--space-2xl);
        margin-bottom: 0;
    }
    
    .right-section {
        flex: 0.7;
        border-top-right-radius: var(--radius-xl);
        border-bottom-right-radius: var(--radius-xl);
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
    
    .register-card {
        transform: translateX(-15%);
        max-width: 380px;
    }
    
    /* Headers más grandes */
    .cert-header,
    .exam-header,
    .social-header {
        font-size: var(--font-size-3xl);
    }
    
    .main-title {
        font-size: var(--font-size-4xl);
    }
}

/* ================================
   SMALL DESKTOP (1025px - 1280px)
   ================================ */
@media (min-width: 64.0625em) { /* 1025px */
    
    .page-section {
        padding: var(--space-3xl) var(--space-2xl);
    }
    
    .main-content,
    .profile-main-content {
        padding: var(--space-3xl);
    }
    
    /* Grids con más columnas */
    .exam-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .faqs-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    /* Botones no full-width por defecto */
    .submit-button,
    .action-btn {
        width: auto;
        min-width: 200px;
    }
    
    /* Formularios más anchos */
    .register-card {
        max-width: 420px;
    }
}

/* ================================
   LARGE DESKTOP (1281px+)
   ================================ */
@media (min-width: 80.0625em) { /* 1281px */
    
    .container {
        max-width: 1400px;
    }
    
    .page-section {
        max-width: 1400px;
    }
    
    /* Títulos aún más grandes */
    .main-title {
        font-size: 5rem;
    }
    
    .cert-header,
    .exam-header,
    .social-header {
        font-size: 3rem;
    }
    
    /* Sidebar más ancha */
    .sidebar {
        width: 280px;
    }
    
    /* Grid con más columnas */
    .exam-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* ================================
   EXTRA LARGE SCREENS (1920px+)
   ================================ */
@media (min-width: 120em) { /* 1920px */
    .container,
    .page-section {
        max-width: 1600px;
    }
    
    /* Aumentar tamaños base para pantallas muy grandes */
    :root {
        --font-size-base: 1.125rem; /* 18px */
        --space-md: 1.25rem;
        --space-lg: 2rem;
        --space-xl: 2.5rem;
        --space-2xl: 3.5rem;
        --space-3xl: 5rem;
    }
}

/* ================================================================
   15. PRINT STYLES
   ================================================================ */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .sidebar,
    .nav-item,
    button,
    .action-btn,
    .submit-button {
        display: none;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .main-content {
        padding: 0;
        width: 100%;
    }
}

/* ================================================================
   16. REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ================================================================
   17. HIGH CONTRAST MODE
   ================================================================ */

@media (prefers-contrast: more) {
    :root {
        --color-neon-purple: #FF00FF;
        --color-light-purple: #FF00FF;
        --color-text-white: #FFFFFF;
        --color-text-grey: #CCCCCC;
    }
    
    .nav-item,
    .action-btn,
    .submit-button {
        border: 2px solid;
    }
}


.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.modal-content {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    max-width: 500px;
    width: 90%;
    color: var(--color-text-white);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.close-btn {
    background: transparent;
    color: var(--color-text-white);
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
}


.close-btn:hover {
    color: #fff;
}

.action-btn.secondary {
    background-color: #6c63ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.action-btn.secondary:hover {
    background-color: #574ee8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== PERFIL - Sección de CV ===== */

.offer-item h3 {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: #e0c4ff;
}

.offer-item h3::before {
    content: " ";
    margin-right: 8px;
}

.offer-item p {
    color: #bfbfc9;
    margin-bottom: 1rem;
}

/* Campos de contacto */
.input-field {
    width: 100%;
    background-color: #2a1750;
    border: 1px solid #593c8f;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    margin-bottom: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
}

.input-field::placeholder {
    color: #9a8fb5;
}

.input-field:focus {
    outline: none;
    border-color: #a461ff;
    box-shadow: 0 0 6px #a461ff66;
}

/* Botón CV */
#generateCVBtn {
    width: 100%;
    background: linear-gradient(90deg, #a461ff, #be67ff);
    border: none;
    color: #fff;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.25s, transform 0.1s;
}

#generateCVBtn:hover {
    background: linear-gradient(90deg, #b877ff, #d06bff);
    transform: translateY(-1px);
}

#generateCVBtn:active {
    transform: translateY(0);
}

/* Contenedor */
.offer-item {
    background-color: #1c1040;
    border: 1px solid #3c2a72;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(164, 97, 255, 0.05);
}

/* Margen superior para la sección del CV */
#generateCVBtn,
.input-field {
    display: block;
}

.cert-list li {
    list-style: none;
    background-color: #281357;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 8px 12px;
    color: #d4c7f7;
    border-left: 3px solid #a461ff;
}
.profile-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #a461ff;
}

/* === RED SOCIAL - TruePath UI mejorada === */
.create-post {
    background: rgba(74, 46, 128, 0.3);
    border: 1px solid rgba(190, 92, 255, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.create-post h3 {
    color: #dcb8ff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.post-textarea {
    width: 100%;
    height: 120px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #623b8f;
    background: #2a1750;
    color: white;
    font-family: 'Montserrat', sans-serif;
    resize: none;
    margin-bottom: 1rem;
}

.post-file {
    display: block;
    color: #ccc;
    margin-bottom: 10px;
}

.post-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.post-controls .buttons {
    display: flex;
    gap: 10px;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* === Tarjetas de publicación === */
.post-card {
    background: rgba(74, 46, 128, 0.4);
    border: 1px solid rgba(190, 92, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e7d4ff;
    font-weight: 600;
}

.post-header .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-media {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.post-content {
    color: #ddd;
    line-height: 1.5;
    font-size: 0.95rem;
}

.post-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.post-action-btn {
    background: rgba(190, 92, 255, 0.2);
    border: 1px solid #be5cff;
    border-radius: 6px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.post-action-btn:hover {
    background: rgba(190, 92, 255, 0.4);
}

/* === Comentarios === */
.comment-box {
    margin-top: 10px;
    background: rgba(50, 25, 100, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
}

.comment-box input {
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}

.comment-empty {
    color: #bbb;
    font-style: italic;
    font-size: 0.85rem;
    margin-top: 6px;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #a461ff;
    object-fit: cover;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.username {
    font-weight: 600;
    color: #fff;
}

.time {
    font-size: 0.8rem;
    color: #bbb;
}

.post-actions button.liked {
    background: rgba(190, 92, 255, 0.5);
}


/* === Botones de publicación === */
.create-post .buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.create-post-btn {
    background: linear-gradient(90deg, #a461ff, #be67ff);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.create-post-btn:hover {
    background: linear-gradient(90deg, #b877ff, #d06bff);
    box-shadow: 0 0 10px rgba(190, 92, 255, 0.4);
    transform: translateY(-1px);
}

.clear-btn {
    border: 2px solid #be67ff;
    color: #be67ff;
    border-radius: 8px;
    background: transparent;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.clear-btn:hover {
    background: rgba(190, 92, 255, 0.1);
    color: #fff;
    box-shadow: 0 0 6px rgba(190, 92, 255, 0.3);
}

/* === Comentarios en publicaciones === */
.comment-box {
    background: rgba(74, 46, 128, 0.25);
    border: 1px solid rgba(190, 92, 255, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-top: 14px;
    display: none; /* por defecto oculto */
}

.comment-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(190, 92, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    padding: 8px 10px;
    font-size: 0.9rem;
    outline: none;
    margin-bottom: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-box input:focus {
    border-color: #be67ff;
    box-shadow: 0 0 6px rgba(190, 92, 255, 0.4);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
}

.comment-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 6px 10px;
    color: #dcdcdc;
    font-size: 0.9rem;
    line-height: 1.4;
}

.comment-author {
    font-weight: 600;
    color: #be67ff;
    margin-right: 6px;
}

.section-header {
    color: var(--color-neon-purple);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-medium-purple);
    line-height: 1.2;
}

/* ================================================================
   FIN DEL ARCHIVO CSS RESPONSIVO
   ================================================================ */
