/* --- VARIABLES GLOBALES (DARK THEME) --- */
:root {
    --bg-color: #0a0a0c;
    --card-bg: #141417;
    --accent-color: #c5a880;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    
    /* Habilitar snap por proximidad en todo el documento */
    scroll-snap-type: y proximity;
    height: 100%;
}

body {
    height: 100%;
    overflow-y: overlay; /* Permite scroll natural sin reservar espacio para la barra */
}

/* Ocultar barra de scroll visualmente en todos los navegadores */
body::-webkit-scrollbar {
    display: none;
}
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- MENÚ DE NAVEGACIÓN FIJO INTERLIGENTE --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(to bottom, rgba(10,10,12,0.95) 60%, rgba(10,10,12,0));
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.hide {
    transform: translateY(-100%);
}

.navbar a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    transition: color 0.3s;
}

.navbar a:hover, 
.navbar a.active {
    color: var(--accent-color);
}

/* --- ESTRUCTURA DE LAS SECCIONES --- */
section {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start; /* Punto de anclaje */
    padding: 8rem 2rem 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(197, 168, 128, 0.15); /* Separador visual del salto */
}

section a, 
section a:visited {
    color: var(--accent-color); /* Dorado sofisticado */
    text-decoration: underline;
    text-underline-offset: 4px; /* Separa un poco la línea del texto para que se vea más limpio */
    text-decoration-color: rgba(197, 168, 128, 0.4); /* Línea dorada translúcida, menos invasiva */
    transition: text-decoration-color 0.3s ease, opacity 0.3s ease;
}

/* Estado cuando el usuario pasa el mouse sobre un enlace en el texto */
section a:hover {
    opacity: 0.85; /* Sutil cambio de brillo */
    text-decoration-color: var(--accent-color); /* La línea se vuelve completamente sólida */
}

.container {
    max-width: 1000px; /* Reducido para mejorar la lectura de textos largos */
    width: 100%;
    margin: auto;
}

h2 {
    font-size: 2.3rem;
    font-weight: 300;
    letter-spacing: 0.2rem;
    color: var(--accent-color);
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    text-align: center;
}

/* --- GRID DE CONTENIDO --- */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.text-content p {
    font-size: 1.1rem;
    line-height: 1.9; /* Mayor interlineado para facilitar lectura premium */
    color: var(--text-muted);
    margin-bottom: 1.8rem;
}

.muted-text {
    color: var(--text-muted);
}

/* --- GALERÍA DE IMÁGENES --- */
.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gallery img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 4px;
    filter: grayscale(20%) brightness(80%);
    transition: all 0.4s ease;
}

.gallery img:hover {
    filter: grayscale(0%) brightness(100%);
}

/* --- GRILLA DE TUTORIALES --- */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #1f1f23;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* --- RESPONSIVE DESIGN (MÓVILES) --- */
@media (max-width: 768px) {
    html {
        scroll-snap-type: none; /* Desactivar totalmente el snap en móvil */
    }
    
    section {
        padding: 6rem 1.5rem 4rem 1.5rem;
        display: block;
    }

    h2 {
        font-size: 1.8rem;
        text-align: left;
        margin-bottom: 1.5rem;
    }

    .grid-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery img {
        height: 150px;
    }

    .contact-form {
        padding: 1.8rem;
    }
}

/* --- ESTILO PARA TU LISTA DE ESTRUCTURA OL/LI --- */
.elegant-list {
    max-width: 800px; /* Ancho óptimo de lectura */
    margin: 0 auto;
    padding-left: 2rem; /* Espacio para que los números respiren y no se peguen al borde */
}

/* Estilo para cada uno de los 30 ítems de la lista */
.elegant-list li {
    color: var(--accent-color); /* Los números nativos toman el color dorado sofisticado */
    font-family: 'Courier New', Courier, monospace; /* Números con toque moderno/técnico */
    font-size: 1.1rem;
    font-weight: bold;
    
    /* Espaciado y separación sutil entre bloques */
    padding: 2.5rem 0 2.5rem 1rem; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); /* Línea translúcida muy fina */
    transition: border-color 0.3s ease;
}

/* Quita la línea de separación al último de los 30 ítems */
.elegant-list li:last-child {
    border-bottom: none;
}

/* El borde se ilumina levemente si el usuario pasa el cursor por encima */
.elegant-list li:hover {
    border-color: rgba(197, 168, 128, 0.3);
}

/* --- CONTROL DEL TEXTO DENTRO DE CADA LI --- */
/* Restablecemos la tipografía del texto para que no herede la del número */
.elegant-list li h3 {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 0.1rem;
    letter-spacing: 0.03rem;
    margin-top: -4px; /* Alineación perfecta con la altura del número nativo */
}

.elegant-list li p {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.85; /* Interlineado amplio para evitar fatiga visual */
    color: var(--text-muted);
    margin-bottom: 0.1rem;
    font-weight: 300;
    text-align: justify;
}

.elegant-list li p:last-child {
    margin-bottom: 0; /* Limpieza del último párrafo interno */
}

/* --- RESPONSIVE PARA TELÉFONOS --- */
@media (max-width: 768px) {
    .elegant-list {
        padding-left: 1.5rem; /* Ajuste de margen en pantallas chicas */
    }
    
    .elegant-list li {
        padding: 1.8rem 0 1.8rem 0.5rem;
    }

    .elegant-list li h3 {
        font-size: 1.15rem;
        margin-bottom: 0.6rem;
    }

    .elegant-list li p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}
