/* ====================
   Reset y Variables Generales
   ==================== */
:root {
    --color-bg: #000000;
    --color-bg-alt: #09090b; /* zinc-950 */
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.6);
    --color-border: rgba(255, 255, 255, 0.1);
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
  
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.relative-z {
    position: relative;
    z-index: 10;
}

/* ====================
   Navegación
   ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    height: 80px;
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 0.375rem;
    object-fit: cover;
}

.logo-text {
    font-weight: 300;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
    font-style: italic;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.contact-link .text-code {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.contact-link:hover .text-normal {
    display: none;
}

.contact-link:hover .text-code {
    display: inline;
}

/* ====================
   Botón del Menú Móvil
   ==================== */
.menu-btn {
    display: none; /* Oculto en PC */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 60;
}

.menu-btn span {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Comportamiento solo en Celulares */
@media (max-width: 767px) {
    .menu-btn {
        display: flex; /* Muestra las 3 rayitas en móvil */
    }

    .nav-links {
        display: none; /* Oculta los links por defecto en móvil */
        position: absolute;
        top: 80px; /* Debajo de la barra */
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--color-border);
    }

    /* Esta clase la activaremos con JavaScript */
    .nav-links.active {
        display: flex;
    }
}

/* ====================
   Sección Hero
   ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #000000, var(--color-bg-alt));
    padding-top: 5rem;
    text-align: center;
}

/* El patrón de cuadricula sutil de fondo */
.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 4rem 4rem;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, #000 70%, transparent 120%);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, #000 70%, transparent 120%);
}

.hero-logo-wrapper {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.hero-logo-large {
    width: 250px;
    height: 250px;
    border-radius: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .hero-title { font-size: 4.5rem; }
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 0.025em;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.divider .line {
    height: 1px;
    width: 3rem;
    background-color: rgba(255, 255, 255, 0.2);
}

.divider .dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
}

.hero-description {
    color: var(--color-text-muted);
    font-weight: 300;
    letter-spacing: 0.025em;
}

.hero-buttons {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.btn {
    padding: 0.75rem 2rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: #ffffff;
    color: #000000;
    font-weight: 500;
    border: none; /* Asegurar que no tenga borde */
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 300;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.hero-gradient-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8rem;
    background: linear-gradient(to top, #000000, transparent);
}

/* ====================
   Sección Servicios
   ==================== */
.services {
    padding: 6rem 0;
    background-color: #000000;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .section-header h2 { font-size: 3rem; }
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    font-weight: 300;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 1 / 1;
    background: linear-gradient(to bottom right, #18181b, #09090b);
    border: 1px solid var(--color-border);
    transition: border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.card:hover .card-bg {
    opacity: 0.5;
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #000000, rgba(0,0,0,0.5), transparent);
}

.card-content {
    position: relative;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.icon {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.card-content h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 300;
}

/* Tarjeta especial: Desarrollo Web */
.card-code {
    background: linear-gradient(to bottom right, #09090b, #000000);
}

.code-bg {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    overflow: hidden;
    line-height: 1.6;
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tag {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* ====================
   Sección Contacto
   ==================== */
.contact {
    padding: 6rem 0;
    background: linear-gradient(to bottom, #000000, var(--color-bg-alt));
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    background-color: rgba(9, 9, 11, 0.5);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(9, 9, 11, 0.8);
}

.icon-wrapper {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease;
}

.contact-card:hover .icon-wrapper {
    background-color: rgba(255, 255, 255, 0.1);
}

.icon-small {
    color: rgba(255, 255, 255, 0.8);
}

.contact-card h3 {
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 300;
}

/* ====================
   Footer
   ==================== */
.footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    width: 100%;
}

.footer p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    font-weight: 300;
}

/* ====================
   Estilos específicos de Biblioteca / Admin
   ==================== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #ffffff;
}

/* Botonera estilo "Interruptor / Switch" moderno y CENTRADA */
.role-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.35rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: max-content; /* Esto fuerza a que se adapte al contenido */
    margin: 0 auto 2.5rem auto; /* Esto asegura que el margin: 0 auto la centre */
}

.role-toggle .btn {
    min-width: 120px;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.5rem;
    font-weight: 400;
}

.role-toggle .btn-primary {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.role-toggle .btn-outline {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.5);
}

.role-toggle .btn-outline:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Tarjeta elegante */
.login-card {
    background: linear-gradient(145deg, #121214, #09090b);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

/* Candado con resplandor sutil */
.lock-icon-wrapper {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
    color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Formulario minimalista */
.login-form label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.login-form input {
    width: 100%;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 0.5rem;
    padding: 0 1rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.login-form input:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

/* ====================
   Estilos del Modal Elegante (Contraseña)
   ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Oculto por defecto con animación */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 90%;
    max-width: 400px;
    background: linear-gradient(145deg, #121214, #09090b);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    
    /* Animación de entrada desde abajo */
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

/* ============================================================
   MEJORAS ESTÉTICAS 2026
   (tipografía, acento dorado, animaciones y secciones nuevas)
   ============================================================ */

:root {
    --color-accent: #d4af7a;          /* dorado cálido */
    --color-accent-soft: rgba(212, 175, 122, 0.12);
    --color-accent-border: rgba(212, 175, 122, 0.35);
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Tipografía refinada: serif elegante para títulos */
.hero-title,
.section-header h2,
.section-header h1 {
    font-family: var(--font-serif);
    letter-spacing: 0.01em;
}

.hero-title {
    background: linear-gradient(120deg, #ffffff 40%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #ffffff; /* respaldo para navegadores viejos */
}

/* Texto acentuado dentro de títulos */
.text-accent {
    color: var(--color-accent);
    -webkit-text-fill-color: var(--color-accent);
    font-style: italic;
}

/* Etiqueta pequeña sobre los títulos de sección */
.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

/* Divisor con acento dorado */
.divider .dot {
    background-color: var(--color-accent);
}

/* Botón con acento dorado */
.btn-accent {
    background-color: transparent;
    border: 1px solid var(--color-accent-border);
    color: var(--color-accent);
    font-weight: 400;
}

.btn-accent:hover {
    background-color: var(--color-accent-soft);
    border-color: var(--color-accent);
    box-shadow: 0 0 25px rgba(212, 175, 122, 0.15);
}

/* Hover con realce en tarjetas existentes */
.card,
.contact-card,
.login-card {
    transition: border-color 0.3s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover,
.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.9);
}

.contact-card:hover .icon-wrapper {
    background-color: var(--color-accent-soft);
}

.contact-card:hover .icon-small {
    color: var(--color-accent);
}

/* ====================
   Animación de aparición (Scroll Reveal)
   ==================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Escalonado sutil dentro de las cuadrículas */
.services-grid .reveal:nth-child(2),
.it-grid .reveal:nth-child(2),
.team-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.services-grid .reveal:nth-child(3),
.it-grid .reveal:nth-child(3),
.team-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.services-grid .reveal:nth-child(4),
.it-grid .reveal:nth-child(4),
.team-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.it-grid .reveal:nth-child(5),
.team-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.it-grid .reveal:nth-child(6),
.team-grid .reveal:nth-child(6) { transition-delay: 0.4s; }
.team-grid .reveal:nth-child(7) { transition-delay: 0.48s; }
.team-grid .reveal:nth-child(8) { transition-delay: 0.56s; }

/* Respeta la preferencia de reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ====================
   Sección: Desarrollo IT con IA
   ==================== */
.it-services {
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(to bottom, var(--color-bg-alt), #000000);
    overflow: hidden;
}

.it-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(212, 175, 122, 0.07), transparent 70%);
    pointer-events: none;
}

.it-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .it-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .it-grid { grid-template-columns: repeat(3, 1fr); }
}

.it-card {
    position: relative;
    padding: 2rem;
    border-radius: 1rem;
    background: linear-gradient(160deg, #101014, #09090b);
    border: 1px solid var(--color-border);
    transition: border-color 0.3s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.it-card:hover {
    border-color: var(--color-accent-border);
    transform: translateY(-4px);
    box-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 122, 0.06);
}

.it-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.875rem;
    background: var(--color-accent-soft);
    border: 1px solid var(--color-accent-border);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.it-card:hover .it-icon {
    transform: scale(1.08) rotate(-3deg);
}

.it-card h3 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.it-card p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.65;
}

.it-card .tags {
    margin-top: 1.25rem;
}

.it-card .tag {
    color: var(--color-accent);
    background-color: var(--color-accent-soft);
    border: 1px solid rgba(212, 175, 122, 0.15);
}

/* ====================
   Sección: Equipo Multidisciplinario
   ==================== */
.team {
    padding: 6rem 0;
    background-color: #000000;
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .team-grid { grid-template-columns: repeat(4, 1fr); }
}

.team-card {
    padding: 1.75rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    text-align: left;
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.35s ease;
}

.team-card:hover {
    border-color: var(--color-accent-border);
    background: rgba(212, 175, 122, 0.04);
    transform: translateY(-4px);
}

.team-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: background-color 0.3s ease;
}

.team-card:hover .team-icon {
    background: var(--color-accent-soft);
}

.team-card h3 {
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.team-card p {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1.6;
}

.team-cta {
    margin-top: 3.5rem;
    text-align: center;
}

.team-cta p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.team-cta .btn {
    display: inline-block;
}

/* Enlace activo de navegación con subrayado dorado sutil */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ============================================================
   REESTRUCTURACIÓN: Fotografía / Tecnología separadas
   ============================================================ */

/* --- Puente hacia la página IT (en index.html) --- */
.it-teaser {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #000000, var(--color-bg-alt));
}

.it-teaser-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--color-border);
    background: linear-gradient(160deg, #0e0e12, #09090b);
    padding: 3.5rem 2.5rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.it-teaser-card:hover {
    border-color: var(--color-accent-border);
}

.it-teaser-card .code-bg {
    text-align: left;
}

.it-teaser-content h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    margin: 0.5rem 0 1rem 0;
}

.it-teaser-content p {
    color: var(--color-text-muted);
    font-size: 1rem;
    font-weight: 300;
    max-width: 620px;
    margin: 0 auto 2rem auto;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .it-teaser-content h2 { font-size: 2.5rem; }
}

/* --- Hero de la página IT (más compacto, sin logo gigante) --- */
.hero-it {
    min-height: 88vh;
}

.hero-it .hero-title {
    margin-top: 1.5rem;
}

/* --- Sección Historia personal --- */
.historia {
    padding: 6rem 0;
    background-color: var(--color-bg-alt);
}

.historia-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-left: 2px solid var(--color-accent-border);
}

.historia-card h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    margin: 0.75rem 0 1.5rem 0;
}

.historia-texto p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.historia-texto p:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .historia-card h2 { font-size: 2.5rem; }
}

/* --- Grilla IT de 4 tarjetas (2x2 en desktop) --- */
.it-grid-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .it-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .it-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Cómo trabajamos --- */
.proceso {
    padding: 6rem 0;
    background-color: #000000;
}

.proceso-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .proceso-grid { grid-template-columns: repeat(3, 1fr); }
}

.proceso-card {
    padding: 2rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    transition: border-color 0.3s ease, transform 0.35s ease;
}

.proceso-card:hover {
    border-color: var(--color-accent-border);
    transform: translateY(-4px);
}

.proceso-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.proceso-card h3 {
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.proceso-card p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.65;
}

/* La tarjeta-enlace de Biblioteca en servicios (index) */
a.card {
    display: block;
    color: inherit;
}

/* ============================================================
   AJUSTES v5: botón dorado, pasos con >, teaser destacado
   ============================================================ */

/* --- Botón dorado sólido (llamativo) --- */
.btn-gold {
    background: linear-gradient(135deg, #e2c290, var(--color-accent));
    color: #14100a;
    font-weight: 500;
    border: none;
    box-shadow: 0 8px 30px rgba(212, 175, 122, 0.25);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #ecd0a5, #ddb987);
    box-shadow: 0 10px 40px rgba(212, 175, 122, 0.4);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* --- Teaser IT más protagonista --- */
.it-teaser-card {
    border-color: var(--color-accent-border);
    box-shadow: 0 0 60px rgba(212, 175, 122, 0.06), inset 0 0 120px rgba(212, 175, 122, 0.03);
}

.it-teaser-card .code-bg {
    opacity: 0.06;
}

.it-teaser-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.it-teaser-badges .tag {
    color: var(--color-accent);
    background-color: var(--color-accent-soft);
    border: 1px solid rgba(212, 175, 122, 0.2);
    font-size: 0.8125rem;
    padding: 0.35rem 0.75rem;
}

/* --- Cómo trabajamos: pasos en línea con > --- */
.pasos {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.paso {
    display: flex;
    gap: 1.75rem;
    padding: 2rem 0;
    position: relative;
}

/* Línea vertical que conecta los pasos */
.paso:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 27px;
    top: 5.2rem;
    bottom: -0.5rem;
    width: 1px;
    background: linear-gradient(to bottom, var(--color-accent-border), rgba(212, 175, 122, 0.05));
}

.paso-marker {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.paso-chevron {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    border: 1px solid var(--color-accent-border);
    color: var(--color-accent);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.paso:hover .paso-chevron {
    transform: translateX(4px);
    box-shadow: 0 0 25px rgba(212, 175, 122, 0.2);
}

.paso-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: rgba(212, 175, 122, 0.6);
}

.paso-body h3 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
    padding-top: 0.75rem;
}

.paso-body p {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.7;
    max-width: 560px;
}

@media (max-width: 640px) {
    .paso { gap: 1.25rem; padding: 1.5rem 0; }
    .paso-chevron { width: 44px; height: 44px; font-size: 1rem; }
    .paso:not(:last-child)::after { left: 22px; top: 4.5rem; }
}

/* ============================================================
   FIX v6: botones que se parten en dos líneas en móvil
   Un <a> es inline: si el texto no entra, el fondo se fragmenta
   en dos cajas. inline-block mantiene el botón como una sola caja.
   ============================================================ */
.btn {
    display: inline-block;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}

/* En pantallas chicas, los botones largos ocupan el ancho disponible
   y el texto envuelve DENTRO de la caja, sin romperla */
@media (max-width: 640px) {
    .it-teaser-content .btn,
    .team-cta .btn {
        display: block;
        width: 100%;
        white-space: normal;
    }

    .btn-lg {
        padding: 0.9rem 1.5rem;
        font-size: 0.9375rem;
    }
}
