/* ============================================================
   cssIconos.css .
   Laboratorio de Iconografía CSS · Librería institucional
   Este archivo está pensado para ser leído y estudiado por:
   - Investigadores en visualización de información
   - Estudiantes de desarrollo web y diseño digital
   - Profesorado que necesita ejemplos claros y comentados
   - Responsables de sistemas institucionales y educativos
   ============================================================ */

/* ------------------------------------------------------------
   0. Estilos base compartidos con el recurso
   ------------------------------------------------------------ */

.layout {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #e5e7eb;
}

.header {
    padding: 24px 32px;
    border-bottom: 1px solid #1f2937;
    background: #0b1120;
}

.header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.subtitle {
    margin-top: 8px;
    color: #9ca3af;
    font-size: 0.95rem;
}

.main {
    padding: 24px 32px;
    max-width: 960px;
    margin: 0 auto;
}

.panel {
    margin-bottom: 24px;
    padding: 20px;
    border-radius: 16px;
    background: #020617;
    border: 1px solid #1f2937;
}

.panel h2 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
}

.panel-text {
    margin: 0 0 16px 0;
    color: #9ca3af;
    font-size: 0.95rem;
}

.icons-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.list {
    margin: 0;
    padding-left: 18px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer {
    padding: 16px 32px;
    border-top: 1px solid #1f2937;
    background: #0b1120;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Botones institucionales */
.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    background: #3b82f6;
    color: #0b1120;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    background: #22c55e;
    color: #0b1120;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: #16a34a;
}

/* ============================================================
   1. Formas básicas · width · height · border · border-radius
   Estas formas son la base de cualquier sistema visual:
   - Cuadrados y rectángulos para contenedores
   - Círculos para estados, puntos, iconos
   - Triángulos para flechas, indicadores, señales
   ============================================================ */

.box {
    width: 120px;
    height: 80px;
    background: #38bdf8;
    border-radius: 8px;
}

.circle {
    width: 80px;
    height: 80px;
    background: #22c55e;
    border-radius: 50%;
}

.triangle {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid #f97316;
}

/* ============================================================
   2. Pseudo-elementos ::before y ::after · Capas extra
   Permiten añadir detalles sin modificar el HTML:
   - Estados (online/offline)
   - Indicadores de actividad
   - Decoraciones institucionales
   ============================================================ */

.badge {
    position: relative;
    padding: 12px 24px;
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 999px;
    font-size: 0.9rem;
}

.badge::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    transform: translateY(-50%);
}

/* ============================================================
   3. clip-path · Formas complejas
   Con clip-path se pueden crear:
   - Cintas
   - Sellos
   - Insignias
   - Elementos de identidad visual
   ============================================================ */

.ribbon {
    padding: 12px 32px;
    background: #ec4899;
    color: white;
    clip-path: polygon(0 0, 100% 0, 90% 50%, 100% 100%, 0 100%);
    font-size: 0.9rem;
}

/* ============================================================
   4. Gradientes como pintura · linear-gradient
   Los gradientes permiten simular:
   - Volumen
   - Luz
   - Profundidad
   - Fondos ilustrados
   ============================================================ */

.card {
    width: 220px;
    height: 140px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1d4ed8, #22c55e);
}

/* ============================================================
   5. Transformaciones y animaciones · @keyframes
   Aquí el sistema visual se vuelve dinámico:
   - Señales de actividad
   - Indicadores de atención
   - Efectos de vida del sistema
   ============================================================ */

.pulse {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 1.4s infinite;
}

@keyframes pulse {
    0%   { transform: scale(1);   opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ============================================================
   6. Iconos tecnológicos y científicos (ejemplos)
   Estos bloques muestran cómo se pueden construir iconos
   más complejos, útiles para:
   - Centros de investigación
   - Portales educativos
   - Sistemas institucionales
   ============================================================ */

/* Átomo */
.icon-atom {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #38bdf8;
    position: relative;
}
.icon-atom::before,
.icon-atom::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #38bdf8;
    top: 0;
    left: 0;
    transform-origin: center;
}
.icon-atom::before {
    transform: rotate(45deg);
}
.icon-atom::after {
    transform: rotate(-45deg);
}

/* Microscopio */
.icon-micro {
    width: 60px;
    height: 90px;
    background: #0f172a;
    border: 3px solid #22c55e;
    border-radius: 10px;
    position: relative;
}
.icon-micro::before {
    content: "";
    position: absolute;
    width: 40px;
    height: 10px;
    background: #22c55e;
    top: 10px;
    left: 10px;
    transform: rotate(-20deg);
}
.icon-micro::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #22c55e;
    border-radius: 50%;
    bottom: 10px;
    left: 20px;
}

/* ADN */
.icon-dna {
    width: 20px;
    height: 100px;
    background: linear-gradient(#8b5cf6, #ec4899);
    border-radius: 20px;
    position: relative;
}
.icon-dna::before,
.icon-dna::after {
    content: "";
    position: absolute;
    width: 60px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #8b5cf6;
    top: 0;
}
.icon-dna::before {
    left: -40px;
}
.icon-dna::after {
    right: -40px;
}

/* Molécula */
.icon-molecule {
    width: 20px;
    height: 20px;
    background: #f97316;
    border-radius: 50%;
    position: relative;
}
.icon-molecule::before,
.icon-molecule::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background: #f97316;
    border-radius: 50%;
}
.icon-molecule::before {
    left: -30px;
    top: 20px;
}
.icon-molecule::after {
    right: -30px;
    top: 20px;
}

/* Cerebro */
.icon-brain {
    width: 80px;
    height: 60px;
    background: #ec4899;
    border-radius: 40px;
    position: relative;
}
.icon-brain::before,
.icon-brain::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 60px;
    background: #ec4899;
    border-radius: 40px;
}
.icon-brain::before {
    left: 0;
}
.icon-brain::after {
    right: 0;
}

/* Telescopio */
.icon-telescope {
    width: 80px;
    height: 10px;
    background: #3b82f6;
    transform: rotate(-20deg);
    position: relative;
}
.icon-telescope::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    left: -10px;
    top: -5px;
}
.icon-telescope::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 40px;
    background: #3b82f6;
    left: 60px;
    top: -15px;
}

/* Tubo de ensayo */
.icon-tube {
    width: 30px;
    height: 90px;
    background: #0f172a;
    border: 3px solid #38bdf8;
    border-radius: 15px;
    position: relative;
}
.icon-tube::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 40px;
    background: #38bdf8;
    bottom: 0;
    border-radius: 0 0 15px 15px;
}

/* Onda científica */
.icon-wave {
    width: 80px;
    height: 40px;
    border-radius: 40px;
    border: 3px solid #22c55e;
    position: relative;
}
.icon-wave::before {
    content: "";
    position: absolute;
    width: 80px;
    height: 40px;
    border-radius: 40px;
    border: 3px solid #22c55e;
    top: -20px;
}
