/* ATLD global theme (site-wide)
   Keep Tabler as base; override look & feel with light, modern styling.
*/

:root {
  --atld-navy: #1a365d;
  --atld-navy-2: #2c5282;
  --atld-blue: #2b6cb0;
  --atld-sky: #4299e1;

  --atld-navbar-height: 80px;
  --atld-navbar-effective-height: var(--atld-navbar-real-height, var(--atld-navbar-height));
  --atld-page-top-offset: 20px;

  --atld-text: #2d3748;
  --atld-muted: #718096;
  --atld-bg: #ffffff;
  --atld-surface: #f8fafc;
  --atld-border: #e2e8f0;

  --atld-radius: 12px;
  --atld-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --atld-shadow-md: 0 20px 60px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

/* Prevenir desbordamiento horizontal global */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Imágenes responsivas por defecto */
img {
  max-width: 100%;
  height: auto;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding-top: var(--atld-navbar-effective-height);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  color: var(--atld-text);
  background: var(--atld-bg);
}

/* Páginas internas: sumar offset extra para evitar que el contenido quede cortado */
body.page-inner {
  padding-top: calc(var(--atld-navbar-effective-height) + var(--atld-page-top-offset));
}

html {
  scroll-padding-top: calc(var(--atld-navbar-effective-height) + var(--atld-page-top-offset));
}

/* Layout wrappers (used by layouts/main.ejs) */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.content-wrapper {
  min-height: 100vh;
  padding-top: 0;
}

.footer-wrapper {
  background: var(--atld-navy);
  color: rgba(255, 255, 255, 0.75);
}

/* Navbar */
.atld-navbar {
  min-height: var(--atld-navbar-height);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  gap: 24px;
}

.atld-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--atld-navy);
  letter-spacing: -0.5px;
  text-decoration: none;
  white-space: nowrap;
}

.atld-logo span {
  color: var(--atld-blue);
}

.atld-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.atld-nav a {
  color: #4a5568;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.atld-nav a:hover {
  color: var(--atld-blue);
}

.atld-nav .nav-cta {
  background: var(--atld-blue);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
}

.atld-nav .nav-cta:hover {
  background: var(--atld-navy);
  transform: translateY(-2px);
}

.atld-nav .nav-quiet {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(43, 108, 176, 0.08);
  color: var(--atld-blue);
}

.atld-nav .nav-quiet:hover {
  background: rgba(43, 108, 176, 0.14);
  color: var(--atld-navy);
  transform: translateY(-1px);
}

/* Landing / sections */
.atld-hero {
  background: linear-gradient(135deg, var(--atld-navy) 0%, var(--atld-navy-2) 50%, var(--atld-blue) 100%);
  min-height: calc(100vh - var(--atld-navbar-effective-height));
  display: flex;
  align-items: center;
  padding: 120px 60px 80px;
  position: relative;
  overflow: hidden;
}

.atld-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='30' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='20' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='0.5'/%3E%3C/svg%3E") center/cover;
  pointer-events: none;
}

.atld-hero-content {
  max-width: 720px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.atld-badge {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 26px;
  backdrop-filter: blur(10px);
}

.atld-hero h1 {
  font-size: 3.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -1px;
}

.atld-hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 34px;
  max-width: 560px;
}

.atld-hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.atld-btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s ease;
  border: none;
}

.atld-btn-primary {
  background: #fff;
  color: var(--atld-navy);
}

.atld-btn-primary:hover {
  background: #f7fafc;
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.atld-btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.atld-btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.atld-section {
  padding: 100px 60px;
}

.atld-section.atld-surface {
  background: var(--atld-surface);
}

.atld-section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 64px;
}

.atld-section-label {
  color: var(--atld-blue);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.atld-section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--atld-navy);
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}

.atld-section-subtitle {
  font-size: 1.1rem;
  color: var(--atld-muted);
  margin: 0;
}

/* Cards grid */
.atld-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.atld-card {
  background: #fff;
  padding: 44px 34px;
  border-radius: var(--atld-radius);
  border: 1px solid var(--atld-border);
  transition: all 0.25s ease;
}

.atld-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--atld-shadow-md);
  border-color: transparent;
}

.atld-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--atld-navy);
  margin: 0 0 12px;
}

.atld-card p {
  color: var(--atld-muted);
  font-size: 1rem;
  margin: 0 0 18px;
}

.atld-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--atld-blue), var(--atld-sky));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  font-size: 1.5rem;
}

.atld-link {
  color: var(--atld-blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s ease;
}

.atld-link:hover {
  gap: 12px;
}

/* About */
.atld-about {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.atld-about h2 {
  font-size: 2.2rem;
  color: var(--atld-navy);
  margin: 0 0 20px;
  font-weight: 700;
}

.atld-about p {
  color: #4a5568;
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.atld-features {
  margin-top: 26px;
}

.atld-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.atld-feature-dot {
  width: 24px;
  height: 24px;
  background: #c6f6d5;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #276749;
  font-size: 0.8rem;
}

.atld-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.atld-stat {
  background: var(--atld-surface);
  padding: 32px;
  border-radius: var(--atld-radius);
  text-align: center;
}

.atld-stat-number {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--atld-blue);
  line-height: 1;
}

.atld-stat-label {
  color: var(--atld-muted);
  font-size: 0.95rem;
  margin-top: 10px;
}

/* Dark section (team) */
.atld-dark {
  background: var(--atld-navy);
  color: #fff;
}

.atld-dark .atld-section-label {
  color: #90cdf4;
}

.atld-dark .atld-section-title {
  color: #fff;
}

.atld-dark .atld-section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.atld-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.atld-team-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 40px 30px;
  border-radius: var(--atld-radius);
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}

.atld-team-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.atld-avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--atld-sky), #667eea);
  border-radius: 50%;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.atld-role {
  color: #90cdf4;
  font-size: 0.9rem;
  margin: 0 0 12px;
}

.atld-team-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  margin: 0;
}

/* Testimonials */
.atld-testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.atld-testimonial {
  background: #fff;
  padding: 40px;
  border-radius: var(--atld-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.atld-stars {
  color: #f6ad55;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.atld-testimonial p {
  color: #4a5568;
  font-size: 1.05rem;
  font-style: italic;
  margin: 0 0 22px;
  line-height: 1.8;
}

.atld-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.atld-author-badge {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--atld-blue), var(--atld-sky));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

.atld-author h4 {
  font-size: 1rem;
  color: var(--atld-navy);
  margin: 0;
}

.atld-author span {
  color: var(--atld-muted);
  font-size: 0.9rem;
}

/* Contact */
.atld-contact {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
}

.atld-contact h2 {
  font-size: 2rem;
  color: var(--atld-navy);
  margin: 0 0 14px;
}

.atld-contact p {
  color: var(--atld-muted);
  margin: 0 0 22px;
}

.atld-contact-item {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.atld-contact-icon {
  width: 50px;
  height: 50px;
  background: #ebf8ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.atld-form {
  background: var(--atld-surface);
  padding: 45px;
  border-radius: 16px;
  border: 1px solid var(--atld-border);
}

.atld-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.atld-field {
  margin-bottom: 18px;
}

.atld-field label {
  display: block;
  color: #4a5568;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.atld-field input,
.atld-field textarea,
.atld-field select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--atld-border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.atld-field input:focus,
.atld-field textarea:focus,
.atld-field select:focus {
  outline: none;
  border-color: var(--atld-blue);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.12);
}

.atld-field textarea {
  resize: vertical;
  min-height: 120px;
}

.atld-submit {
  width: 100%;
  background: var(--atld-blue);
  color: #fff;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
}

.atld-submit:hover {
  background: var(--atld-navy);
}

/* Footer */
.atld-footer {
  padding: 80px 60px 40px;
}

.atld-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.atld-footer h3 {
  font-size: 1.5rem;
  margin: 0 0 18px;
  color: #fff;
}

.atld-footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  max-width: 360px;
  margin: 0;
}

.atld-footer h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 18px;
  color: #fff;
}

.atld-footer a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.atld-footer a:hover {
  color: #fff;
}

.atld-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 50px;
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  gap: 18px;
}

.atld-social {
  display: flex;
  gap: 12px;
}

.atld-social a {
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
}

.atld-social a:hover {
  background: var(--atld-blue);
}

/* Keep legacy homepage components working (was inline in layout) */
.home-header {
  background-color: #3b5bdb;
  background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 4rem 0;
  margin-bottom: 2rem;
}

.stat-box {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #667eea;
}

.btn-atld-primary {
  background-color: #3b5bdb;
  background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff !important;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s;
  display: inline-block;
  text-decoration: none;
}

.btn-atld-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e5e7eb;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 28px;
}

/* Shared UI helpers (used by estadísticas partial) */
.shadow-soft {
  box-shadow: var(--atld-shadow-sm);
}

.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--atld-shadow-md);
}

.page-header-gradient {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.14) 0%, rgba(118, 75, 162, 0.10) 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.spinner-modern {
  border-radius: 999px;
  animation: atld-spin 0.9s linear infinite;
}

@keyframes atld-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-circle-xl {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--atld-border);
  border-radius: 16px;
  padding: 18px;
  height: 100%;
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--atld-navy);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--atld-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .atld-navbar {
    padding: 0 30px;
  }

  .atld-hero {
    padding: 100px 30px 60px;
  }

  .atld-hero h1 {
    font-size: 2.6rem;
  }

  .atld-section {
    padding: 70px 30px;
  }

  .atld-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .atld-testimonials {
    grid-template-columns: 1fr;
  }

  .atld-about,
  .atld-contact {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .atld-footer {
    padding: 70px 30px 40px;
  }

  .atld-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Cards 1 columna en tablets pequeños */
@media (max-width: 640px) {
  .atld-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}

/* Ocultar botón hamburguesa en desktop */
.atld-menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --atld-navbar-height: 80px;
  }

  .atld-navbar {
    flex-direction: row;
    height: var(--atld-navbar-height);
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
  }

  /* Botón hamburguesa */
  .atld-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--atld-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
  }

  .atld-menu-toggle:hover {
    background: var(--atld-navy);
    transform: scale(1.05);
  }

  .atld-menu-toggle.atld-menu-open {
    background: var(--atld-navy);
  }

  /* Menú móvil */
  .atld-nav {
    display: flex !important;
    position: fixed;
    top: var(--atld-navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  }

  .atld-nav.atld-nav-open {
    transform: translateX(0) !important;
  }

  .atld-nav a {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
  }

  .atld-nav a:hover {
    background: rgba(43, 108, 176, 0.08);
  }

  .atld-nav .nav-quiet,
  .atld-nav .nav-cta {
    margin-top: 0.5rem;
  }

  /* Hero móvil - prevenir desbordamiento */
  .atld-hero {
    padding: 60px 20px 50px;
    min-height: auto;
  }

  .atld-hero-content {
    max-width: 100%;
  }

  .atld-hero h1 {
    font-size: 1.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .atld-hero p {
    font-size: 1rem;
    max-width: 100%;
  }

  .atld-hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .atld-hero-buttons .atld-btn {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  .atld-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  /* Secciones móvil */
  .atld-section {
    padding: 50px 16px;
  }

  .atld-section-header {
    margin-bottom: 40px;
  }

  .atld-section-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .atld-section-subtitle {
    font-size: 0.95rem;
  }

  .atld-section-label {
    font-size: 0.8rem;
  }

  /* Grid de cards - 1 columna en móvil */
  .atld-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
    padding: 0;
    max-width: 100%;
  }

  .atld-card {
    padding: 20px 16px;
    width: 100%;
    max-width: 100%;
  }

  .atld-card img {
    height: 160px !important;
    margin-bottom: 16px;
  }

  .atld-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
  }

  .atld-card p {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .atld-link {
    font-size: 0.85rem;
  }

  /* About móvil */
  .atld-about {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .atld-about h2 {
    font-size: 1.5rem;
  }

  .atld-about p {
    font-size: 0.95rem;
  }

  /* Stats móvil - 2 columnas */
  .atld-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .atld-stat {
    padding: 20px 12px;
  }

  .atld-stat-number {
    font-size: 1.75rem;
  }

  .atld-stat-label {
    font-size: 0.8rem;
  }

  /* Testimonials móvil */
  .atld-testimonials {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .atld-testimonial {
    padding: 24px 20px;
  }

  .atld-testimonial p {
    font-size: 0.95rem;
  }

  /* Team móvil */
  .atld-team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .atld-team-card {
    padding: 28px 20px;
  }

  /* Contacto móvil */
  .atld-contact {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .atld-contact h2 {
    font-size: 1.5rem;
  }

  .atld-form {
    padding: 24px 18px;
  }

  .atld-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .atld-field input,
  .atld-field textarea,
  .atld-field select {
    padding: 12px 14px;
    font-size: 16px; /* Previene zoom en iOS */
  }

  /* Footer móvil */
  .atld-footer {
    padding: 50px 16px 30px;
  }

  .atld-footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .atld-footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  /* Estadísticas generales móvil */
  .stat-card {
    padding: 1rem;
  }

  .stat-card .stat-value {
    font-size: 1.5rem !important;
  }

  .stat-card .stat-label {
    font-size: 0.75rem !important;
  }
}

/* ============================================
   PANTALLAS MUY PEQUEÑAS (< 480px)
   ============================================ */
@media (max-width: 480px) {
  .atld-hero {
    padding: 40px 16px 40px;
  }

  .atld-hero h1 {
    font-size: 1.5rem;
  }

  .atld-hero p {
    font-size: 0.9rem;
  }

  .atld-section {
    padding: 40px 12px;
  }

  .atld-section-title {
    font-size: 1.3rem;
  }

  .atld-card {
    padding: 20px 16px;
  }

  .atld-card img {
    height: 150px !important;
  }

  .atld-stats {
    grid-template-columns: 1fr;
  }

  .atld-stat {
    padding: 16px;
  }

  .atld-stat-number {
    font-size: 1.5rem;
  }

  .atld-form {
    padding: 20px 14px;
  }

  .atld-testimonial {
    padding: 20px 16px;
  }

  .atld-author {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   PANEL DE ADMINISTRACIÓN
   ============================================ */

.admin-panel {
  padding: 0;
  background: #f8fafc;
  min-height: calc(100vh - 80px);
}

.panel-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 0 0 0;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.panel-header-content {
  padding: 0 2rem 1.5rem 2rem;
}

.panel-header h1 {
  color: white;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.panel-header-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.panel-stats-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.mini-stat {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.mini-stat:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.mini-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin: 0;
}

.mini-stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-weight: 500;
}

.panel-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 2rem;
  background: transparent;
  overflow-x: auto;
  scrollbar-width: thin;
}

.panel-tabs::-webkit-scrollbar {
  height: 4px;
}

.panel-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.panel-tab {
  padding: 0.875rem 1.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: calc(0.95rem + 3px);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px 12px 0 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.panel-tab:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.panel-tab.active {
  background: #f8fafc;
  color: #667eea;
  font-weight: 700;
}

.panel-content {
  padding: 2rem;
}

.admin-section {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(98, 105, 118, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.admin-section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.admin-section-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(98, 105, 118, 0.12);
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-badge {
  background: #667eea;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-section-body {
  padding: 1.75rem;
}

.admin-section-body.p-0 {
  padding: 0;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid rgba(98, 105, 118, 0.12);
  border-radius: 12px;
  text-decoration: none;
  color: #1f2937;
  transition: all 0.3s ease;
  text-align: center;
}

.action-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.action-btn:hover .action-icon {
  background: rgba(255, 255, 255, 0.2);
}

.action-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.3s ease;
}

.action-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.action-desc {
  font-size: 0.8rem;
  color: #6b7280;
  transition: all 0.3s ease;
}

.action-btn:hover .action-desc {
  color: rgba(255, 255, 255, 0.9);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.badge:hover::before {
  left: 100%;
}

.badge-success {
  background: #dcfce7;
  color: #16a34a;
}

.badge-danger {
  background: #fee2e2;
  color: #dc2626;
}

.badge-warning {
  background: #fef3c7;
  color: #d97706;
}

.badge-info {
  background: #e0e7ff;
  color: #4f46e5;
}

.badge-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.badge-secondary {
  background: #e5e7eb;
  color: #6b7280;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.75rem;
  border-radius: 16px;
  border: 1px solid rgba(98, 105, 118, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0;
}

.stat-label {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0.5rem 0 0 0;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}

.empty-state i {
  font-size: 64px;
  opacity: 0.3;
  margin-bottom: 1rem;
  display: block;
}

.empty-state p {
  margin: 1rem 0;
  font-size: 1.1rem;
}

.btn-action {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* Botones pequeños de iconos en columnas de acciones */
.btn-icon-action {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #f8fafc;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.text-muted {
  color: #9ca3af;
}

.mt-3 {
  margin-top: 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.col-lg-4, .col-lg-6 {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
}

.col-lg-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.col-lg-4 {
  flex: 0 0 33.333%;
  max-width: 33.333%;
}

/* Estilos de tablas */
.data-table {
   width: 100%;
   text-align: left;
   border-collapse: collapse;
   margin: 0;
   caption-side: top;
   table-layout: fixed;
}

.data-table caption,
.data-table td,
.data-table th {
   padding: 1rem;
   vertical-align: middle;
}

.data-table thead th {
   background: #f8fafc;
   font-weight: 600;
   color: #374151;
   font-size: 0.875rem;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   border-bottom: 2px solid #e5e7eb;
}

.data-table tbody {
   border-top: none;
   border-bottom: none;
}

.data-table tbody td {
   border-bottom: 1px solid #f3f4f6;
}

.data-table tbody th,
.data-table tfoot th {
   border: 0;
}

.data-table th.name {
   width: 25%;
}

.data-table th.location {
   width: 20%;
}

.data-table th.lasteruption {
   width: 30%;
}

.data-table th.eruptiontype {
   width: 25%;
}

.data-table tfoot {
   text-align: center;
   color: #555;
   font-size: 0.8em;
}

/* Responsive para el panel */
@media (max-width: 992px) {
  .col-lg-6, .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .panel-stats-mini {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .panel-header h1 {
    font-size: 1.5rem;
  }
  
  .panel-content {
    padding: 1rem;
  }
  
  .panel-header-content {
    padding: 0 1rem 1rem 1rem;
  }
  
  .panel-tabs {
    padding: 0 1rem;
  }
  
  .quick-actions {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
  


@media (max-width: 576px) {
  .panel-stats-mini {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .quick-actions .action-btn {
    padding: 1rem 0.5rem;
    gap: 0.5rem;
  }

  .quick-actions .action-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .quick-actions .action-label {
    font-size: 0.8rem;
  }

  .quick-actions .action-desc {
    display: none;
  }
}

/* Tablas con scroll horizontal en mobile */
@media (max-width: 768px) {
  .admin-section-body .table-responsive,
  .admin-section .table-responsive,
  .admin-section-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Reducir padding de celdas en mobile */
  .data-table td,
  .data-table th {
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
  }

  /* Stats grid en 2 columnas en mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  /* Reducir tamaño titulo sección */
  .admin-section-title {
    font-size: 1.1rem !important;
  }

  /* Header de sección en column en mobile */
  .admin-section-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Animaciones y efectos adicionales para el panel */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.admin-section {
  animation: slideIn 0.4s ease-out;
}

.admin-section:nth-child(2) {
  animation-delay: 0.1s;
}

.admin-section:nth-child(3) {
  animation-delay: 0.2s;
}

/* Loading state */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid #667eea;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tooltips */
[data-tooltip] {
  position: relative;
  cursor: help;
}

/* Excluir botones de acción del cursor help */
.btn-action[data-tooltip],
.btn-icon-action[data-tooltip] {
  cursor: pointer;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  padding: 0.25rem 0.5rem;
  background: #1f2937;
  color: white;
  font-size: 0.68rem;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
}

[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 3px solid transparent;
  border-top-color: #1f2937;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Deshabilitar tooltips en dispositivos touch/mobile */
@media (hover: none), (max-width: 768px) {
  [data-tooltip]::before,
  [data-tooltip]::after {
    display: none !important;
  }
}

/* Mejoras en inputs de búsqueda */
input[type="search"],
select {
  transition: all 0.2s;
}

input[type="search"]:focus,
select:focus {
  outline: none;
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Highlight en filas de tabla */
.data-table tbody tr {
  transition: background-color 0.2s, border-left-color 0.2s;
  border-left: 3px solid transparent;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
  border-left-color: #667eea;
}

/* Estados de badge mejorados */
/* Scroll suave para tablas en móvil */
.admin-section-body.p-0 {
  overflow-x: auto;
}

.admin-section-body.p-0::-webkit-scrollbar {
  height: 8px;
}

.admin-section-body.p-0::-webkit-scrollbar-track {
  background: #f8fafc;
}

.admin-section-body.p-0::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.admin-section-body.p-0::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Mensaje cuando no hay resultados */
.no-results {
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
  font-size: 0.95rem;
  display: none;
}

.no-results i {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 0.5rem;
  display: block;
}

/* Mejoras en stat cards */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
  border-radius: 16px;
}

.stat-card:hover::before {
  opacity: 0.1;
}


