:root {
  --primary-color: #195cc5;
  --secondary-color: #0b1c3f;
  --accent-color: #3498db;
  --highlight-color: #FFD700;
  --light-gray: #f8f9fa;
  --text-color: #333;
  --white: #ffffff;
  --modal-bg: rgba(255, 255, 255, 0.97);
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--white);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

/* Backgrounds */
.animated-bg,
.tech-bg {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.animated-bg {
  background-color: #f5f8ff;
}

.tech-bg {
  background-color: #f0f5ff;
}

.animated-bg::before,
.tech-bg::before,
.floating-window-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.7;
  animation: moveBg 60s linear infinite;
}

.animated-bg::before {
  background: rgba(25, 92, 197, 0.1) url('https://www.transparenttextures.com/patterns/connected.png');
}

.tech-bg::before {
  background: rgba(240, 245, 255, 0.8) url('https://www.transparenttextures.com/patterns/cubes.png');
  opacity: 0.35;
  animation: techBgMove 40s linear infinite alternate;
}

.floating-window-bg::before {
  background: var(--modal-bg) url('https://www.transparenttextures.com/patterns/triangles.png');
  opacity: 0.1;
  animation: floatingBg 30s linear infinite alternate;
}

@keyframes moveBg {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 1000px; }
}
@keyframes techBgMove {
  0% { background-position: 0 0; }
  100% { background-position: 500px -500px; }
}
@keyframes floatingBg {
  0% { background-position: 0 0; }
  100% { background-position: 300px -300px; }
}

/* Section Layout */
section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.section-header h2 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 15px;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--highlight-color);
}

.section-header p {
  color: #666;
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Standards Items */
.standards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  z-index: 2;
}

.standard-item {
  background: var(--white);
  padding: 15px 25px;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.standard-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.standard-icon {
  font-size: 1.5rem;
  color: var(--accent-color);
}

.standard-link {
  color: #0078d4;
  text-decoration: underline;
}

.standard-link:hover {
  color: #005a9e;
}

/* Floating Window */
#floating-window {
  position: fixed;
  z-index: 1000;
  width: 600px;
  max-width: 90%;
  max-height: 90vh;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.floating-header {
  padding: 15px 20px;
  background: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  z-index: 2;
}

.floating-header h2 {
  margin: 0;
  font-size: 18px;
  color: var(--text-color);
}

.close-window {
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.close-window:hover {
  color: #000;
}

.floating-content {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(90vh - 60px);
  z-index: 2;
}

.floating-content p,
.floating-content ul li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.modal-action {
  margin-top: 20px;
  text-align: right;
}

.modal-btn {
  padding: 10px 20px;
  background: #0066cc;
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.modal-btn:hover {
  background: #0055aa;
}

/* Modal Layout */
.modal-header-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 0;
}

.modal-description {
  flex: 1 1 auto;
  min-width: 55%;
  text-align: justify;
  display: flex;
  align-items: center;
  font-size: 16px;
  line-height: 1.6;
  color: #555;
}

.modal-image-container {
  flex: 0 0 auto;
  max-width: 45%;
  text-align: center;
  padding-right: 15px;
}

.modal-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 5px;
  box-shadow: var(--box-shadow);
  object-fit: contain;
}

/* Sección Modal Detallada */
.modal-section {
  margin-bottom: 25px;
}

.modal-section h3 {
  color: #333;
  font-size: 22px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.modal-section ul {
  padding-left: 25px;
}

.modal-section li {
  margin-bottom: 12px;
  color: #444;
  line-height: 1.5;
}

/* Animación */
.fade-in {
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .section-header h2 {
    font-size: 2rem;
  }

  .standard-item {
    padding: 10px 20px;
  }

  .modal-header-content {
    flex-direction: column;
  }

  .modal-description,
  .modal-image-container {
    max-width: 100%;
    min-width: 100%;
    padding-right: 0;
    margin-top: 15px;
    text-align: center;
  }

  .modal-image {
    max-height: 350px;
  }
}

.categories-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px auto 30px;
  max-width: 1200px;
  padding: 0 15px;
}
  
.category-item {
  background-color: var(--white);
  padding: 12px 22px;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}
  
.category-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.12);
}
  
.category-item.active {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(11, 28, 63, 0.2);
}
  
.category-item.active .category-icon {
  color: var(--white);
}
  
.category-icon {
  font-size: 1.2rem;
  color: var(--accent-color);
}
  
.category-hidden {
  display: none;
}
  
/* Animación suave al mostrar categorías */
.category-visible {
  animation: fadeInCategory 0.4s ease-in-out;
}
  
@keyframes fadeInCategory {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}