/* --- 1. Variables Globales y Tipografía --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --font-primary: 'Poppins', sans-serif;
    --color-primary: #3498db; /* Un azul más vibrante */
    --color-secondary: #2c3e50; /* Azul oscuro para fondos/texto */
    --color-text: #333;
    --color-light: #f8f9fa;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
    --border-radius: 0.5rem;
}

/* --- 2. Estilos Base Mejorados --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 70px; /* Restaurar padding para la navbar fija */
        font-family: var(--font-primary); /* Aplicar nueva fuente */
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-light); /* Fondo ligeramente gris */
    -webkit-font-smoothing: antialiased; /* Mejorar renderizado de fuentes */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600; /* Títulos más definidos */
    color: var(--color-secondary);
}

/* Ajuste de tamaño para títulos de sección */
h2.display-5 {
    font-size: 2rem; /* Reducido para móviles */
}

/* --- 3. Navbar y Footer --- */
/* Estilos adicionales que desees agregar */

/* ============================================= */
/* RESPONSIVIDAD PARA EL PANEL DE ADMINISTRACIÓN */
/* ============================================= */
@media (max-width: 768px) {
    .admin-sidebar {
        position: static; /* Cambiar de fijo a estático */
        width: 100%;
        height: auto;
        margin-bottom: 2rem;
    }

    .admin-main-content {
        margin-left: 0; /* Eliminar el margen izquierdo */
    }

    .admin-dashboard .card {
        margin-bottom: 1rem;
    }

    /* Hacer que las tablas sean desplazables horizontalmente */
    .table-responsive-admin {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Desplazamiento suave en iOS */
    }

    .table-responsive-admin > .table {
        margin-bottom: 0;
    }

    .table-responsive-admin > .table > thead > tr > th,
    .table-responsive-admin > .table > tbody > tr > th,
    .table-responsive-admin > .table > tfoot > tr > th,
    .table-responsive-admin > .table > thead > tr > td,
    .table-responsive-admin > .table > tbody > tr > td,
    .table-responsive-admin > .table > tfoot > tr > td {
        white-space: nowrap; /* Evitar que el texto de las celdas se rompa */
    }
    
    /* Ajustes para títulos en móviles */
    h2.display-5 {
        font-size: 1.75rem;
    }
    
    h1.display-3 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Ajustes para el hero section */
    .hero-section {
        min-height: 60vh;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    /* Ajustes para las tarjetas */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Ajustes para el muro de habilidades */
    .skill-item {
        width: 80px;
        padding: 0.75rem;
    }
    
    .skill-item i {
        font-size: 2rem;
    }
    
    .skill-item span {
        font-size: 0.75rem;
    }
    
    /* Ajustes para secciones */
    section {
        padding: 2rem 0;
    }
    
    /* Ajustes para el pie de página */
    footer {
        padding: 2rem 0;
    }
}

/* Estilos de la Navbar Dinámica */
.navbar {
    padding-top: 0.5rem !important; /* Reducir padding vertical */
    padding-bottom: 0.5rem !important; /* Reducir padding vertical */
    background-color: var(--color-secondary) !important; /* Fondo azul oscuro al inicio */
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.navbar.scrolled {
    background-color: white !important; /* Fondo blanco al hacer scroll */
    box-shadow: var(--shadow-soft);
}

/* Cambiar color del texto al hacer scroll */
.navbar .nav-link, .navbar .navbar-brand {
    color: var(--color-light) !important; /* Texto claro para el estado inicial */
}

.navbar.scrolled .nav-link, .navbar.scrolled .navbar-brand {
    color: var(--color-text) !important; /* Texto oscuro para el estado scroll */
}

/* Limitar tamaño del logo en la navbar */
.navbar-brand img, .navbar-brand svg {
    height: 40px; /* Altura MÁXIMA del logo */
    width: auto;
}

/* Mantener el logo y el toggler visibles */
.navbar.scrolled .navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg); /* Restaurar icono de Bootstrap */
}

/* Ajuste para el hover de los enlaces en modo scroll */
.navbar.scrolled .nav-link::after {
    background-color: var(--color-primary); /* Color del subrayado */
}

footer {
    background-color: var(--color-secondary);
    color: white;
    padding: 1.2rem 0;
}

/* --- 4. Hero Section Refinado --- */
.hero-section {
    min-height: 70vh; /* Altura del hero aumentada */
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    text-align: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)); /* Gradiente sutil */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-weight: 700;
    font-size: 3rem; /* Tamaño del título principal reducido */
    color: white;
}

/* --- 5. Tarjetas (Cards) con Mejor Diseño --- */
.card {
    border: none; /* Quitar borde por defecto */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* --- 6. Botones y Enlaces --- */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 50px; /* Botones redondeados */
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

/* --- 7. Animaciones de Scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Estilos para el Muro de Habilidades --- */
.skill-category {
    margin-bottom: 2rem;
}

.category-title {
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100px; /* Ancho fijo para cada item */
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.skill-item i {
    font-size: 3rem; /* Iconos grandes y visibles */
    color: var(--color-secondary);
}

.skill-item span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Media queries para pantallas más grandes */
@media (min-width: 769px) {
    h2.display-5 {
        font-size: 2.5rem;
    }
    
    h1.display-3 {
        font-size: 3rem;
    }
    
    .lead {
        font-size: 1.25rem;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .skill-item {
        width: 100px;
        padding: 1rem;
    }
    
    .skill-item i {
        font-size: 3rem;
    }
    
    .skill-item span {
        font-size: 0.85rem;
    }
}
