body {
  margin: 0;
  font-family: Arial, sans-serif;
}

#sidebar-panel {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 70px;
  background: #3B59F7;
  color: white;
  z-index: 1000;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
  padding: 0;
}

#sidebar-panel.active {
  width: 220px;
  transform: translateX(0);
  padding-top: 40px;
}

.sidebar-marca {
  opacity: 0;
  pointer-events: none;
  transition:  opacity 0.s;
  padding: 40px 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
}

#sidebar-panel.active .sidebar-marca {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.1s;
}

.sidebar-marca ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.sidebar-marca li {
  margin: 8px 10px;
  width: auto;;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.sidebar-marca a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  width: 100%;
  font-family: "Segoe UI", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-size: 16px;
  transition: color 0.3s;
  white-space: nowrap;
  justify-content: flex-start;
}

.sidebar-marca li:not(.active):hover a {
    color: #ffffff;
}

.sidebar-marca li:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(6px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-marca li.active {
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

.sidebar-marca li.active a {
    color: #3B59F7;
    font-weight: 700;
}

#menu-toggle {
  position: fixed;
  left: 13px;
  top: 20px;
  width: 38px;
  height: 38px;
  font-size: 26px;
  background: #3B59F7;
  color: white;
  border: none;
  z-index: 1101;
  cursor: pointer;
  border-radius: 8px;
  display: block;
}

#sidebar-panel.active .close-btn {
  display: block;
}

main {
  margin-left: 65px;
  padding: 20px;
}

@media (max-width: 768px) {
  main {
    margin-left: 0;
  }
}

#config-container {
  position: fixed;
  bottom: 20px;
  left: 13px; 
  z-index: 1102;
}

.config-link {
  display: flex;
  align-items: center;
  height: 50px;
  width: 50px; 
  background-color: white;
  border-radius: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-decoration: none;
  overflow: hidden;
  transition: width 0s cubic-bezier(.4,0,.2,1), background-color 0.2s, transform 0.2s;
}

#sidebar-panel.active ~ #config-container .config-link {
  width: 160px;
}

#sidebar-panel.active ~ #config-container .config-link h1 {
  opacity: 1;
}

.config-link:hover {
  background-color: #eef2ff;
  transform: scale(1.1);    
  box-shadow: 0 6px 15px rgba(59, 89, 247, 0.4); 
}

.ia-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-left: 10px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 1px black);
}

.config-link h1 {
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: #333;
  margin: 0 0 0 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease 0.1s;
}

#sidebar-panel.active ~ #config-container {
  left: 30px;
}

#sidebar-panel.active {
  width: 220px;
  transform: translateX(0);
  padding-top: 40px;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

#top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 999;
}

.brand-name {
  font-family: "poppins", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #3B59F7;
  letter-spacing: 0.5px;
  margin-left: 90px;
  padding-top: 20px;
}




/* --- ESTRUCTURA PRINCIPAL CORREGIDA --- */
main {
    margin-left: 90px; 
    margin-top: 40px; /* Espacio para el navbar fijo */
    padding: 20px 80px;
    max-width: 1200px;
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    /* REMOVIDO: display: flex; - esto causaba problemas */
}

/* --- ENCABEZADO CORREGIDO --- */
header {
    margin-left: 90px;
    margin-top: 50px; /* Espacio para el navbar */
    padding: 50px 80px; /* Cambiado de "auto" a valores reales */
    background: linear-gradient(135deg, #3B59F7 0%, #5a7aff 100%);
    position: relative;
    overflow: hidden;
    display: flex; /* AGREGADO para centrado */
    align-items: center;
    justify-content: center;
    min-height: 120px; /* Altura mínima garantizada */
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0;
    line-height: 1.2;
}
/* --- CONTENEDOR DE SECCIONES --- */
.container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}


/* --- TARJETAS UNIFORMES --- */
section {
    background: #ffffff;
    padding: 30px 35px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(59, 89, 247, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #3B59F7;
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0%;
    background: linear-gradient(180deg, #3B59F7 0%, #5a7aff 100%);
    transition: height 0.3s ease;
}

section:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(59, 89, 247, 0.15);
}

section:hover::before {
    height: 100%;
}

/* --- TÍTULOS UNIFORMES --- */
section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #3B59F7;
    margin-bottom: 18px;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

section h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #3B59F7;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(59, 89, 247, 0.2);
}

/* --- PÁRRAFOS --- */
section p {
    font-size: 16px;
    line-height: 1.8;
    color: #4a5568;
    margin: 0;
    text-align: justify;
}

/* --- NEGRITAS: SOLO COLOR, SIN FONDOS --- */

/* Estilo 1: Información general (AZUL) */
/* SOBRESCRIBIR ESTILOS PROBLEMÁTICOS */
section p strong {
    color: #c53030!important;
    font-weight: 800 !important;
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-decoration-break: auto !important;
    -webkit-box-decoration-break: auto !important;
}



/* --- FOOTER RENOVADO --- */
footer {
    margin-left: 90px;
    margin-top: 80px;
    padding: 40px 80px;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-top: 3px solid #3B59F7;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3B59F7 0%, #5a7aff 50%, #3B59F7 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

footer p {
    margin: 0;
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

footer p::before {
    content: '©';
    color: #3B59F7;
    font-weight: 700;
    margin-right: 5px;
}

/* --- ANIMACIÓN DE ENTRADA --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.6s ease-out backwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.15s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.25s; }
section:nth-child(5) { animation-delay: 0.3s; }
section:nth-child(6) { animation-delay: 0.35s; }
section:nth-child(7) { animation-delay: 0.4s; }
section:nth-child(8) { animation-delay: 0.45s; }
section:nth-child(9) { animation-delay: 0.5s; }
section:nth-child(10) { animation-delay: 0.55s; }
section:nth-child(11) { animation-delay: 0.6s; }
section:nth-child(12) { animation-delay: 0.65s; }

/* --- RESPONSIVE MEJORADO --- */
@media (max-width: 1024px) {
    main, header, footer {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 768px) {
    main, header, footer { 
        margin-left: 0;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    main {
        margin-top:1px; /* Mantener espacio en móvil */
    }
    
    header {
        margin-top: 0; /* En móvil no necesita tanto */
        margin-left: 0;
        padding: 40px 20px;
        min-height: 100px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    section {
        padding: 25px 20px;
    }
    
    section h2 {
        font-size: 1.3rem;
    }
    
    section p {
        font-size: 15px;
        text-align: left;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    section h2 {
        font-size: 1.2rem;
    }
}