/*========== RESETEO Y BASE ==========*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at top, #2d2d2d 0%, #1a1a1a 100%);
    color: #e0e0e0;
    line-height: 1.6;
    padding-top: 100px; /* Espacio para el nav fixed */
}

/*========== SCROLLBAR PERSONALIZADA ==========*/
body::-webkit-scrollbar { 
    width: 15px;
}
body::-webkit-scrollbar-track { 
    background: #2d2d2d;
}
body::-webkit-scrollbar-thumb {
    background: rgba(245, 243, 243, 0.1);
    border-radius: 10px;
    border: 4px solid transparent;
    background-clip: content-box;
}
body::-webkit-scrollbar-thumb:hover { 
    background: rgba(255, 255, 255, 0.2);
}

/*========== NAVEGACIÓN (TU DISEÑO ACTUAL) ==========*/
nav {
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(15px); 
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

nav a, .menu-desplegable-btn {
    color: #aaa;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 8px;
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.menu-desplegable {
    position: relative;
    display: inline-block; 
}

nav a:hover, 
.menu-desplegable-btn:hover {
    color: #4db8ff;
    text-shadow: 0 0 10px rgba(77, 184, 255, 0.5);
}

.menu-desplegable-contenido {
    position: absolute;
    top: 100%;
    right: 20px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    min-width: 250px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: 0.3s ease;
    overflow: hidden;
}

.menu-desplegable:hover .menu-desplegable-contenido {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.menu-desplegable-contenido a {
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.img-home {
    display: inline-block;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.img-home img {
    width: 100%;
    height: 100%; 
    object-fit: contain;
}

.img-home:hover {
    transform: scale(1.2);
}

/*========== CONTENIDO PRINCIPAL ==========*/
h1 {
    text-align: center;
    font-size: 3rem;
    background: linear-gradient(to right, #fff, #4db8ff);
    -webkit-background-clip: text;
    background-clip: none;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

/* Layout de Grid */
#componentes, #perifericos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h2 {
    grid-column: 1 / -1;
    color: #fff;
    font-size: 2.2rem;
    border-left: 4px solid #4db8ff;
    padding-left: 15px;
    margin-top: 40px;
    margin-bottom: 10px;
}

/* Parrafo Principal */
.p-principal {
    text-align: center;
    padding: 10px 10px 10px;
}

/* Tarjetas Base */
article {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

article:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(77, 184, 255, 0.3);
}

/* Corrección para secciones de Periféricos (Entrada, Salida, etc) */
#entrada, #salida, #almacenamiento-externo {
    grid-column: 1 / -1; /* Ocupan todo el ancho */
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(77, 184, 255, 0.2);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 25px;
}

/* Títulos dentro de las secciones de periféricos */
#entrada > h3, #salida > h3, #almacenamiento-externo > h3 {
    grid-column: 1 / -1;
    font-size: 1.8rem;
    color: #fff;
    border-bottom: 1px solid rgba(77, 184, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* Descripción de la categoría */
#entrada > p, #salida > p, #almacenamiento-externo > p {
    grid-column: 1 / -1;
    font-style: italic;
    margin-bottom: 20px;
}

/* Artículos internos (los periféricos individuales) */
#entrada article, #salida article, #almacenamiento-externo article {
    background: rgba(255, 255, 255, 0.04);
    min-height: 200px;
}

/* Tipografía de Tarjetas */
article h3 {
    color: #4db8ff;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

article p {
    font-size: 0.95rem;
    color: #bbb;
    margin-bottom: 20px;
}

article ul {
    list-style: none;
    margin-bottom: 25px;
    flex-grow: 1;
}

article li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

article li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #4db8ff;
}

/*========== BOTONES ==========*/
.boton-info {
    align-self: flex-start;
    padding: 10px 25px;
    background: transparent;
    border: 1px solid #4db8ff;
    color: #4db8ff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.3s;
}

.boton-info:hover {
    background: #4db8ff;
    color: #1a1a1a;
    box-shadow: 0 5px 15px rgba(77, 184, 255, 0.4);
}

/*========== SEPARADORES Y FOOTER ==========*/
.separador {
    grid-column: 1 / -1;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    margin: 40px 0;
}

footer {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #555;
    border-top: 1px solid rgba(255,255,255,0.05);
}