
    /* =========================================
       1. VARIABLES DE COLOR Y ESTILOS GLOBALES
       ========================================= */
    :root {
      --bg-color: #001527;
      --accent-color: #FFFF00;
      --text-color: #FFFFFF;
      --section-bg: #003366;
      --sm-bg: #0f172a;           
      --sm-hover-bg: #1e293b;     
      --sm-text-color: #94a3b8;   
      --sm-text-hover: #60a5fa;   
      --sm-folder-color: #f8fafc; 
      --sm-border: #334155;       
      --sm-font-size: 14px;     
    }

    /* RESETEO BÁSICO */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      background-image: url('https://trasguforiatu.es/fondo.png');
      background-color: var(--bg-color);
      background-size: cover; 
      background-attachment: fixed;
      background-position: center;
      color: var(--text-color);
      font-family: Arial, sans-serif;
      line-height: 1.6;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      overflow-x: hidden; /* Evita el scroll horizontal */
      padding-top: 60px; /* Añadido para compensar la barra fija superior */
    }

    a {
      text-decoration: none;
      color: var(--accent-color);
      transition: opacity 0.3s ease;
    }

    a:hover { opacity: 0.8; }

    img {
      max-width: 100%;
      height: auto;
      display: block;
      margin: 0 auto;
    }

    hr { 
      border: 0; 
      border-top: 1px solid #808080; 
      margin: 30px 0; 
      clear: both; 
    }

    /* =========================================
       2. TIPOGRAFÍAS Y UTILIDADES
       ========================================= */
    .text-center { text-align: center; }
    .text-yellow { color: var(--accent-color); }
    .text-bold { font-weight: bold; }

    .title-section {
      background-color: var(--section-bg);
      color: var(--accent-color);
      padding: 15px;
      font-size: 1.5rem;
      font-weight: bold;
      margin: 20px 0;
      font-family: 'Times New Roman', Times, serif;
      border-radius: 4px;
    }

    /* =========================================
       3. CONTENEDORES Y CABECERA
       ========================================= */
    .container {
width: 100%;
  max-width: 1400px; /* <--- ESTA LÍNEA CONTROLA EL TOPE MÁXIMO */
  margin: 0 auto;    /* Centra la web horizontalmente al alcanzar el tope */
  padding: 20px 2%;
  flex-grow: 1;
    }

    .header-img { 
      width: 100%; 
    }
    
    /* BARRA DE NAVEGACIÓN SUPERIOR FIJA */
    .top-nav-bar {
      background-color: var(--section-bg);
      padding: 10px 2%;
      display: flex;
      align-items: center;
      border-bottom: 2px solid var(--accent-color);
      position: fixed; /* Hace que la barra se quede anclada */
      top: 0;
      left: 0;
      width: 100%;
      z-index: 900;
      box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    }

    .hamburger-btn {
      background: none;
      border: none;
      color: var(--accent-color);
      font-size: 1.8rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      font-family: Arial, sans-serif;
      font-weight: bold;
      transition: transform 0.2s ease;
    }

    .hamburger-btn:hover {
      transform: scale(1.05);
    }

    .hamburger-text {
      font-size: 1.2rem;
    }

    .social-bar {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 20px;
      margin: 20px 0;
    }
    
    .social-item {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: bold;
      font-size: 1.1rem;
    }

    /* =========================================
       4. MENÚ HAMBURGUESA LATERAL (OFF-CANVAS)
       ========================================= */
    .offcanvas-menu {
      position: fixed;
      top: 0;
      left: -320px; 
      width: 320px;
      height: 100vh;
      background-color: var(--sm-bg);
      z-index: 1000;
      overflow-y: auto;
      transition: left 0.3s ease-in-out;
      box-shadow: 4px 0 15px rgba(0,0,0,0.5);
      padding: 20px;
    }

    .offcanvas-menu.active {
      left: 0; 
    }

    .close-menu-btn {
      background: none;
      border: none;
      color: var(--text-color);
      font-size: 2rem;
      cursor: pointer;
      position: absolute;
      top: 15px;
      right: 20px;
      transition: color 0.2s;
    }

    .close-menu-btn:hover {
      color: var(--accent-color);
    }

    .menu-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background-color: rgba(0, 0, 0, 0.7);
      z-index: 999;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }

    .menu-overlay.active {
      opacity: 1;
      visibility: visible;
    }

    .sitemap-menu {
      color: var(--sm-text-color);
      font-family: Arial, sans-serif;
      font-size: var(--sm-font-size);
      margin-top: 40px; 
    }
    
    .sitemap-menu ul {
      list-style-type: none;
      padding-left: 1.2rem;
      margin: 4px 0;
      border-left: 1px solid var(--sm-border);
    }
    
    .sitemap-menu li { margin: 4px 0; }
    .sitemap-menu a {
      color: var(--sm-text-color);
      display: block;
      padding: 5px 10px;
      border-radius: 4px;
      transition: all 0.25s ease;
    }
    
    .sitemap-menu a:hover {
      background-color: var(--sm-hover-bg);
      color: var(--sm-text-hover);
      padding-left: 14px; 
    }
    
    .sitemap-menu details > summary {
      cursor: pointer;
      padding: 8px 10px;
      border-radius: 4px;
      font-weight: 600;
      color: var(--sm-folder-color);
      list-style: none;
      display: flex;
      align-items: center;
    }
    
    .sitemap-menu details > summary::-webkit-details-marker { display: none; }
    .sitemap-menu details > summary:hover { background-color: var(--sm-hover-bg); }
    .sitemap-menu details > summary::before {
      content: '▶';
      font-size: 10px;
      margin-right: 8px;
      color: var(--sm-text-hover);
      transition: transform 0.3s ease;
    }
    
    .sitemap-menu details[open] > summary::before { transform: rotate(90deg); }

    /* =========================================
       5. SECCIÓN INTRODUCCIÓN
       ========================================= */
    .intro-section {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 30px;
      margin-bottom: 40px;
      text-align: center;
    }
    
    .intro-img {
      width: 100%;
      max-width: 200px;
    }

    .intro-content { max-width: 800px; }
    .intro-title { font-size: 1.8rem; margin-bottom: 15px; }

    .intro-content ul { 
      text-align: left;
      margin: 15px auto 0 auto; 
      padding-left: 20px;
      max-width: 600px;
    }
    
    .intro-content li { margin-bottom: 10px; }

    .intro-quote {
      margin-top: 20px; 
      font-size: 1.2rem; 
      font-style: italic;
    }

    /* =========================================
       6. CUADRÍCULAS FLEXIBLES (Eventos, Tiempo)
       ========================================= */
    .flex-grid {
      display: flex;
      flex-direction: column;
      gap: 30px;
      margin-bottom: 40px;
    }
    
    .flex-item { 
      flex: 1; 
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .flex-item-text {
      text-align: left; 
      background-color: var(--section-bg); 
      padding: 20px; 
      border-radius: 8px;
    }

    .item-title {
      font-size: 1.5rem; 
      margin-bottom: 10px;
      text-align: center;
    }

    .feature-title { font-size: 1.3rem; }
    .feature-subtitle { margin-bottom: 15px; }

    /* =========================================
       7. ESTRUCTURA PRINCIPAL (CATEGORÍAS)
       ========================================= */
    .main-layout {
      display: flex;
      flex-direction: column;
      gap: 30px;
      margin-bottom: 40px;
    }
    
    .content-column {
      width: 100%;
    }

    .content-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 20px;
      width: 100%;
    }

    .category-card {
      display: flex;
      flex-direction: column;
      background-color: transparent;
      text-align: center;
    }
    
    .category-card a { display: block; margin-bottom: 10px; }
    .category-card img { border-radius: 8px; transition: transform 0.3s; width: 100%; }
    .category-card img:hover { transform: scale(1.05); }
    
    .category-card h3 {
      background-color: var(--section-bg);
      padding: 15px 10px;
      font-size: 1.1rem;
      color: var(--text-color);
      flex-grow: 1; 
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
    }

    /* =========================================
       8. FOOTER
       ========================================= */
    footer {
      background-color: rgba(0, 21, 39, 0.9);
      padding: 30px 0;
      width: 100%;
      margin-top: auto;
    }
    
    .footer-contact {
      text-align: center;
      padding: 20px;
      font-size: 1rem;
    }

    .footer-email {
      font-weight: bold; 
      font-size: 1.2rem; 
      color: var(--accent-color);
      display: inline-block;
      margin-top: 5px;
    }

    .btn-up {
      display: block; 
      margin-top: 30px;
    }
    
    .btn-up img { max-width: 150px; }

    /* =========================================
       9. MEDIA QUERIES (ADAPTACIÓN A PANTALLAS GRANDES)
       ========================================= */
    @media (min-width: 768px) {
      .intro-section {
        flex-direction: row;
        justify-content: space-around;
        text-align: left;
      }

      .intro-content ul { margin: 15px 0 0 20px; }
      
      .flex-grid {
        flex-direction: row;
        align-items: stretch;
      }
    }
