/* ==========================================================================
   PORTAL PERSONAL - JORGE PIZARRO
   Estilo Minimalista, Tecnológico, Premium y Responsivo
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES DE TEMA - MODO OSCURO (Equilibrado, moderno, no negro absoluto)
   -------------------------------------------------------------------------- */
:root,
[data-theme="dark"] {
  /* Paleta de Fondos Azulados / Slate Oscuro */
  --bg-deep: #0c121e;
  --bg-main: #111a2d;
  --bg-surface: rgba(22, 33, 56, 0.75);
  --bg-surface-hover: rgba(30, 46, 78, 0.9);
  --bg-card-subtle: rgba(255, 255, 255, 0.03);

  /* Acentos y Neones */
  --accent-cyan: #00f0ff;
  --accent-blue: #38bdf8;
  --accent-blue-deep: #2563eb;
  --accent-glow: rgba(0, 240, 255, 0.35);
  --accent-glow-subtle: rgba(56, 189, 248, 0.16);

  /* Bordes Glassmorphism */
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-hover: rgba(56, 189, 248, 0.55);

  /* Tipografías y Textos */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --text-white: #ffffff;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  /* Sombras y Luces */
  --shadow-card: 0 8px 32px -8px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-glass);
  --shadow-card-hover: 0 20px 45px -10px rgba(0, 160, 255, 0.35), 0 0 25px rgba(0, 240, 255, 0.22);

  /* Degradados del Hero */
  --hero-overlay-grad: linear-gradient(
    180deg,
    rgba(12, 18, 30, 0.6) 0%,
    rgba(17, 26, 45, 0.35) 40%,
    rgba(12, 18, 30, 0.82) 78%,
    var(--bg-deep) 100%
  );
  --hero-overlay-rad: radial-gradient(
    ellipse at center,
    rgba(12, 18, 30, 0.15) 0%,
    rgba(12, 18, 30, 0.7) 75%,
    var(--bg-deep) 100%
  );

  --title-gradient: linear-gradient(180deg, #ffffff 40%, #e2e8f0 85%, #94a3b8 100%);
  --header-bg: linear-gradient(180deg, rgba(12, 18, 30, 0.88) 0%, rgba(12, 18, 30, 0) 100%);
  --footer-bg: rgba(12, 18, 30, 0.9);

  /* Transiciones y Radios */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* --------------------------------------------------------------------------
   1.1 VARIABLES DE TEMA - MODO CLARO (Luminoso, limpio, tecnológico)
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --bg-deep: #f3f6fa;
  --bg-main: #eef2f7;
  --bg-surface: rgba(255, 255, 255, 0.82);
  --bg-surface-hover: rgba(255, 255, 255, 0.96);
  --bg-card-subtle: rgba(15, 23, 42, 0.02);

  --accent-cyan: #0284c7;
  --accent-blue: #0284c7;
  --accent-blue-deep: #1d4ed8;
  --accent-glow: rgba(2, 132, 199, 0.2);
  --accent-glow-subtle: rgba(2, 132, 199, 0.08);

  --border-glass: rgba(203, 213, 225, 0.8);
  --border-glass-hover: rgba(2, 132, 199, 0.6);

  --text-white: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --shadow-card: 0 8px 30px -8px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--border-glass);
  --shadow-card-hover: 0 20px 45px -10px rgba(2, 132, 199, 0.22), 0 0 20px rgba(2, 132, 199, 0.12);

  --hero-overlay-grad: linear-gradient(
    180deg,
    rgba(243, 246, 250, 0.5) 0%,
    rgba(243, 246, 250, 0.25) 40%,
    rgba(243, 246, 250, 0.85) 80%,
    var(--bg-deep) 100%
  );
  --hero-overlay-rad: radial-gradient(
    ellipse at center,
    rgba(243, 246, 250, 0.1) 0%,
    rgba(243, 246, 250, 0.75) 75%,
    var(--bg-deep) 100%
  );

  --title-gradient: linear-gradient(180deg, #0f172a 30%, #334155 90%, #475569 100%);
  --header-bg: linear-gradient(180deg, rgba(243, 246, 250, 0.92) 0%, rgba(243, 246, 250, 0) 100%);
  --footer-bg: rgba(243, 246, 250, 0.92);
}

/* --------------------------------------------------------------------------
   2. RESET Y BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  position: relative;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* --------------------------------------------------------------------------
   3. ILUMINACIÓN AMBIENTAL DE FONDO
   -------------------------------------------------------------------------- */
.ambient-glow {
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(130px);
  z-index: 0;
  opacity: 0.4;
  transition: opacity 0.4s ease;
}

.ambient-top-left {
  top: -150px;
  left: -150px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45) 0%, rgba(0, 240, 255, 0.2) 60%, transparent 80%);
}

.ambient-bottom-right {
  bottom: -150px;
  right: -150px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.3) 0%, rgba(30, 64, 175, 0.25) 60%, transparent 80%);
}

[data-theme="light"] .ambient-glow {
  opacity: 0.2;
}

/* --------------------------------------------------------------------------
   4. HEADER MINIMALISTA
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  padding: 1rem 1.5rem;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--header-bg);
}

.header-inner {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  font-weight: 700;
  user-select: none;
  min-width: 0;
}

.brand-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(0, 240, 255, 0.05));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
  flex-shrink: 0;
}

.brand-text {
  font-size: 0.95rem;
  color: var(--text-white);
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulseDot 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* Botón Switch Modo Claro / Oscuro */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-card);
}

.theme-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
  color: var(--accent-cyan);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* Mostrar icono según tema activo */
[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="dark"] .icon-sun {
  display: block;
  color: var(--accent-cyan);
}

[data-theme="light"] .icon-sun {
  display: none;
}
[data-theme="light"] .icon-moon {
  display: block;
  color: var(--accent-blue);
}

/* --------------------------------------------------------------------------
   5. CONTENIDO PRINCIPAL
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   6. HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 40vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5.25rem 1.25rem 1.75rem;
  overflow: hidden;
  text-align: center;
}

.hero-media-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  user-select: none;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.9) contrast(1.05);
  transition: opacity 0.3s ease;
}

[data-theme="light"] .hero-bg-image {
  filter: brightness(1) contrast(0.95);
  opacity: 0.65;
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay-grad);
  transition: background 0.3s ease;
}

.hero-overlay-radial {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay-rad);
  transition: background 0.3s ease;
}

.hero-overlay-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, transparent 80%);
}

[data-theme="light"] .hero-overlay-grid {
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  box-shadow: 0 0 20px var(--accent-glow-subtle);
}

.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5.8vw, 4.75rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  color: var(--text-white);
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.4))
          drop-shadow(0 0 30px var(--accent-glow-subtle));
  display: inline-block;
  user-select: none;
  max-width: 100%;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent-blue);
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   7. SECCIÓN DE ACCESOS RÁPIDOS (DASHBOARD)
   -------------------------------------------------------------------------- */
.portal-section {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 3.5rem;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.section-line {
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  margin-top: 0.6rem;
  border-radius: var(--radius-full);
}

/* Grid de Tarjetas */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

/* Tarjeta Individual */
.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1.35rem;
  min-height: 180px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-smooth);
  outline: none;
}

.portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    380px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-glow-subtle),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.portal-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    rgba(0, 240, 255, 0) 50%,
    rgba(56, 189, 248, 0.3)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .portal-card::after {
  background: linear-gradient(
    135deg,
    rgba(2, 132, 199, 0.2),
    transparent 60%,
    rgba(2, 132, 199, 0.1)
  );
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-5px);
  background: var(--bg-surface-hover);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-card-hover);
}

.portal-card:hover::before,
.portal-card:focus-visible::before {
  opacity: 1;
}

.portal-card:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(0, 240, 255, 0.05));
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

[data-theme="light"] .card-icon-box {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(2, 132, 199, 0.04));
  border-color: rgba(2, 132, 199, 0.25);
  color: var(--accent-blue);
}

.card-icon-box svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  transition: transform 0.3s ease;
}

.portal-card:hover .card-icon-box {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(56, 189, 248, 0.15));
  border-color: rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 20px var(--accent-glow);
}

[data-theme="light"] .portal-card:hover .card-icon-box {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(56, 189, 248, 0.15));
  border-color: var(--accent-blue);
}

.portal-card:hover .card-icon-box svg {
  transform: scale(1.12);
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.portal-card:hover .card-badge {
  color: var(--accent-cyan);
  border-color: var(--border-glass-hover);
}

.card-body {
  margin-top: auto;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-white);
  margin-bottom: 0.25rem;
  transition: color 0.25s ease;
}

.portal-card:hover .card-title {
  color: var(--accent-cyan);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-glass);
}

.card-action-text {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  letter-spacing: 0.06em;
  transition: color 0.25s ease;
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  transition: transform 0.3s ease, color 0.3s ease;
}

.card-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.portal-card:hover .card-action-text {
  color: var(--accent-cyan);
}

.portal-card:hover .card-arrow {
  color: var(--accent-cyan);
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   8. FOOTER DISCRETO
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 10;
  padding: 1.75rem 1.5rem;
  border-top: 1px solid var(--border-glass);
  background: var(--footer-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-copy strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   9. ANIMACIONES DE CARGA ESCALONADA (STAGGER)
   -------------------------------------------------------------------------- */
.animate-fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-animate {
  opacity: 0;
  transform: translateY(20px);
  animation: cardEntrance 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--card-index, 0) * 70ms + 250ms);
}

@keyframes cardEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE DESIGN METICULOSO
   -------------------------------------------------------------------------- */

/* Móviles en general (<= 640px) */
@media (max-width: 640px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .status-text {
    display: none;
  }

  .status-indicator {
    padding: 0.35rem 0.55rem;
  }

  .hero-section {
    min-height: 34vh;
    padding: 4.5rem 0.75rem 1.25rem;
  }

  .hero-badge {
    font-size: 0.68rem;
    padding: 0.3rem 0.75rem;
    margin-bottom: 0.55rem;
  }

  .hero-title {
    font-size: clamp(1.6rem, 7.5vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
  }

  .portal-section {
    padding: 0.5rem 0.85rem 3rem;
  }

  .section-header {
    margin-bottom: 1.15rem;
  }

  .portal-card {
    min-height: auto;
    padding: 0.95rem 1rem;
  }

  .card-inner {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
  }

  .card-top {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .card-icon-box {
    width: 44px;
    height: 44px;
  }

  .card-icon-box svg {
    width: 22px;
    height: 22px;
  }

  .card-badge {
    display: none;
  }

  .card-body {
    margin-top: 0;
    flex: 1;
    min-width: 0;
  }

  .card-title {
    font-size: 1rem;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-desc {
    font-size: 0.78rem;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-footer {
    padding-top: 0;
    border-top: none;
    flex-shrink: 0;
  }

  .card-action-text {
    display: none;
  }

  .card-arrow svg {
    width: 18px;
    height: 18px;
  }
}

/* Tablet pequeña / Móvil horizontal (641px - 767px) */
@media (min-width: 641px) and (max-width: 767px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
}

/* Tablet estándar (768px - 1023px) - Diseño simétrico 3 + 2 */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-section {
    min-height: 40vh;
    padding: 5.5rem 2rem 2rem;
  }

  .cards-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
  }

  .portal-card:nth-child(1),
  .portal-card:nth-child(2),
  .portal-card:nth-child(3) {
    grid-column: span 2;
  }

  .portal-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .portal-card:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Laptop y Pantallas Medianas (>= 1024px) */
@media (min-width: 1024px) {
  .hero-section {
    min-height: 42vh;
    padding: 5.25rem 2rem 1.75rem;
  }

  /* 6 columnas equilibradas en una sola fila */
  .cards-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
  }

  .portal-card {
    min-height: 200px;
    padding: 1.4rem 1.15rem;
  }
}

/* Desktop Full HD (>= 1440px) */
@media (min-width: 1440px) {
  .portal-section {
    max-width: 1380px;
    padding-bottom: 4rem;
  }

  .cards-grid {
    gap: 1.35rem;
  }

  .portal-card {
    min-height: 220px;
    padding: 1.75rem 1.45rem;
  }
}

/* Reducción de movimiento para accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
