@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ============================================================
   IT Progs — Estilos Globales
   Paleta oscura premium con modo alto contraste
   Google Font: Inter
   ============================================================ */

/* ==========================================
   Variables / Design Tokens
   ========================================== */
:root {
  /* Colores base */
  --accent: #00e5a0;
  --accent-hover: #00c98b;
  --accent-glow: rgba(0, 229, 160, 0.15);
  --accent-glow-strong: rgba(0, 229, 160, 0.3);

  --bg: #0a0e17;
  --bg-surface: #111827;
  --bg-card: #1a2233;
  --bg-card-hover: #1f2940;
  --bg-input: #0f1524;

  --text: #edf2f7;
  --text-secondary: #a0aec0;
  --text-muted: #718096;

  --border: #2d3748;
  --border-accent: rgba(0, 229, 160, 0.3);

  --error: #fc8181;
  --error-bg: rgba(252, 129, 129, 0.1);
  --success: #68d391;
  --success-bg: rgba(104, 211, 145, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font: 'DM Sans', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   Alto Contraste (toggle desde el header)
   ========================================== */
.alto-contraste {
  --bg: #000000;
  --bg-surface: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --bg-input: #050505;
  --text: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #b0b0b0;
  --border: #555555;
  --accent: #00ff99;
  --accent-hover: #00e088;
  --accent-glow: rgba(0, 255, 153, 0.25);
  --accent-glow-strong: rgba(0, 255, 153, 0.45);
}

.alto-contraste .form-input,
.alto-contraste .form-select {
  border-width: 2px;
}

.alto-contraste .nav-link,
.alto-contraste .form-label {
  font-weight: 600;
}

.alto-contraste .btn-submit,
.alto-contraste .btn-primary {
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ==========================================
   Reset y Base
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: 
    radial-gradient(circle at 0% 0%, rgba(0, 229, 160, 0.04) 0%, transparent 80%),
    radial-gradient(circle at 100% 100%, rgba(0, 150, 255, 0.04) 0%, transparent 80%),
    linear-gradient(135deg, #03050a 0%, #080c14 50%, #000000 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ==========================================
   App Container
   ========================================== */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.section-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================
   Header & Navbar
   ========================================== */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(26, 34, 51, 0.45); /* More transparent for glass */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Ensure Sileo toasts render above the sticky header */
[data-sileo-viewport] {
  z-index: 1100 !important;
}

.navbar {
  padding: 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1rem;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent) !important;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  display: inline-block;
  color: var(--text-secondary) !important;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent) !important;
  background: var(--accent-glow);
}

/* Botón ACCESIBILIDAD */
.btn-accesibilidad {
  margin-left: 1rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn-accesibilidad:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.btn-accesibilidad.activo {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-accesibilidad:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
  padding: 5rem 0 4rem;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 100, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.inscritos-badge {
  margin-top: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-block;
  animation: pulseGlow 3s ease-in-out infinite;
}

/* ==========================================
   Buttons
   ========================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.6rem;
  background: var(--accent);
  color: var(--bg) !important;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: #fff !important;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.6rem;
  background: transparent;
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-glow);
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  margin-top: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-submit:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-small {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--error);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger:hover {
  filter: brightness(0.95);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.nav-user-info {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.login-status {
  background: var(--bg-card);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.admin-section {
  padding-top: 2rem;
}

.admin-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-header h2 {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-submit:focus-visible,
.btn-primary:focus-visible,
.btn-outline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================
   Carousel
   ========================================== */
.carousel-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.4s ease;
}

.carousel-container:hover {
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 229, 160, 0.15);
}

.carousel-viewport {
  position: relative;
  background: #000;
}

.carousel-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.carousel-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem 1.25rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
}

.carousel-caption-overlay h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.carousel-caption-overlay p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

.carousel-controls {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: -52px;
  padding: 0 0.5rem;
  pointer-events: none;
  z-index: 2;
}

.carousel-btn {
  pointer-events: all;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
  padding-bottom: 2px;
}

.carousel-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.carousel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carousel-indicators {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--text-muted);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.carousel-dot:hover {
  border-color: var(--accent);
}

.carousel-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow-strong);
}

.carousel-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================
   Sections
   ========================================== */
.app-section,
.forms-section,
.inscritos-section {
  padding: 4rem 0;
}

.forms-section {
  background: transparent;
}

.inscritos-section {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.section-container h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.section-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ==========================================
   Forms Grid
   ========================================== */
.forms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 0.5rem;
}

/* ==========================================
   Form Card
   ========================================== */
.form-card {
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
}

.form-card:hover {
  border-color: rgba(0, 229, 160, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 229, 160, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.form-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.form-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ==========================================
   Form Elements
   ========================================== */
.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  font-family: var(--font);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-input.is-invalid {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px var(--error-bg) !important;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

/* ==========================================
   Form Messages
   ========================================== */
.form-message {
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.form-message.error {
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid rgba(252, 129, 129, 0.2);
}

.form-message.success {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid rgba(104, 211, 145, 0.2);
}

/* ==========================================
   Login Output
   ========================================== */
.login-output {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  min-height: 3.5rem;
  overflow-wrap: anywhere;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ==========================================
   Inscritos Table
   ========================================== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.inscritos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.inscritos-table thead {
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(0, 229, 160, 0.05) 100%);
}

.inscritos-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.inscritos-table td {
  padding: 0.75rem 1rem;
  color: var(--text);
  border-bottom: 1px solid rgba(45, 55, 72, 0.5);
}

.inscritos-table tbody tr {
  transition: background var(--transition);
}

.inscritos-table tbody tr:hover {
  background: rgba(0, 229, 160, 0.05);
}

.inscritos-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
  margin-top: auto;
  background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.8) 30%, var(--bg-surface) 100%);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.footer-info {
  padding: 2.5rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-academic {
  flex: 1;
}

.footer-data {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-data li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer-data li strong {
  color: var(--text);
  font-weight: 600;
}

.footer-brand {
  text-align: right;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================
   Animations
   ========================================== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================
   Focus visible global
   ========================================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .forms-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 0;
  }
}

@media (max-width: 768px) {
  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .btn-accesibilidad {
    margin-left: auto;
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
  }

  .hero-section {
    padding: 3rem 0 2.5rem;
  }

  .hero-text h1 {
    font-size: 1.85rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .carousel-img {
    height: 280px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-brand {
    text-align: left;
  }

  .section-container h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.55rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .carousel-img {
    height: 220px;
  }

  .nav-link {
    font-size: 0.82rem;
    padding: 0.4rem 0.6rem;
  }
}

/* ==========================================
   Sección Recursos — API Dev.to
   ========================================== */
.recursos-section {
  padding: 4rem 0 5rem;
  background: transparent;
  min-height: 80vh;
}

/* Header de sección con badge + filtros */
.recursos-header {
  margin-bottom: 2.5rem;
}

.recursos-header-text {
  margin-bottom: 1.75rem;
}

.recursos-header-text h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.recursos-devto-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.recursos-devto-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Barra de filtros */
.recursos-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recurso-filtro-btn {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.recurso-filtro-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.recurso-filtro-btn.activo {
  border-color: var(--accent);
  color: var(--bg);
  background: var(--accent);
  font-weight: 700;
  box-shadow: 0 0 14px var(--accent-glow-strong);
}

.recurso-filtro-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Grid de tarjetas */
.recursos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Tarjeta de artículo */
.recurso-card {
  background: rgba(26, 34, 51, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.recurso-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 160, 0.3);
  box-shadow: var(--shadow-md), 0 0 30px var(--accent-glow);
}

/* Imagen de portada */
.recurso-card-img-link {
  display: block;
  text-decoration: none;
}

.recurso-card-img-wrapper {
  position: relative;
  height: 180px;
  background: var(--bg-surface);
  overflow: hidden;
}

.recurso-card-img-wrapper--fallback {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 100%);
}

.recurso-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recurso-card:hover .recurso-card-img {
  transform: scale(1.04);
}

.recurso-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(10, 14, 23, 0.6) 100%
  );
  pointer-events: none;
}

/* Cuerpo de la tarjeta */
.recurso-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
}

/* Tags del artículo */
.recurso-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.recurso-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.3px;
}

/* Título del artículo */
.recurso-titulo {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

.recurso-titulo-link {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.recurso-titulo-link:hover {
  color: var(--accent);
}

/* Descripción */
.recurso-descripcion {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Footer de la tarjeta */
.recurso-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(45, 55, 72, 0.5);
}

.recurso-autor {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.recurso-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.recurso-autor-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.recurso-autor-nombre {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recurso-autor-fecha {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.recurso-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.recurso-lectura,
.recurso-reacciones {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Error banner */
.recursos-error {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--error-bg);
  border: 1px solid rgba(252, 129, 129, 0.2);
  border-radius: var(--radius-md);
  animation: slideIn 0.3s ease;
}

.recursos-error-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  color: var(--error);
}

.recursos-error strong {
  display: block;
  color: var(--error);
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.recursos-error p {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.recursos-retry-btn {
  margin-left: auto;
  padding: 0.45rem 1rem;
  font-size: 0.83rem;
  flex-shrink: 0;
  align-self: center;
}

/* Sin resultados */
.recursos-vacio {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3rem;
}

/* Footer con CTA */
.recursos-footer {
  margin-top: 3rem;
  text-align: center;
}

/* ==========================================
   Skeleton / Shimmer loading
   ========================================== */
@keyframes shimmer {
  0% { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--bg-surface) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-surface) 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
}

.recurso-skeleton {
  pointer-events: none;
  cursor: default;
}

.skeleton-img {
  width: 100%;
  height: 180px;
  border-radius: 0;
}

.skeleton-tag {
  width: 60px;
  height: 20px;
  border-radius: 999px;
}

.skeleton-titulo {
  width: 90%;
  height: 16px;
}

.skeleton-titulo--short {
  width: 65%;
}

.skeleton-desc {
  width: 100%;
  height: 12px;
}

.skeleton-desc--short {
  width: 80%;
}

.skeleton-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-autor {
  width: 80px;
  height: 12px;
}

/* ==========================================
   Responsive — Recursos
   ========================================== */
@media (max-width: 992px) {
  .recursos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .recursos-grid {
    grid-template-columns: 1fr;
  }

  .recursos-filtros {
    gap: 0.4rem;
  }

  .recurso-filtro-btn {
    font-size: 0.78rem;
    padding: 0.4rem 0.8rem;
  }

  .recurso-card-img-wrapper {
    height: 160px;
  }
}


/* ============================================================
   ANIMACIONES Y EFECTOS VISUALES AVANZADOS
   ============================================================ */

/* Transiciones Globales Temáticas */
*, *::before, *::after {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Evitar transición global en framer-motion o svg para no causar parpadeos */
svg *, [style*="transform"] {
  transition: none !important;
}

/* Efecto de Subrayado de Links */
.link-underline {
  position: relative;
  text-decoration: none;
}
.link-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 50%;
  background-color: currentColor;
  transition: width 0.3s ease, left 0.3s ease;
}
.link-underline:hover::after {
  width: 100%;
  left: 0;
}

/* Animación de Resplandor Deslizante (Shine) */
@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.animate-shine {
  position: relative;
  overflow: hidden;
}
.animate-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shine 2s infinite;
}

/* Rotación Lenta */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spin-slow 8s linear infinite;
}

/* Texturas SVG */
.forged-metal {
  background: linear-gradient(135deg, #1f2937, #111827), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="a"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23a)" opacity="0.15"/></svg>');
  background-blend-mode: overlay;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.acid-etched {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1), transparent), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="2" cy="2" r="1" fill="rgba(16,185,129,0.3)"/></svg>');
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.hammered-texture {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="a"><feTurbulence type="fractalNoise" baseFrequency="0.05" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="matrix" values="1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 0.1 0"/></filter><rect width="100%" height="100%" filter="url(%23a)"/></svg>');
}

.metallic-text {
  background: linear-gradient(to right, #9ca3af, #f3f4f6, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ==========================================
   Sileo Text Color Fix
   ========================================== */
[data-sileo-viewport] [data-sileo-title],
[data-sileo-viewport] [data-sileo-description] {
  color: #fff !important;
}




@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50% { box-shadow: 0 0 20px var(--accent-glow-strong), 0 0 40px var(--accent-glow); }
}

main { padding-top: 5rem; }

/* ==========================================
   Feature Cards — Homepage
   ========================================== */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 160, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 229, 160, 0.08);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 8px rgba(0, 229, 160, 0.3));
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .feature-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==========================================
   Role Badges — Admin Panel
   ========================================== */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.role-admin {
  background: rgba(0, 229, 160, 0.15);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 160, 0.3);
}

.role-user {
  background: rgba(160, 174, 192, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(160, 174, 192, 0.2);
}

/* ==========================================
   Enhanced Buttons — Shine effect
   ========================================== */
.btn-primary,
.btn-submit,
.btn-outline,
.auth-trigger {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::after,
.btn-submit::after,
.btn-outline::after,
.auth-trigger::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-25deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.btn-primary:hover::after,
.btn-submit:hover::after,
.btn-outline:hover::after,
.auth-trigger:hover::after {
  left: 120%;
}

/* ==========================================
   Noticias Section — GNews API
   ========================================== */
.noticias-section {
  padding: 4rem 0 2rem;
}

.noticias-header {
  margin-bottom: 2.5rem;
}

.noticias-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.noticias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.noticia-card {
  background: rgba(26, 34, 51, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.noticia-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 160, 0.3);
  box-shadow: var(--shadow-md), 0 0 30px var(--accent-glow);
}

.noticia-card-img-wrapper {
  position: relative;
  height: 180px;
  background: var(--bg-surface);
  overflow: hidden;
}

.noticia-card-img-wrapper--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 100%);
}

.noticia-fallback-icon {
  font-size: 3rem;
  opacity: 0.4;
}

.noticia-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.noticia-card:hover .noticia-card-img {
  transform: scale(1.04);
}

.noticia-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10, 14, 23, 0.6) 100%);
  pointer-events: none;
}

.noticia-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.noticia-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.noticia-source {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.3px;
}

.noticia-fecha {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.noticia-titulo {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-descripcion {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.noticia-skeleton {
  pointer-events: none;
}

@media (max-width: 992px) {
  .noticias-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .noticias-grid {
    grid-template-columns: 1fr;
  }
}

/* Current shell: soft glass navigation, calmer spacing, and responsive motion. */
body.app-container {
  min-height: 100vh;
  background-color: #080b12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(135deg, #080b12 0%, #0e1621 52%, #071015 100%);
  background-size: 42px 42px, 42px 42px, auto;
}

/* A single compositor-moved halo; no animated layout or blur. */
.site-spotlight {
  position: fixed;
  z-index: 0;
  top: 0;
  left: 0;
  width: min(36rem, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(133, 233, 207, 0.035), rgba(112, 188, 224, 0.015) 35%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(calc(var(--spotlight-x, 50vw) - 50%), calc(var(--spotlight-y, 50vh) - 50%), 0);
  transition: opacity 0.35s ease;
}

.site-spotlight.is-active {
  opacity: 1;
}

.site-header {
  width: calc(100vw - 2rem) !important;
  max-width: 1120px;
  padding: 0.6rem 0.8rem;
  background: rgba(12, 19, 29, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-wrap,
.main-nav {
  display: flex;
  align-items: center;
}

.nav-wrap {
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  color: var(--text) !important;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand::before {
  content: '';
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.main-nav {
  justify-content: flex-end;
  gap: 0.2rem;
  flex-wrap: wrap;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.hero-section {
  padding-top: 7rem;
}

.hero-text h1,
.section-container h2,
.form-card h3,
.feature-card h3,
.noticia-card h3 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.hero-text h1 {
  max-width: 650px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.98;
  text-wrap: balance;
}

.hero-description {
  max-width: 38rem;
  font-size: 1.05rem;
}

.hero-badge,
.inscritos-badge {
  background: rgba(0, 229, 160, 0.1);
  border-color: rgba(0, 229, 160, 0.3);
}

.carousel-container,
.form-card,
.noticia-card,
.feature-card {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.carousel-img {
  height: clamp(300px, 38vw, 440px);
}

.feature-card {
  padding: 1.8rem;
  text-align: left;
}

.feature-card:hover,
.noticia-card:hover,
.form-card:hover {
  transform: translateY(-4px);
}

.site-footer {
  margin-top: auto;
  padding: 2rem 0;
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100vw - 1rem) !important;
    top: 0.75rem;
    border-radius: 1.25rem;
  }

  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .main-nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .hero-section {
    padding-top: 10rem;
  }

  .hero-grid {
    gap: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Shared LiquidEther layer: decorative only, below all Django content. */
.app-container {
  position: relative;
  isolation: isolate;
}

.site-liquid-ether {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.site-liquid-ether[data-liquid-state="ready"] {
  opacity: 0.28;
  mix-blend-mode: screen;
}

.site-liquid-ether canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

.app-container > main {
  position: relative;
  z-index: 1;
}

.app-container > .site-footer,
.app-container > .messages {
  position: relative;
  z-index: 1;
}

body:has(.page-admin) .site-liquid-ether[data-liquid-state="ready"],
body:has(.forms-section .form-card.narrow) .site-liquid-ether[data-liquid-state="ready"] {
  opacity: 0.18;
}

.page-home.itprogs-hero {
  background: transparent;
}

@media (max-width: 760px) {
  .site-liquid-ether[data-liquid-state="ready"] {
    opacity: 0.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-liquid-ether canvas {
    display: none;
  }
}

/* Auth drawer and motion layer. */
.auth-trigger {
  border: 1px solid rgba(0, 229, 160, 0.4);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  background: rgba(0, 229, 160, 0.12);
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.auth-trigger:hover,
.auth-trigger:focus-visible {
  background: var(--accent);
  color: #06100d;
  box-shadow: 0 0 24px var(--accent-glow-strong);
  transform: translateY(-1px);
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(1, 5, 10, 0.62);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0);
  transition: opacity 0.35s ease, backdrop-filter 0.35s ease;
}

.auth-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 1100;
  width: min(440px, 100vw);
  padding: 2rem;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(16, 27, 39, 0.98), rgba(7, 14, 23, 0.99));
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.42);
  transform: translateX(105%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-drawer.is-open ~ * {
  pointer-events: none;
}

.auth-backdrop:has(+ .auth-drawer.is-open),
.auth-backdrop:has(+ .auth-drawer.is-open) {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.auth-drawer.is-open {
  transform: translateX(0);
}

.drawer-open {
  overflow: hidden;
}

.auth-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.eyebrow {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-drawer h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.auth-close {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.auth-close:hover,
.auth-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(90deg);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  background: rgba(0, 0, 0, 0.2);
}

.auth-tab {
  padding: 0.7rem 0.5rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.auth-tab.is-active {
  background: rgba(0, 229, 160, 0.14);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 160, 0.22);
}

.auth-intro {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-form {
  display: grid;
  gap: 0.55rem;
}

.auth-form label {
  margin-top: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-form .btn-submit {
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
}

.auth-fallback {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.auth-panel[hidden] {
  display: none;
}

.auth-panel.is-active {
  animation: authPanelIn 0.35s ease both;
}

.hero-section {
  background: linear-gradient(110deg, rgba(10, 21, 31, 0.3), rgba(0, 229, 160, 0.05) 70%, rgba(10, 21, 31, 0.25));
}

.hero-section::before,
.hero-section::after {
  display: none;
}

@keyframes authPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .auth-drawer {
    padding: 1.35rem;
  }
}

/* Page-wide motion system: short, staggered entrances with calm hover states. */
body.app-container main,
body.app-container .site-footer {
  animation: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.app-container .site-header {
  animation: headerDrop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-text > *,
.carousel-container,
.feature-card,
.form-card,
.noticia-card,
.admin-header,
.table-responsive,
.messages {
  animation: pageRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-text > :nth-child(1) { animation-delay: 0.12s; }
.hero-text > :nth-child(2) { animation-delay: 0.18s; }
.hero-text > :nth-child(3) { animation-delay: 0.24s; }
.hero-text > :nth-child(4) { animation-delay: 0.3s; }
.carousel-container { animation-delay: 0.22s; }
.feature-card:nth-child(1) { animation-delay: 0.3s; }
.feature-card:nth-child(2) { animation-delay: 0.4s; }
.feature-card:nth-child(3) { animation-delay: 0.5s; }
.noticia-card:nth-child(1) { animation-delay: 0.12s; }
.noticia-card:nth-child(2) { animation-delay: 0.2s; }
.noticia-card:nth-child(3) { animation-delay: 0.28s; }
.noticia-card:nth-child(4) { animation-delay: 0.36s; }
.form-card { animation-delay: 0.16s; }

.hero-text h1 {
  animation: titleGlow 1.1s 0.25s ease both;
}

.carousel-img {
  animation: imageDrift 9s ease-in-out infinite alternate;
}

.feature-icon {
  animation: iconFloat 4s ease-in-out infinite;
}

.feature-card:nth-child(2) .feature-icon { animation-delay: 0.5s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 1s; }

.btn-primary,
.btn-outline,
.btn-submit,
.auth-trigger {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.btn-primary:hover,
.btn-outline:hover,
.btn-submit:hover {
  transform: translateY(-3px) scale(1.015);
}

.main-nav a {
  position: relative;
}

.main-nav a::after {
  position: absolute;
  right: 0.75rem;
  bottom: 0.22rem;
  left: 0.75rem;
  height: 1px;
  background: var(--accent);
  content: '';
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

@keyframes pageRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes headerDrop {
  from { opacity: 0; transform: translate(-50%, -18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes titleGlow {
  from { filter: blur(5px); opacity: 0; transform: translateY(10px); }
  to { filter: blur(0); opacity: 1; transform: translateY(0); }
}

@keyframes imageDrift {
  from { transform: scale(1.01); }
  to { transform: scale(1.06); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  body.app-container main,
  body.app-container .site-footer,
  body.app-container .site-header,
  .hero-text > *,
  .carousel-container,
  .feature-card,
  .form-card,
  .noticia-card,
  .admin-header,
  .table-responsive,
  .messages,
  .hero-text h1,
  .carousel-img,
  .feature-icon {
    animation: none;
  }
}
/* Gallery and about pages */
.page-gallery .gallery-grid, .page-about .values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.page-gallery .gallery-card { overflow: hidden; background: rgba(26,34,51,.72); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.page-gallery .gallery-card img { width: 100%; height: 210px; object-fit: cover; display: block; }
.page-gallery .gallery-card-body { padding: 1.35rem; }
.page-gallery .gallery-card h2, .page-about .about-layout h1, .page-about .values-grid h2 { margin: .65rem 0; font-family: var(--font-display); }
.page-about .about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.page-about .about-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); }
.page-about .values-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) { .page-gallery .gallery-grid, .page-about .values-grid { grid-template-columns: 1fr 1fr; } .page-about .about-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .page-gallery .gallery-grid, .page-about .values-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Page-specific visual system
   Scoped deliberately so page-only effects do not leak into the shell.
   ============================================================ */
.page-home,
.page-about,
.page-gallery,
.page-resources,
.page-contact,
.page-admin {
  --page-surface: rgba(17, 28, 40, 0.78);
  --page-surface-raised: rgba(20, 34, 48, 0.9);
  --page-line: rgba(142, 180, 193, 0.2);
  --page-line-active: rgba(0, 229, 160, 0.42);
  --page-copy: #a8bac7;
  --page-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

/* Prevent a visible-first flash while the native motion script is loading. */
.motion-pending [data-reveal] {
  opacity: 0;
}

.page-home.motion-ready [data-reveal],
.page-about.motion-ready [data-reveal],
.page-gallery.motion-ready [data-reveal],
.page-resources.motion-ready [data-reveal],
.page-contact.motion-ready [data-reveal],
.page-admin.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-distance, 12px));
  transition: opacity var(--reveal-duration, 0.55s) cubic-bezier(0.22, 1, 0.36, 1), transform var(--reveal-duration, 0.55s) cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

/* Text settles gently; no layout changes or blur during its entrance. */
.motion-text {
  --reveal-distance: 10px;
  --reveal-duration: 0.7s;
}

.eyebrow.motion-text,
.hero-eyebrow.motion-text,
.hero-install.motion-text {
  --reveal-distance: 6px;
  --reveal-duration: 0.6s;
}

.page-home.motion-ready [data-reveal].is-visible,
.page-about.motion-ready [data-reveal].is-visible,
.page-gallery.motion-ready [data-reveal].is-visible,
.page-resources.motion-ready [data-reveal].is-visible,
.page-contact.motion-ready [data-reveal].is-visible,
.page-admin.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Initialization sets the hidden pose instantly, never animating backwards. */
.page-home.motion-ready:not(.motion-active) [data-reveal],
.page-about.motion-ready:not(.motion-active) [data-reveal],
.page-gallery.motion-ready:not(.motion-active) [data-reveal],
.page-resources.motion-ready:not(.motion-active) [data-reveal],
.page-contact.motion-ready:not(.motion-active) [data-reveal],
.page-admin.motion-ready:not(.motion-active) [data-reveal] {
  transition: none;
}

.page-about .page-section-header,
.page-gallery .page-section-header,
.page-resources .page-section-header,
.page-contact .page-section-header,
.page-admin .page-section-header {
  max-width: 720px;
  margin-bottom: 2rem;
}

.page-about .page-section-header h1,
.page-about .page-section-header h2,
.page-gallery .page-section-header h1,
.page-gallery .page-section-header h2,
.page-resources .page-section-header h1,
.page-resources .page-section-header h2,
.page-contact .page-section-header h1,
.page-contact .page-section-header h2,
.page-admin .page-section-header h1,
.page-admin .page-section-header h2 {
  margin-bottom: 0.7rem;
  font-family: var(--font-display);
  letter-spacing: -0.035em;
}

.page-about .page-section-header h1,
.page-gallery .page-section-header h1,
.page-resources .page-section-header h1,
.page-contact .page-section-header h1,
.page-admin .page-section-header h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

.page-about .page-section-header h2,
.page-gallery .page-section-header h2,
.page-resources .page-section-header h2,
.page-contact .page-section-header h2,
.page-admin .page-section-header h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
}

/* Disable legacy page-wide entrances only inside renewed pages. */
.page-home .hero-text > *,
.page-home .carousel-container,
.page-home .feature-card,
.page-about .about-value-card,
.page-resources .noticia-card,
.page-contact .contact-form-card,
.page-admin .admin-header,
.page-admin .admin-table-card {
  animation: none;
}

/* Home: a calm, layered hero with motion only during entrance and interaction. */
.page-home {
  overflow: hidden;
  background: linear-gradient(110deg, rgba(10, 21, 31, 0.3), rgba(0, 229, 160, 0.05) 70%, rgba(10, 21, 31, 0.25));
}

.page-home .hero-text h1 {
  animation: none;
  max-width: 650px;
  text-wrap: balance;
}

.page-home .carousel-container {
  position: relative;
  border-color: var(--page-line);
  box-shadow: var(--page-shadow);
}

.page-home .carousel-img {
  animation: none;
  transition: opacity 0.34s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-home .carousel-img.is-changing {
  opacity: 0.18;
}

.page-home .carousel-container:hover .carousel-img,
.page-home .carousel-container:focus-within .carousel-img {
  transform: scale(1.025);
}

.page-home .carousel-pause {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--page-line);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.page-home .carousel-pause:hover,
.page-home .carousel-pause:focus-visible {
  color: var(--accent);
  border-color: var(--page-line-active);
  background: rgba(0, 229, 160, 0.08);
}

.page-home .carousel-dot {
  position: relative;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
}

.page-home .carousel-dot::after {
  position: absolute;
  inset: 7px;
  border: 1px solid var(--text-muted);
  border-radius: 50%;
  background: transparent;
  content: '';
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

.page-home .carousel-dot:hover::after,
.page-home .carousel-dot:focus-visible::after {
  border-color: var(--accent);
  transform: scale(1.25);
}

.page-home .carousel-dot.active::after {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow-strong);
}

.page-home .feature-card {
  border-color: var(--page-line);
  background: var(--page-surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-home .feature-card:hover,
.page-home .feature-card:focus-within {
  border-color: var(--page-line-active);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), 0 0 24px rgba(0, 229, 160, 0.07);
  transform: translateY(-4px);
}

.page-home .feature-card h2 {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.page-home .feature-icon {
  animation: none;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-home .feature-card:hover .feature-icon,
.page-home .feature-card:focus-within .feature-icon {
  transform: translateY(-3px) scale(1.04);
}

/* About: editorial split layout and values that reveal in sequence. */
.page-about .about-layout {
  gap: clamp(2rem, 6vw, 5rem);
}

.page-about .about-copy h1 {
  margin: 0.25rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.page-about .about-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--page-line);
  border-radius: var(--radius-lg);
  background: var(--page-surface);
  box-shadow: var(--page-shadow);
}

.page-about .about-image {
  display: block;
  max-height: 440px;
  border-radius: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.page-about .about-media:hover .about-image,
.page-about .about-media:focus-within .about-image {
  filter: saturate(1.08);
  transform: scale(1.02);
}

.page-about .about-media figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.65rem;
  color: var(--text-secondary);
  background: rgba(4, 10, 15, 0.72);
  backdrop-filter: blur(8px);
  font-size: 0.72rem;
}

.about-values.page-about {
  background: rgba(5, 10, 16, 0.28);
}

.page-about .about-value-card {
  position: relative;
  border-color: var(--page-line);
  background: var(--page-surface);
  text-align: left;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.26s ease, box-shadow 0.26s ease;
}

.page-about .about-value-card::after {
  position: absolute;
  inset: 1.25rem auto 1.25rem 0;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: '';
  opacity: 0;
  transform: scaleY(0.3);
  transform-origin: center;
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.page-about .about-value-card:hover,
.page-about .about-value-card:focus-within {
  border-color: var(--page-line-active);
  box-shadow: var(--page-shadow);
  transform: translateY(-4px);
}

.page-about .about-value-card:hover::after,
.page-about .about-value-card:focus-within::after {
  opacity: 1;
  transform: scaleY(1);
}

.page-about .about-value-card h3 {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

/* Gallery: image-led cards with a clear hover/focus affordance. */
.page-gallery .gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-gallery .gallery-card {
  border-color: var(--page-line);
  background: var(--page-surface);
  box-shadow: var(--page-shadow);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.page-gallery .gallery-card-media {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: var(--bg-surface);
}

.page-gallery .gallery-card-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 11, 17, 0.64));
  content: '';
  opacity: 0.55;
  transition: opacity 0.28s ease;
}

.page-gallery .gallery-card img {
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.page-gallery .gallery-card-body {
  min-height: 190px;
  padding: 1.25rem;
}

.page-gallery .gallery-card h2 {
  margin: 0.7rem 0 0.45rem;
  font-size: 1.25rem;
}

.page-gallery .gallery-card p {
  color: var(--page-copy);
  font-size: 0.88rem;
  line-height: 1.55;
}

.page-gallery .gallery-card-link {
  display: inline-flex;
  gap: 0.35rem;
  margin-top: 1rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.page-gallery .gallery-card:hover,
.page-gallery .gallery-card:focus-within {
  border-color: var(--page-line-active);
  box-shadow: var(--page-shadow), 0 0 26px rgba(0, 229, 160, 0.08);
  transform: translateY(-4px);
}

.page-gallery .gallery-card:hover img,
.page-gallery .gallery-card:focus-within img {
  filter: saturate(1.08);
  transform: scale(1.035);
}

.page-gallery .gallery-card:hover .gallery-card-media::after,
.page-gallery .gallery-card:focus-within .gallery-card-media::after {
  opacity: 0.85;
}

/* Resources: cards read like a curated technical library. */
.page-resources .page-section-header,
.page-contact .page-section-header,
.page-admin .page-section-header {
  margin-bottom: 1.5rem;
}

.page-resources .recursos-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.page-resources .recurso-filtro-btn {
  min-height: 40px;
  border-color: var(--page-line);
  background: rgba(255, 255, 255, 0.025);
  transition: color 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, transform 0.22s ease;
}

.page-resources .recurso-filtro-btn:hover,
.page-resources .recurso-filtro-btn:focus-visible {
  border-color: var(--page-line-active);
  background: rgba(0, 229, 160, 0.08);
  transform: translateY(-2px);
}

.page-resources .recurso-filtro-btn.activo {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}

.page-resources .resources-grid {
  align-items: stretch;
}

.page-resources .resource-card {
  border-color: var(--page-line);
  background: var(--page-surface);
  box-shadow: var(--page-shadow);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.page-resources .resource-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
}

.page-resources .noticia-card-img-wrapper {
  height: 150px;
}

.page-resources .recurso-card-img-wrapper--fallback {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 70% 25%, rgba(0, 229, 160, 0.2), transparent 30%), linear-gradient(135deg, #162c3b, #0b151f);
}

.page-resources .resource-fallback-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid var(--page-line-active);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(0, 229, 160, 0.08);
  font-size: 1.35rem;
}

.page-resources .noticia-card-body {
  gap: 0.65rem;
  padding: 1.15rem;
}

.page-resources .noticia-titulo {
  font-family: var(--font-display);
  font-size: 1.12rem;
}

.page-resources .noticia-descripcion {
  color: var(--page-copy);
}

.page-resources .resource-read {
  display: inline-flex;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.75rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.page-resources .resource-card:hover,
.page-resources .resource-card:focus-within {
  border-color: var(--page-line-active);
  box-shadow: var(--page-shadow), 0 0 26px rgba(0, 229, 160, 0.08);
  transform: translateY(-5px);
}

.page-resources .resource-card:hover .noticia-card-img,
.page-resources .resource-card:focus-within .noticia-card-img {
  transform: scale(1.04);
}

/* Contact: a more editorial split without changing form contracts. */
.page-contact .contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: clamp(1.25rem, 4vw, 3rem);
}

.page-contact .contact-details {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--page-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(0, 229, 160, 0.08), var(--page-surface) 48%);
  box-shadow: var(--page-shadow);
}

.page-contact .contact-detail-index {
  display: block;
  margin-bottom: 2.5rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.page-contact .contact-details h2,
.page-contact .contact-form-heading h2 {
  margin-bottom: 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.05;
}

.page-contact .contact-details p,
.page-contact .contact-details li {
  color: var(--page-copy);
  font-size: 0.9rem;
  line-height: 1.6;
}

.page-contact .contact-details ul {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.page-contact .contact-details li {
  position: relative;
  padding-left: 1.15rem;
}

.page-contact .contact-details li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow-strong);
  content: '';
}

.page-contact .contact-form-card {
  border-color: var(--page-line);
  background: var(--page-surface-raised);
  box-shadow: var(--page-shadow);
}

.page-contact .contact-form-heading {
  margin-bottom: 1.35rem;
}

.page-contact .contact-form-card form {
  display: grid;
  gap: 0.35rem;
}

.page-contact .contact-form-card form p {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.page-contact .contact-form-card label {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.page-contact .contact-form-card .form-input {
  transition: border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.page-contact .contact-form-card .form-input:focus {
  transform: translateY(-1px);
}

.page-contact .contact-form-card .btn-submit {
  margin-top: 0.35rem;
}

/* Admin: control-room surface with restrained data motion. */
.page-admin .admin-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.page-admin .admin-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--page-line);
  border-radius: var(--radius-md);
  background: var(--page-surface);
  box-shadow: var(--page-shadow);
}

.page-admin .admin-summary-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--page-copy);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-admin .admin-summary strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
}

.page-admin .admin-summary-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 700;
}

.page-admin .admin-summary-status i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(104, 211, 145, 0.45);
}

.page-admin .admin-table-card {
  border-color: var(--page-line);
  background: var(--page-surface);
  box-shadow: var(--page-shadow);
}

.page-admin .inscritos-table th {
  color: var(--page-copy);
}

.page-admin .inscritos-table tbody tr {
  transition: background-color 0.22s ease;
}

.page-admin .inscritos-table tbody tr:hover {
  background: rgba(0, 229, 160, 0.055);
}

.page-admin .inscritos-table td strong {
  color: var(--text);
}

.page-admin .role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.25rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: capitalize;
}

.page-admin .role-admin {
  border-color: rgba(0, 229, 160, 0.32);
  color: var(--accent);
  background: rgba(0, 229, 160, 0.1);
}

.page-admin .role-user {
  border-color: rgba(166, 183, 192, 0.25);
  color: var(--text-secondary);
  background: rgba(166, 183, 192, 0.08);
}

.page-admin .admin-protected {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.page-admin .btn-danger {
  min-height: 38px;
  padding: 0.5rem 0.8rem;
  font-size: 0.78rem;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.page-admin .btn-danger:hover,
.page-admin .btn-danger:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

/* Shared empty state for the renewed pages. */
.page-gallery .empty-state,
.page-resources .empty-state,
.page-admin .empty-state {
  display: grid;
  min-height: 150px;
  place-items: center;
  gap: 0.35rem;
  padding: 1.5rem;
  border: 1px dashed var(--page-line);
  border-radius: var(--radius-md);
  color: var(--page-copy);
  text-align: center;
}

.page-gallery .empty-state strong,
.page-resources .empty-state strong,
.page-admin .empty-state strong {
  color: var(--text);
  font-family: var(--font-display);
}

.page-resources .empty-state a {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.page-admin .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .page-gallery .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-contact .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page-gallery .gallery-grid {
    grid-template-columns: 1fr;
  }

  .page-home .carousel-indicators {
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .page-home .carousel-pause {
    order: 3;
    width: 100%;
  }

  .page-admin .admin-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-admin .admin-summary-status {
    align-self: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home.motion-ready [data-reveal],
  .page-about.motion-ready [data-reveal],
  .page-gallery.motion-ready [data-reveal],
  .page-resources.motion-ready [data-reveal],
  .page-contact.motion-ready [data-reveal],
  .page-admin.motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .page-home .carousel-img,
  .page-home .feature-icon,
  .page-about .about-image,
  .page-gallery .gallery-card img,
  .page-resources .resource-card,
  .page-contact .contact-form-card .form-input,
  .page-admin .inscritos-table tbody tr {
    transition: none;
  }
}

/* Local page-mascot sprites: a transparent pixel fox left of the site brand. */
.nav-brand-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.4rem;
  white-space: nowrap;
}

.page-mascot {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.page-mascot:disabled {
  cursor: default;
}

.page-mascot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-mascot-body {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 78%;
  pointer-events: none;
}

.page-mascot-sheet {
  position: absolute;
  inset: 0;
  background-size: 300% 300%;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  image-rendering: pixelated;
}

.page-mascot-reactions {
  opacity: 0;
}

.page-mascot.is-reacting .page-mascot-directions {
  opacity: 0;
}

.page-mascot.is-reacting .page-mascot-reactions {
  opacity: 1;
}

@media (max-width: 760px) {
  .page-mascot {
    width: 44px;
    height: 44px;
  }

  .nav-brand-group {
    gap: 0.2rem;
  }
}

/* ============================================================
   IT Progs command hero
   Adapted from the reference composition to the existing cyan/blue identity.
   ============================================================ */
.site-header.site-header--floating {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 1050;
  width: min(calc(100vw - 2rem), 1080px) !important;
  border-radius: 999px;
  background: rgba(8, 14, 23, 0.76);
  border-color: rgba(166, 218, 229, 0.16);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.site-header.site-header--floating .nav-wrap {
  width: 100%;
  max-width: none;
}

.site-header.site-header--floating .brand::before {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 2px;
  box-shadow: 0 0 16px var(--accent);
  animation: none;
  transform: rotate(45deg);
}

.itprogs-hero {
  position: relative;
  min-height: min(930px, 100svh);
  padding: 8.5rem 1rem 3.5rem;
  overflow: hidden;
  isolation: isolate;
  background: #080b12;
}

.itprogs-hero::before {
  display: block;
  position: absolute;
  z-index: -2;
  inset: -22% -12%;
  background:
    linear-gradient(116deg, transparent 18%, rgba(0, 229, 160, 0.2) 33%, rgba(96, 219, 255, 0.08) 43%, transparent 59%),
    linear-gradient(137deg, transparent 36%, rgba(0, 182, 255, 0.17) 49%, rgba(0, 229, 160, 0.08) 57%, transparent 72%),
    radial-gradient(ellipse at 50% 44%, rgba(0, 229, 160, 0.12), transparent 42%);
  filter: blur(32px) saturate(1.15);
  mix-blend-mode: screen;
  opacity: 0.86;
  content: '';
  pointer-events: none;
  transform: translate3d(-2%, 0, 0) rotate(-4deg) scale(1.04);
  animation: heroAuroraDrift 18s ease-in-out infinite alternate;
}

.itprogs-hero::after {
  display: block;
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 25%, rgba(2, 5, 9, 0.2) 67%, rgba(2, 5, 9, 0.78) 100%),
    repeating-linear-gradient(116deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px);
  content: '';
  opacity: 0.9;
  pointer-events: none;
  animation: heroAuroraPulse 15s ease-in-out infinite alternate;
}

.hero-stage {
  display: flex;
  min-height: 690px;
  align-items: center;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.hero-copy {
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 229, 160, 0.28);
  border-radius: 999px;
  color: #b7d8dc;
  background: rgba(0, 229, 160, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 24px rgba(0, 229, 160, 0.07);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-headline {
  max-width: 760px;
  margin: 1.15rem auto 1rem;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.2vw, 4rem) !important;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-title-part {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  --reveal-distance: 14px;
  --reveal-duration: 0.76s;
}

.hero-highlight {
  background: linear-gradient(110deg, #9ce8d1 0%, #77d8bc 30%, #8bcce9 65%, #9ce8d1 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: highlightGradient 16s ease-in-out infinite alternate;
}

.itprogs-hero .hero-description {
  max-width: 640px;
  margin: 0 auto;
  color: rgba(224, 239, 242, 0.72);
  font-size: clamp(1rem, 2vw, 1.12rem);
  letter-spacing: 0.01em;
  line-height: 1.65;
}

.hero-cta-row {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.65rem;
}

.hero-keycap {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 9px;
  color: #10211f;
  background: linear-gradient(180deg, #effffb 0%, #b8e9df 100%);
  box-shadow: 0 3px 0 #06110f, 0 0 0 2px rgba(0, 0, 0, 0.46), 0 10px 24px rgba(0, 229, 160, 0.13), inset 0 1px 0 #ffffff, inset 0 -3px 0 rgba(3, 67, 61, 0.22);
  font-size: 0.86rem;
  font-weight: 800;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, filter 0.3s ease;
}

.hero-keycap svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.hero-keycap-secondary {
  color: #d7e7eb;
  background: rgba(20, 37, 47, 0.9);
  border-color: rgba(171, 224, 228, 0.28);
  box-shadow: 0 3px 0 #03070b, 0 0 0 2px rgba(0, 0, 0, 0.42), 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -3px 0 rgba(0, 0, 0, 0.3);
}

.hero-keycap:hover,
.hero-keycap:focus-visible {
  color: #06100d;
  filter: brightness(1.035);
  transform: translateY(-2px);
  box-shadow: 0 3px 0 #06110f, 0 0 0 2px rgba(0, 0, 0, 0.46), 0 12px 28px rgba(117, 223, 191, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-keycap-secondary:hover,
.hero-keycap-secondary:focus-visible {
  color: #ffffff;
}

.hero-keycap:active {
  box-shadow: 0 1px 0 #06110f, 0 0 0 2px rgba(0, 0, 0, 0.46), inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(3, 67, 61, 0.22);
  transform: translateY(2px);
}

/* Native CTA glow: share the Django links and keep all layers decorative. */
.hero-keycap[data-motion-cta] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --cursor-x: 50%;
  --cursor-y: 50%;
}

.hero-keycap[data-motion-cta]::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  content: '';
  background: radial-gradient(120px circle at var(--cursor-x) var(--cursor-y), rgba(149, 238, 210, 0.18), rgba(122, 199, 232, 0.12) 45%, transparent 80%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hero-keycap[data-motion-cta] > * {
  position: relative;
  z-index: 1;
}

.hero-keycap[data-motion-cta]:hover::before,
.hero-keycap[data-motion-cta]:focus-visible::before {
  opacity: 1;
}

.hero-keycap .cta-arrow {
  margin-left: 0.2rem;
  transition: transform 0.3s ease;
}

.hero-keycap:hover .cta-arrow,
.hero-keycap:focus-visible .cta-arrow {
  transform: translateX(3px);
}

.hero-keycap:focus-visible,
.feature-card:focus-visible {
  outline: 2px solid #8bcce9;
  outline-offset: 4px;
}

.hero-install {
  margin: 0.85rem auto 0;
  color: rgba(174, 194, 199, 0.66);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.hero-install span {
  color: rgba(215, 232, 235, 0.86);
}

.hero-command-shell {
  width: min(100%, 880px);
  margin-top: 2.15rem;
}

.command-bar {
  overflow: hidden;
  border: 1px solid rgba(165, 218, 225, 0.2);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(14, 27, 36, 0.84), rgba(5, 12, 19, 0.9));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38), 0 0 46px rgba(0, 229, 160, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-command-shell:focus-within .command-bar {
  border-color: rgba(141, 219, 218, 0.4);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38), 0 0 32px rgba(130, 225, 206, 0.1);
  transform: translateY(-1px);
}

.command-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(165, 218, 225, 0.12);
}

.command-query,
.command-result-main,
.command-bar-footer {
  display: flex;
  align-items: center;
}

.command-query {
  gap: 0.65rem;
  color: #e1f1f2;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
}

.command-query svg {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--accent);
}

.command-caret {
  width: 2px;
  height: 1.05rem;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: commandCaret 2.8s ease-in-out infinite;
}

.command-mode {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: 6px;
  color: #99c9cb;
  background: rgba(0, 229, 160, 0.08);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.67rem;
}

.command-results {
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem;
}

.command-result {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #b7cdd1;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.command-result:hover,
.command-result:focus-visible,
.command-result.is-active {
  border-color: rgba(0, 229, 160, 0.22);
  color: #f0ffff;
  background: linear-gradient(90deg, rgba(0, 229, 160, 0.16), rgba(32, 96, 117, 0.08));
}

.command-result:hover,
.command-result:focus-visible {
  transform: translateX(3px);
}

.command-result-main {
  min-width: 0;
  gap: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.command-result-main svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  color: var(--accent);
}

.command-result-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-result code {
  margin-left: 0.35rem;
  color: #79a9b3;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 400;
}

.command-result kbd {
  min-width: 2.4rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid rgba(193, 224, 227, 0.16);
  border-radius: 5px;
  color: #8faeb3;
  background: rgba(0, 0, 0, 0.22);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
  text-align: center;
}

.command-bar-footer {
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(165, 218, 225, 0.1);
  color: #75959b;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
}

.command-bar-footer strong {
  color: rgba(224, 244, 244, 0.82);
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.hero-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(177, 222, 226, 0.2);
  border-radius: 999px;
  color: rgba(190, 215, 218, 0.75);
  background: rgba(7, 16, 24, 0.22);
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.hero-learn-more span {
  color: var(--accent);
  font-size: 1rem;
  transition: transform 0.22s ease;
}

.hero-learn-more:hover,
.hero-learn-more:focus-visible {
  border-color: rgba(0, 229, 160, 0.45);
  color: #ffffff;
  background: rgba(0, 229, 160, 0.08);
  transform: translateY(-2px);
}

.hero-learn-more:hover span,
.hero-learn-more:focus-visible span {
  transform: translateX(3px);
}

.hero-badge-card {
  position: absolute;
  right: 0;
  bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(173, 220, 224, 0.16);
  border-radius: 10px;
  color: #aac3c7;
  background: rgba(7, 15, 23, 0.68);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  font-size: 0.68rem;
}

.hero-badge-card strong,
.hero-badge-card small {
  display: block;
}

.hero-badge-card strong {
  color: #e4f6f5;
  font-size: 0.72rem;
}

.hero-badge-card small {
  margin-top: 0.15rem;
  color: #77999e;
}

.hero-badge-mark {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border: 1px solid rgba(0, 229, 160, 0.35);
  border-radius: 6px;
  color: var(--accent);
  background: rgba(0, 229, 160, 0.1);
  font-size: 0.75rem;
  box-shadow: 0 0 14px rgba(0, 229, 160, 0.12);
}

.hero-legacy-carousel {
  display: none !important;
}

.itprogs-hero .feature-cards {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
}

@keyframes heroAuroraDrift {
  0% { opacity: 0.95; transform: translate3d(-2%, 0, 0) rotate(-4deg) scale(1.04); }
  50% { opacity: 0.68; transform: translate3d(2%, 2%, 0) rotate(-1deg) scale(1.1); }
  100% { opacity: 0.9; transform: translate3d(-1%, -1%, 0) rotate(-6deg) scale(1.05); }
}

@keyframes heroAuroraPulse {
  0% { opacity: 0.72; }
  50% { opacity: 0.94; }
  100% { opacity: 0.76; }
}

/* Only the small highlighted text repaints; ambient layers use transforms. */
@keyframes highlightGradient {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

@keyframes commandCaret {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}

@media (max-width: 760px) {
  .site-header.site-header--floating {
    top: 0.65rem;
    width: calc(100vw - 1rem) !important;
    border-radius: 1.15rem;
  }

  .site-header.site-header--floating .nav-wrap {
    align-items: center;
    flex-direction: row;
    gap: 0.55rem;
  }

  .site-header.site-header--floating .main-nav {
    width: auto;
    min-width: 0;
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .site-header.site-header--floating .main-nav a {
    white-space: nowrap;
  }

  .itprogs-hero {
    min-height: auto;
    padding-top: 8rem;
  }

  .hero-stage {
    min-height: 0;
  }

  .hero-headline {
    font-size: clamp(2.55rem, 11vw, 3.6rem) !important;
  }

  .hero-cta-row {
    align-items: stretch;
    flex-direction: column;
    margin-right: auto;
    margin-left: auto;
    max-width: 360px;
  }

  .hero-keycap {
    width: 100%;
  }

  .hero-command-shell {
    margin-top: 1.75rem;
  }

  .hero-badge-card {
    position: static;
    align-self: flex-end;
    margin-top: 1.25rem;
  }
}

@media (max-width: 480px) {
  .site-header.site-header--floating .brand {
    font-size: 1rem;
  }

  .site-header.site-header--floating .main-nav a {
    padding-right: 0.55rem;
    padding-left: 0.55rem;
    font-size: 0.73rem;
  }

  .hero-eyebrow {
    max-width: 100%;
    font-size: 0.62rem;
    letter-spacing: 0.045em;
  }

  .command-bar-top {
    padding: 0.8rem;
  }

  .command-results {
    padding: 0.5rem;
  }

  .command-result {
    gap: 0.5rem;
    padding: 0.6rem 0.55rem;
  }

  .command-result-main {
    gap: 0.45rem;
    font-size: 0.72rem;
  }

  .command-result code {
    display: none;
  }

  .command-bar-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .itprogs-hero::before,
  .itprogs-hero::after,
  .command-caret {
    animation: none;
  }

  .hero-keycap,
  .command-result,
  .hero-learn-more,
  .hero-learn-more span {
    transition: none;
  }
}

/* ============================================================
   Global motion extension
   Adds movement to the complete shell while preserving behavior.
   ============================================================ */
.site-header .brand::before {
  animation: none;
}

.auth-drawer {
  will-change: transform;
}

.auth-drawer.is-open .auth-drawer-head,
.auth-drawer.is-open .auth-tabs,
.auth-drawer.is-open .auth-panel.is-active {
  animation: drawerContentIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-drawer.is-open .auth-tabs {
  animation-delay: 70ms;
}

.auth-drawer.is-open .auth-panel.is-active {
  animation-delay: 140ms;
}

.auth-tab,
.auth-close,
.auth-form .form-input {
  transition-duration: 0.3s;
}

.auth-form .form-input:focus {
  transform: translateY(-1px);
}

.forms-section .form-card {
  animation: authFormEnter 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.forms-section .form-card form p {
  transition: transform 0.22s ease;
}

.forms-section .form-card form p:focus-within {
  transform: translateX(3px);
}

.forms-section .form-card .btn-submit:active,
.auth-form .btn-submit:active {
  transform: translateY(1px) scale(0.99);
}

.page-home,
.page-about,
.page-gallery,
.page-resources,
.page-contact,
.page-admin {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

.page-home::before,
.page-about::before,
.page-gallery::before,
.page-resources::before,
.page-contact::before,
.page-admin::before {
  display: block;
  position: absolute;
  z-index: 0;
  top: 8%;
  right: -12%;
  width: clamp(16rem, 34vw, 30rem);
  height: clamp(16rem, 34vw, 30rem);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.13) 0%, rgba(0, 229, 160, 0.035) 38%, transparent 72%);
  content: '';
  opacity: 0.72;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(1);
  animation: ambientDrift 15s ease-in-out infinite alternate;
}

.page-home::after,
.page-about::after,
.page-gallery::after,
.page-resources::after,
.page-contact::after,
.page-admin::after {
  display: block;
  position: absolute;
  z-index: 0;
  bottom: -15%;
  left: -14%;
  width: clamp(13rem, 28vw, 24rem);
  height: clamp(13rem, 28vw, 24rem);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 139, 255, 0.12) 0%, rgba(61, 139, 255, 0.025) 42%, transparent 72%);
  content: '';
  opacity: 0.68;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(1);
  animation: ambientDriftReverse 19s ease-in-out infinite alternate;
}

.page-home > *,
.page-about > *,
.page-gallery > *,
.page-resources > *,
.page-contact > *,
.page-admin > * {
  position: relative;
  z-index: 1;
}

/* Cursor-reactive surface inspired by the reference site's forged panels. */
.motion-glow-target {
  --pointer-x: 50%;
  --pointer-y: 50%;
  --glow-opacity: 0;
  position: relative;
  isolation: isolate;
}

.motion-glow-target > .motion-glow-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(143, 225, 204, 0.11), transparent 55%);
  opacity: var(--glow-opacity);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.motion-glow-target > *:not(.motion-glow-layer) {
  position: relative;
  z-index: 1;
}

/* Restore the original rainbow mesh and directional edge with native layers. */
.page-home .motion-multicolor-card {
  --card-edge-strength: 0;
  --pointer-deg: 45deg;
  --card-mesh: radial-gradient(at 80% 55%, #bb85ff, transparent 50%),
    radial-gradient(at 69% 34%, #ff7da0, transparent 50%),
    radial-gradient(at 8% 6%, #8fffb0, transparent 50%),
    radial-gradient(at 41% 38%, #4bbcff, transparent 50%),
    radial-gradient(at 86% 85%, #78f5ee, transparent 50%),
    radial-gradient(at 82% 18%, #ffe65a, transparent 50%),
    radial-gradient(at 51% 4%, #ffa18c, transparent 50%),
    linear-gradient(#00e5a0, #4bbcff);
  overflow: visible;
}

.motion-multicolor-card > .motion-glow-layer {
  inset: -1px;
  overflow: visible;
  background: none;
  opacity: 1;
}

.motion-multicolor-card .motion-glow-layer > span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.motion-card-border {
  padding: 1px;
  background: var(--card-mesh);
  opacity: calc(0.16 + var(--card-edge-strength) * 0.84);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.motion-card-mesh {
  background: var(--card-mesh);
  opacity: calc(var(--card-edge-strength) * 0.22);
  mask-image: radial-gradient(ellipse at center, transparent 35%, #000 80%),
    conic-gradient(from var(--pointer-deg), #000 25%, transparent 40%, transparent 60%, #000 75%);
  mask-composite: intersect;
  mix-blend-mode: soft-light;
}

.motion-multicolor-card .motion-glow-layer > .motion-card-edge {
  inset: -28px;
  opacity: var(--card-edge-strength);
  mask-image: conic-gradient(from var(--pointer-deg), #000 2.5%, transparent 10%, transparent 90%, #000 97.5%);
}

.motion-card-edge::before {
  position: absolute;
  inset: 28px;
  border-radius: inherit;
  content: '';
  box-shadow: inset 0 0 0 1px hsl(160 85% 80%),
    inset 0 0 3px hsl(160 85% 80% / 0.6),
    inset 0 0 8px hsl(160 85% 80% / 0.45),
    inset 0 0 20px hsl(160 85% 80% / 0.25),
    0 0 3px hsl(160 85% 80% / 0.7),
    0 0 8px hsl(160 85% 80% / 0.5),
    0 0 20px hsl(160 85% 80% / 0.3),
    0 0 28px hsl(160 85% 80% / 0.15);
}

.motion-glow-layer::after {
  position: absolute;
  top: -70%;
  bottom: -70%;
  left: -38%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  content: '';
  opacity: 0;
  transform: skewX(-18deg) translateX(-160%);
  pointer-events: none;
}

.motion-glow-target:hover > .motion-glow-layer::after,
.motion-glow-target:focus-within > .motion-glow-layer::after {
  animation: none;
  opacity: 0;
}

.motion-glow-target:hover,
.motion-glow-target:focus-within {
  border-color: var(--page-line-active, rgba(0, 229, 160, 0.42));
}

.page-home .hero-actions .btn-primary,
.page-home .hero-actions .btn-outline,
.page-about .btn-primary,
.page-contact .btn-submit,
.page-resources .recurso-filtro-btn,
.page-admin .btn-danger {
  transition-duration: 0.3s;
}

.page-gallery .gallery-card-link span,
.page-resources .resource-read span {
  display: inline-block;
  transition: transform 0.22s ease;
}

.page-gallery .gallery-card:hover .gallery-card-link span,
.page-gallery .gallery-card:focus-within .gallery-card-link span,
.page-resources .resource-card:hover .resource-read span,
.page-resources .resource-card:focus-within .resource-read span {
  transform: translateX(3px) translateY(-1px);
}

.page-contact .contact-details li {
  transition: transform 0.22s ease, color 0.22s ease;
}

.page-contact .contact-details li:hover {
  color: var(--text);
  transform: translateX(3px);
}

.page-admin .admin-summary-status i {
  animation: none;
}

/* Reveal transforms must not override lift after an item has appeared. */
.page-home.motion-ready .feature-card[data-reveal].is-reveal-complete,
.page-about.motion-ready .about-value-card[data-reveal].is-reveal-complete,
.page-gallery.motion-ready .gallery-card[data-reveal].is-reveal-complete,
.page-resources.motion-ready .resource-card[data-reveal].is-reveal-complete {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  transition-delay: 0ms;
}

.page-home.motion-ready .feature-card[data-reveal].is-visible:hover,
.page-home.motion-ready .feature-card[data-reveal].is-visible:focus-within,
.page-about.motion-ready .about-value-card[data-reveal].is-visible:hover,
.page-about.motion-ready .about-value-card[data-reveal].is-visible:focus-within,
.page-gallery.motion-ready .gallery-card[data-reveal].is-visible:hover,
.page-gallery.motion-ready .gallery-card[data-reveal].is-visible:focus-within,
.page-resources.motion-ready .resource-card[data-reveal].is-visible:hover,
.page-resources.motion-ready .resource-card[data-reveal].is-visible:focus-within {
  transform: translateY(-4px);
  border-color: rgba(148, 223, 208, 0.38);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24), 0 0 22px rgba(141, 226, 205, 0.055);
}

.feature-card.motion-glow-target::before {
  content: none;
}

@media (hover: none), (pointer: coarse) {
  .site-spotlight {
    display: none;
  }
}

body.page-is-leaving main {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.app-container::after {
  position: fixed;
  z-index: 4000;
  inset: 0;
  background: rgba(3, 8, 13, 0.2);
  content: '';
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.app-container.page-is-leaving::after {
  opacity: 1;
}

body.page-is-leaving .site-header,
body.page-is-leaving .site-footer {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes beaconPulse {
  0%, 100% { box-shadow: 0 0 10px var(--accent); transform: scale(0.9); }
  50% { box-shadow: 0 0 24px var(--accent), 0 0 40px var(--accent-glow); transform: scale(1.08); }
}

@keyframes drawerContentIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes authFormEnter {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ambientDrift {
  0% { transform: translate3d(-10px, -8px, 0) scale(0.96); }
  100% { transform: translate3d(18px, 16px, 0) scale(1.06); }
}

@keyframes ambientDriftReverse {
  0% { transform: translate3d(16px, 10px, 0) scale(1.04); }
  100% { transform: translate3d(-20px, -14px, 0) scale(0.94); }
}

@keyframes cardSheen {
  from { transform: skewX(-18deg) translateX(-160%); }
  to { transform: skewX(-18deg) translateX(520%); }
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(104, 211, 145, 0.25); transform: scale(0.9); }
  50% { box-shadow: 0 0 14px rgba(104, 211, 145, 0.7); transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .site-spotlight {
    display: none;
  }

  .hero-highlight,
  .page-home.itprogs-hero::before,
  .page-home.itprogs-hero::after {
    animation: none;
  }

  .hero-keycap,
  .hero-keycap::before,
  .hero-keycap .cta-arrow,
  .command-bar,
  body.app-container main,
  body.app-container .site-footer {
    transition: none;
  }

  .page-home.motion-ready .feature-card[data-reveal].is-visible,
  .page-about.motion-ready .about-value-card[data-reveal].is-visible,
  .page-gallery.motion-ready .gallery-card[data-reveal].is-visible,
  .page-resources.motion-ready .resource-card[data-reveal].is-visible {
    transition: none;
  }

  .page-home.motion-ready .feature-card[data-reveal].is-visible:hover,
  .page-home.motion-ready .feature-card[data-reveal].is-visible:focus-within,
  .page-about.motion-ready .about-value-card[data-reveal].is-visible:hover,
  .page-about.motion-ready .about-value-card[data-reveal].is-visible:focus-within,
  .page-gallery.motion-ready .gallery-card[data-reveal].is-visible:hover,
  .page-gallery.motion-ready .gallery-card[data-reveal].is-visible:focus-within,
  .page-resources.motion-ready .resource-card[data-reveal].is-visible:hover,
  .page-resources.motion-ready .resource-card[data-reveal].is-visible:focus-within,
  .hero-keycap:hover,
  .hero-keycap:focus-visible,
  .hero-keycap:active,
  .hero-keycap:hover .cta-arrow,
  .hero-keycap:focus-visible .cta-arrow,
  .hero-command-shell:focus-within .command-bar {
    transform: none;
  }

  .site-header .brand::before,
  .auth-drawer.is-open .auth-drawer-head,
  .auth-drawer.is-open .auth-tabs,
  .auth-drawer.is-open .auth-panel.is-active,
  .forms-section .form-card,
  .page-home::before,
  .page-about::before,
  .page-gallery::before,
  .page-resources::before,
  .page-contact::before,
  .page-admin::before,
  .page-home::after,
  .page-about::after,
  .page-gallery::after,
  .page-resources::after,
  .page-contact::after,
  .page-admin::after,
  .page-admin .admin-summary-status i {
    animation: none;
  }

  .motion-glow-target > .motion-glow-layer,
  .motion-multicolor-card .motion-glow-layer > span,
  .motion-glow-layer::after {
    animation: none;
    transition: none;
  }

  .motion-glow-layer::after {
    opacity: 0;
  }

  .forms-section .form-card form p,
  .auth-form .form-input,
  body.page-is-leaving main,
  body.page-is-leaving .site-header,
  body.page-is-leaving .site-footer,
  body.app-container::after {
    transition: none;
  }

  body.page-is-leaving main {
    opacity: 1;
    transform: none;
  }

  .site-header .main-nav a:hover,
  .site-header .main-nav a:focus-visible,
  .auth-close:hover,
  .auth-close:focus-visible,
  .btn-primary:hover,
  .btn-outline:hover,
  .btn-submit:hover,
  .auth-trigger:hover,
  .page-home .carousel-container:hover .carousel-img,
  .page-home .carousel-container:focus-within .carousel-img,
  .page-home .feature-card:hover,
  .page-home .feature-card:focus-within,
  .page-about .about-media:hover .about-image,
  .page-about .about-media:focus-within .about-image,
  .page-about .about-value-card:hover,
  .page-about .about-value-card:focus-within,
  .page-gallery .gallery-card:hover,
  .page-gallery .gallery-card:focus-within,
  .page-gallery .gallery-card:hover img,
  .page-gallery .gallery-card:focus-within img,
  .page-resources .recurso-filtro-btn:hover,
  .page-resources .recurso-filtro-btn:focus-visible,
  .page-resources .resource-card:hover,
  .page-resources .resource-card:focus-within,
  .page-contact .contact-details li:hover,
  .page-admin .btn-danger:hover,
  .page-admin .btn-danger:focus-visible,
  .page-gallery .gallery-card:hover .gallery-card-link span,
  .page-gallery .gallery-card:focus-within .gallery-card-link span,
  .page-resources .resource-card:hover .resource-read span,
  .page-resources .resource-card:focus-within .resource-read span,
  .forms-section .form-card form p:focus-within,
  .auth-form .form-input:focus,
  .forms-section .form-card .btn-submit:active,
  .auth-form .btn-submit:active,
  .page-home .carousel-dot:hover::after,
  .page-home .carousel-dot:focus-visible::after {
    transform: none;
  }
}
