:root {
      --primary: #0a2e5c;
      --primary-hover: #0c5197;
      --text-light: #ffffff;
      --text-dark: #0a2e5c;
      --top-bar-h: 45px;
      --header-h: 60px;
    }

    body {
      margin: 0;
      font-family: 'Poppins', sans-serif;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      overflow-x: hidden;
      background: var(--bg-gradient);
    }

    /* Fondo con degradado + imagen */
    
    body::before {
      content: "";
      position: fixed;
      top: 0;
      right: 0;
      width: 50%;
      height: 100vh;
      background:
        linear-gradient(to right, rgba(12, 81, 151, 0.25), rgba(12, 81, 151, 0.25)),
        url("../../../img/fondos/fondo6.webp") no-repeat center center;
      background-size: cover;
      opacity: 1;
      -webkit-mask-image: linear-gradient(to right, transparent 0px, transparent 50px, black 100%);
      -webkit-mask-repeat: no-repeat;
      -webkit-mask-size: cover;
      mask-image: linear-gradient(to right, transparent 0px, transparent 50px, black 100%);
      mask-repeat: no-repeat;
      mask-size: cover;
      pointer-events: none;
      z-index: 0;
    }
  



    
    
    @media (max-width: 1180px) and (min-width: 769px) {
      body::after { width: 50%; opacity: 0.9; }
    }

    @media (max-width: 768px) {
      body::after {
        width: 100%;
        left: 0; right: 0;
        background:
          linear-gradient(to right, rgba(12, 81, 151, 0.2), rgba(12, 81, 151, 0.2)),
          url("../../../img/fondos/fondo6.webp") no-repeat center center;
        background-size: cover;
        -webkit-mask-image: none;
        mask-image: none;
        opacity: 0.25;
      }
    }

    main, header, footer { position: relative; z-index: 1; }

        /* ===== TOP BAR SUPERIOR ===== */
    .top-bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      min-height: var(--top-bar-h);
      background: var(--primary-hover);
      color: #fff;
      font-size: 16px;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 0 16px;
      box-sizing: border-box;
      z-index: 1001;
      
    }

    .top-bar a {
      display: inline-flex;          /* 👈 CLAVE */
      align-items: center;
      gap: 6px;
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      text-decoration: none;
      /*border: 1px solid #fff;*/
      background-color: var(--primary);
      padding: 7px;
      padding-left: 10PX;
      padding-right: 10PX;
      border-radius: 7px;
      transition: transform 0.3s ease;
    }

    .top-bar svg {
      width: 16px;
      height: 16px;
      stroke: #fff;
      flex-shrink: 0;
    }

 
    .top-bar a:hover {
      color: var(--primary-hover);
      background-color: #fff;
      opacity: 1;
    }

   .top-bar a:hover svg {
      stroke: var(--primary-hover);
    }

    
    header {
      position: fixed;
      top: var(--top-bar-h); left: 0; right: 0;
      background: var(--primary);
      display: flex;
      align-items: center;
      justify-content: space-between; /* brand izquierda, menú/drawer derecha */
      z-index: 1000;
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      height: var(--header-h);
      padding: 0 16px;
      box-sizing: border-box;
    }


    /* ===== MAIN ===== */
    main { padding-top: calc(var(--header-h) + var(--top-bar-h)); }    

     .banner {
      margin-top: calc(var(--header-h) + var(--top-bar-h));
     }


    nav {
      display: flex;
      gap: 1rem;
    }

    nav a {
      color: var(--text-light);
      text-decoration: none;
      font-weight: 600;
      padding: 0.5rem 1rem;
      border-radius: 6px;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      transition: background 0.3s;
      font-size: 12px;
    }

    nav a:hover { background: var(--primary-hover); }

    /* BOTÓN HAMBURGUESA */
    .menu-toggle {
      display: none;
      flex-direction: column;
      justify-content: space-between;
      width: 25px;
      height: 20px;
      cursor: pointer;
      margin-left: auto;
    }

    .menu-toggle span {
      display: block;
      height: 3px;
      width: 100%;
      background: var(--text-light);
      border-radius: 2px;
    }

    /* SIDEBAR */
    .sidebar {
      position: fixed;
      font-size: 12px;
      top: 0; right: -260px;
      width: 260px;
      height: 100%;
      background: var(--primary);
      display: flex;
      flex-direction: column;
      padding: 2rem 1rem;
      gap: 1rem;
      z-index: 9999;
      transition: right 0.3s ease;
      box-sizing: border-box;
    }

    .sidebar.show { right: 0; }

    .close-btn {
      align-self: flex-end;
      font-size: 2rem;
      background: none;
      border: none;
      color: var(--text-light);
      cursor: pointer;
      margin-bottom: 1rem;
    }

    .sidebar a {
      color: var(--text-light);
      text-decoration: none;
      font-weight: 600;
      padding: 0.75rem 1rem;
      border-radius: 6px;
      transition: background 0.3s;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .sidebar a:hover { background: var(--primary-hover); }

    .overlay {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 9998;
    }

    .overlay.show { display: block; }

    @media (max-width: 880px) {
      nav { display: none; }    /* oculto nav, uso drawer */
      .menu-toggle { display: flex; }
      header { padding: 0 12px; }

      .brand .brand-title {
        display: block !important;
      }      
    }


    .banner {
      height: 130px;
      background: url("../../../img/banner_equipo.webp") center/cover no-repeat;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      position: relative;
      width: 100%;
    }

    .banner::after {
      content: "";
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.35);
    }

    .banner h2 {
      position: relative;
      z-index: 1;
      font-size: 1.6rem;
      font-weight: 700;
    }

    .container { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 2rem; max-width: 960px; margin: auto; }

    .publicaciones-section { display: flex; justify-content: center; padding-bottom: 30px; width: 100%; }

    .paper-card {
      background: rgba(255, 255, 255, 0.25);
      backdrop-filter: blur(5px);
      max-width: 900px;
      width: 100%;
      text-align: center;
      padding: 2.5rem 2rem;
      border-radius: 20px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .paper-title { font-size: 1.4rem; color: #1e3a8a; margin-bottom: 1rem; }
    .paper-authors { color: #374151; }
    .paper-journal { color: #6b7280; margin-bottom: 1.5rem; }
    .paper-buttons { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
    .btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.4rem; border-radius: 10px; font-weight: 500; text-decoration: none; transition: all 0.25s ease; }
    .btn-online { background: #e5e7eb; color: #111; }
    .btn-online:hover { background: #d1d5db; }
    .btn-download { background: var(--primary); color: #fff; }
    .btn-download:hover { background: var(--primary-hover); }
    .paper-images { display: flex; justify-content: center; gap: 1.5rem; margin: 2rem 0; flex-wrap: wrap; }
    .paper-image { max-width: 420px; width: 100%; border-radius: 12px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
    .paper-image:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
    footer { background: var(--primary); color: white; text-align: center; padding: 1rem; }

    /* Modal corregido */
    .image-modal { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px); justify-content: center; align-items: center; overflow: hidden; }
    .image-modal.active { display: flex; animation: fadeIn 0.3s ease; }
    .modal-content-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 95vw; max-height: 95vh; }
    .modal-content-wrapper img { max-width: 100%; max-height: 85vh; border-radius: 10px; box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); animation: zoomIn 0.3s ease; }
    .modal-caption { color: #f1f1f1; font-size: 1rem; margin-top: 12px; text-align: center; }
    .close-modal { position: fixed; top: 20px; right: 25px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; z-index: 4000; transition: color 0.2s ease; background: rgba(0, 0, 0, 0.4); border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; }
    .close-modal:hover { color: #ccc; background: rgba(255, 255, 255, 0.15); }
    .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.15); border: none; border-radius: 50%; width: 50px; height: 50px; color: white; cursor: pointer; transition: background 0.3s ease, transform 0.2s ease; z-index: 3100; }
    .nav-btn:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-50%) scale(1.1); }
    .prev { left: 40px; } .next { right: 40px; }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }




        /* Bloque marca: foto + leyenda */
    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      color: var(--text-light);
      min-width: 0;
    }
    .brand img {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid rgba(255,255,255,0.35);
      box-shadow: 0 2px 6px rgba(0,0,0,0.25);
      display: block;
    }
    .brand .brand-title {
      font-weight: 700;
      font-size: 15px;
      line-height: 1;
      white-space: nowrap;
    }


    /* Mantener SIEMPRE la leyenda en móviles (más chica, con ellipsis si hace falta) */
    @media (max-width: 480px) {
      .brand { gap: 8px; max-width: 70vw; overflow: hidden; }
      .brand img { width: 28px; height: 28px; }
      .brand .brand-title {
        font-size: 15px; line-height: 1.1; font-weight: 700;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .1px;
      }
      .menu-toggle { flex: 0 0 26px; }
    }
    @media (max-width: 360px) {
      .brand img { width: 26px; height: 26px; }
      .brand .brand-title { font-size: 15px; }
    }


    @media (hover: none) and (pointer: coarse) {
      nav { display: none; }
      .menu-toggle { display: flex; }
    }    

    /* Mostrar menú normal solo en pantallas grandes (tablets horizontales y PCs) */
    @media (min-width: 1025px) {
      .menu-toggle { display: none; }
      .overlay, .sidebar { display: none !important; }
      nav { display: flex; }
    }


    /* ===== Ajuste del menú lateral en orientación apaisada (landscape mobile) ===== */
    @media screen and (orientation: landscape) and (max-width: 1024px) {
      .sidebar {
        padding: 1rem 0.5rem;  /* reduce espacio interno */
        gap: 0.5rem;
        overflow-y: auto;      /* permite hacer scroll si igual no entra */
      }

      .sidebar a {
        padding: 0.4rem 0.5rem;  /* menos alto */
        font-size: 11px;         /* texto un poco más chico */
      }

      .close-btn {
        margin-bottom: 0.5rem;
        font-size: 1.6rem;       /* botón más chico también */
      }
    }


    /* ===== HEADER responsive <= 1240px ===== */
    @media (max-width: 1240px) {

      /* Ocultar texto del nombre, mantener foto */
      .brand .brand-title {
        display: none;
      }

      /* Reducir tamaño de fuentes del header (≈40%) */
      header nav a {
        font-size: 10px; /* antes 12px */
        padding: 0.4rem 0.6rem;
      }

      /* Reducir íconos de navegación */
      header nav a svg,
      header nav a i,
      header .top-bar svg {
        width: 15px;
        height: 15px;
      }

      /* Reducir tamaño íconos Lucide (data-lucide) */
      i[data-lucide] {
        width: 15px;
        height: 15px;
      }

      /* Ajuste leve del brand (foto) */
      .brand img {
        width: 28px; /* antes 34px */
        height: 28px;
      }

      /* Ajustar altura visual del header */
      header {
        /*height: 52px; */
      }

      /* Ajustar padding horizontal */
      header {
        padding: 0 12px;
      }
    }


    .matriculas {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        margin-top: 5px;
        
    }
    .matriculas img{
       max-width: 30px;
    }
