/* ====== ESTADO DE SITIOS WEB - ESTILOS ====== */

.estado-sitios-main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding-bottom: 60px;
}

/* ====== HERO SECTION ====== */
.estado-hero {
  padding: 120px 0 70px;
  margin-top: 32px;
  border-bottom: 1px solid var(--glass-border);
}

/* Forzar el hero a respetar el ancho del contenedor */
.estado-hero > .container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .estado-hero > .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.hero-text {
  animation: fadeInUp 0.8s ease-out;
}

.hero-title {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-title .icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 196, 255, 0.2), rgba(124, 58, 237, 0.2));
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--accent-color);
  flex-shrink: 0;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  padding: 24px;
  border-radius: var(--border-radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
}

.stat-card.online {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.stat-card.offline {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-light);
}

.stat-value.time {
  font-size: 0.95rem;
  color: var(--accent-color);
}

/* ====== ESTADO INDICATOR ====== */
.estado-indicator {
  padding: 50px 0;
  border-bottom: 1px solid var(--glass-border);
}

.indicator-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.indicator-bar {
  height: 24px;
  background: var(--secondary-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: flex;
  margin-bottom: 30px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bar-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bar-fill.online {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.bar-fill.offline {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.indicator-labels {
  display: flex;
  gap: 40px;
  justify-content: center;
}

.label-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.indicator-dot.online {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.indicator-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

/* ====== CONTROLES ====== */
.estado-controls {
  padding: 40px 0;
}

.controls-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.btn.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
  color: var(--primary-color);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 0 20px rgba(6, 196, 255, 0.3);
  position: relative;
}

.btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(6, 196, 255, 0.5);
}

.btn.btn-primary:active {
  transform: translateY(0);
}

.btn.btn-primary i {
  transition: transform 0.6s ease;
  min-width: 1.2em;
  min-height: 1.2em;
  width: 1.2em;
  height: 1.2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
}

.btn.btn-primary.loading i {
  animation: spin 1s linear infinite;
  color: var(--accent-color);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.refresh-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(6, 196, 255, 0.1);
  border: 1px solid rgba(6, 196, 255, 0.3);
  border-radius: var(--border-radius);
  color: var(--accent-color);
  font-size: 0.95rem;
}

/* ====== GRID SECTION ====== */
.estado-grid-section {
  padding: 60px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--text-light);
}

.filtros-container {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filtro-btn {
  padding: 10px 24px;
  border: 2px solid var(--glass-border);
  background: transparent;
  border-radius: var(--border-radius);
  color: var(--text-light);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  font-size: 0.95rem;
}

.filtro-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.filtro-btn.active {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
  border-color: transparent;
  color: var(--primary-color);
}

.sitios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* ====== SITIO CARD ====== */
.sitio-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sitio-card[data-status="online"] {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.sitio-card[data-status="offline"] {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.sitio-card[data-status="error"] {
  border-color: rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.05);
}

.sitio-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 36px rgba(6, 196, 255, 0.15);
}

.sitio-header {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.sitio-icon-section {
  position: relative;
  flex-shrink: 0;
}

.status-indicator {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 10;
}

.status-dot {
  display: inline-block;
  width: 96px;
  height: 96px;
  font-size: 2.8rem;
  border: 3px solid var(--primary-color);
  transition: all 0.3s ease;
}

.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
}

.status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}

.status-dot.error {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
}

.status-dot.checking {
  background: #06c4ff;
  box-shadow: 0 0 12px rgba(6, 196, 255, 0.7);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(6, 196, 255, 0.7);
  }
  50% {
    box-shadow: 0 0 20px rgba(6, 196, 255, 1);
  }
}

.sitio-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius);
  background: var(--secondary-color);
  object-fit: contain;
  padding: 8px;
  border: 1px solid var(--glass-border);
}

.sitio-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius);
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--accent-color);
}

.sitio-title-section {
  flex: 1;
  min-width: 0;
}

.sitio-nombre {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
  word-break: break-word;
}

.sitio-descripcion {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.sitio-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sitio-url {
  padding: 12px;
  background: var(--secondary-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
}

.url-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-base);
  word-break: break-all;
}

.url-link:hover {
  color: var(--accent-secondary);
  transform: translateX(4px);
}

.sitio-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat {
  padding: 12px;
  background: var(--secondary-color);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-text {
  color: var(--accent-color);
}

.status-text.online {
  color: #10b981;
}

.status-text.offline {
  color: #ef4444;
}

.status-text.error {
  color: #f59e0b;
}

.status-code {
  font-family: 'Courier New', monospace;
}

.response-time {
  color: var(--accent-color);
}

.last-check {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sitio-error {
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--border-radius);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #fca5a5;
}

.sitio-error.hidden {
  display: none;
}

.error-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-content i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.error-message {
  font-size: 0.9rem;
  word-break: break-word;
}

.sitio-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
}

.btn.btn-small {
  padding: 10px 16px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-base);
  flex: 1;
  justify-content: center;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn.btn-secondary {
  background: linear-gradient(135deg, rgba(6, 196, 255, 0.2), rgba(124, 58, 237, 0.2));
  border: 1px solid rgba(6, 196, 255, 0.3);
  color: var(--accent-color);
}

.btn.btn-secondary:hover {
  background: linear-gradient(135deg, rgba(6, 196, 255, 0.3), rgba(124, 58, 237, 0.3));
  border-color: rgba(6, 196, 255, 0.5);
  transform: translateY(-2px);
}

/* ====== LEYENDA ====== */
.estado-leyenda {
  padding: 60px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.leyenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.leyenda-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  transition: var(--transition-base);
}

.leyenda-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

.leyenda-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.leyenda-badge.online {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.leyenda-badge.offline {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
}

.leyenda-badge.error {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.leyenda-badge.checking {
  background: rgba(6, 196, 255, 0.2);
  color: #06c4ff;
  box-shadow: 0 0 16px rgba(6, 196, 255, 0.3);
}

.leyenda-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.leyenda-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ====== INFO SECTION ====== */
.estado-info {
  padding: 60px 0;
}

.info-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.info-card {
  padding: 30px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  transition: var(--transition-base);
}

.info-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(6, 196, 255, 0.3);
  transform: translateY(-6px);
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
}

.info-card h3 i {
  color: var(--accent-color);
  font-size: 1.3rem;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ====== ANIMACIONES ====== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-title .icon-circle {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .controls-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn.btn-primary {
    justify-content: center;
  }

  .refresh-info {
    width: 100%;
  }

  .sitios-grid {
    grid-template-columns: 1fr;
  }

  .sitio-card:hover {
    transform: translateY(-4px);
  }

  .sitio-header {
    padding: 16px;
  }

  .sitio-logo {
    width: 56px;
    height: 56px;
  }

  .sitio-stats {
    grid-template-columns: 1fr;
  }

  .indicator-labels {
    flex-direction: column;
    gap: 20px;
  }

  .filtros-container {
    justify-content: center;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
    flex-direction: column;
  }

  .hero-title .icon-circle {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .sitio-header {
    flex-direction: column;
    text-align: center;
  }

  .sitio-icon-section {
    align-self: center;
  }

  .sitio-nombre {
    font-size: 1.1rem;
  }

  .info-content {
    grid-template-columns: 1fr;
  }

  .leyenda-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== UTILIDADES ====== */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
