/*
Theme Name: Libertarios Theme
Author: Gustavo
Version: 1.0
*/

    /* ============================================================
       VARIABLES & RESET
    ============================================================ */
    :root {
      --gold: #d4af37;
      --gold-dim: #b8942a;
      --bg-dark: #111214;
      --bg-card: #1a1c1f;
      --bg-header: #161719;
      --bg-footer: #13151a;
      --text-muted: #999;
      --text-light: #ccc;
      --green-wa: #25D366;
      --header-h: 66px;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

    body {
      font-family: 'Lato', sans-serif;
      background-color: var(--bg-dark);
      color: white;
      min-height: 100vh;
      user-select: none;
      -webkit-user-select: none;
      overflow-x: hidden;
    }

    img { max-width: 100%; height: auto; display: block; }

    /* ============================================================
       HEADER
    ============================================================ */
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      background-color: var(--bg-header);
      position: sticky;
      top: 0;
      z-index: 200;
      border-bottom: 1px solid rgba(212,175,55,0.14);
      height: var(--header-h);
    }

    .logo { display: flex; align-items: center; gap: 10px; min-width: 0; }

    .logo-circle {
      width: 40px; height: 40px;
      border-radius: 50%;
      background: var(--gold);
      display: flex; align-items: center; justify-content: center;
      font-family: 'Playfair Display', serif;
      font-weight: 700; font-size: 15px; color: #111;
      flex-shrink: 0; overflow: hidden;
    }
    .logo-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

    .logo-name {
      font-family: 'Playfair Display', serif;
      color: var(--gold);
      font-size: clamp(15px, 4vw, 20px);
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ============================================================
       HAMBURGER — mobile only
    ============================================================ */
    .hamburger {
      width: 42px; height: 42px;
      border-radius: 50%; background: white;
      display: flex; flex-direction: column;
      justify-content: center; align-items: center;
      gap: 5px; cursor: pointer; flex-shrink: 0;
      transition: background 0.2s; border: none; padding: 0;
    }
    .hamburger span {
      width: 18px; height: 2px; background: #111;
      border-radius: 4px; transition: 0.3s ease; display: block;
    }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

    /* ============================================================
       NAV MENU — desktop horizontal (inside header)
    ============================================================ */
    .nav-menu {
      display: none;
      flex-direction: row;
      align-items: center;
      gap: 2px;
    }
    .nav-menu a {
      color: var(--gold); text-decoration: none;
      font-size: 15px; padding: 8px 15px; border-radius: 9px;
      transition: background 0.15s; cursor: pointer;
      font-family: 'Lato', sans-serif; font-weight: 400; white-space: nowrap;
    }
    .nav-menu a:hover, .nav-menu a.current {
      background: rgba(212,175,55,0.18); font-weight: 700;
    }

    /* ============================================================
       NAV DROPDOWN — mobile floating panel
    ============================================================ */
    .nav-dropdown {
      display: none; flex-direction: column;
      position: fixed; top: calc(var(--header-h) + 6px); right: 12px;
      background: rgba(24,26,30,0.97); border-radius: 14px; padding: 8px;
      min-width: 160px; z-index: 9999;
      box-shadow: 0 12px 40px rgba(0,0,0,0.65);
      backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(212,175,55,0.18);
    }
    @keyframes menuIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
    .nav-dropdown.open { display: flex; animation: menuIn 0.18s ease; }
    .nav-dropdown a {
      color: var(--gold); text-decoration: none; font-size: 15px;
      padding: 10px 16px; border-radius: 9px; transition: background 0.15s;
      cursor: pointer; font-family: 'Lato', sans-serif; font-weight: 400; white-space: nowrap;
    }
    .nav-dropdown a:hover, .nav-dropdown a.current {
      background: rgba(212,175,55,0.18); font-weight: 700;
    }

    /* ============================================================
       PAGE TRANSITIONS
    ============================================================ */
    /* .page { display: none; animation: fadeIn 0.28s ease; } */
    /*.page.active { display: block; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } } */

    /* ============================================================
       HERO
    ============================================================ */
    .hero {
      text-align: center;
      padding: clamp(50px, 10vw, 110px) clamp(20px, 6vw, 80px) clamp(50px, 8vw, 90px);
      background: url('fondo.jpg') no-repeat center center / cover;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: clamp(320px, 50vw, 520px);
    }
    .hero::before {
      content: "";
      position: absolute; inset: 0;
      background: rgba(0,0,0,0.58);
      z-index: 0;
    }
    .hero > * { position: relative; z-index: 1; }

    .hero h1 {
      font-family: 'Playfair Display', serif;
      color: var(--gold);
      font-size: clamp(32px, 7vw, 58px);
      margin-bottom: clamp(12px, 2vw, 20px);
      line-height: 1.15;
    }
    .hero p {
      color: var(--text-light);
      font-size: clamp(15px, 2.5vw, 18px);
      line-height: 1.7;
      max-width: 480px;
      margin: 0 auto clamp(22px, 4vw, 34px);
    }

    /* ============================================================
       BUTTONS
    ============================================================ */
    .btn-wa {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: var(--green-wa);
      color: white;
      font-weight: 700;
      font-size: clamp(14px, 2.5vw, 17px);
      padding: clamp(12px, 2vw, 16px) clamp(22px, 4vw, 36px);
      border-radius: 50px;
      text-decoration: none;
      transition: background 0.2s, transform 0.15s;
      white-space: nowrap;
    }
    .btn-wa:hover { background: #1ebe5a; transform: scale(1.03); }
    .btn-wa svg { width: 20px; height: 20px; fill: white; flex-shrink: 0; }

    .btn-curso, .btn-modulo {
      background: linear-gradient(135deg, #d4af37, #b8942a);
      color: #111;
      border: none;
      padding: 11px 20px;
      border-radius: 10px;
      font-weight: 700;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.22s ease;
      box-shadow: 0 4px 14px rgba(212,175,55,0.22);
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-top: 12px;
      font-family: 'Lato', sans-serif;
    }
    .btn-curso::after { content: "→"; font-weight: 900; }
    .btn-curso:hover, .btn-modulo:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 18px rgba(212,175,55,0.35); }
    .btn-curso:active, .btn-modulo:active { transform: scale(0.97); }

    /* ============================================================
       DIVIDER
    ============================================================ */
    .gold-divider {
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--gold), transparent);
      margin: 0 clamp(16px, 5vw, 60px);
      opacity: 0.45;
    }

    /* ============================================================
       PAGE TITLE
    ============================================================ */
    .page-title {
      font-family: 'Playfair Display', serif;
      color: var(--gold);
      font-size: clamp(26px, 6vw, 42px);
      text-align: center;
      padding: clamp(30px, 5vw, 54px) clamp(16px, 5vw, 40px) clamp(10px, 2vw, 16px);
    }

    /* ============================================================
       TEAM
    ============================================================ */
    .inicio-team { padding: clamp(24px, 4vw, 40px) clamp(12px, 3vw, 20px); }

    .team-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 18px;
      padding: 16px clamp(12px, 4vw, 20px) clamp(30px, 5vw, 50px);
      max-width: 1140px;
      margin: 0 auto;
    }

    .member-card {
      background: var(--bg-card);
      border: 1.5px solid var(--gold);
      border-radius: 18px;
      padding: clamp(22px, 4vw, 32px) clamp(18px, 3vw, 26px);
      text-align: center;
      transition: transform 0.2s;
    }
    .member-card:hover { transform: translateY(-3px); }

    .avatar-circle {
      width: 86px; height: 86px;
      border-radius: 50%;
      border: 2.5px solid var(--gold);
      background: #222;
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 14px;
      font-family: 'Playfair Display', serif;
      font-size: 24px;
      color: var(--gold);
      font-weight: 600;
      overflow: hidden;
      flex-shrink: 0;
    }
    .avatar-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

    .member-name { font-family: 'Playfair Display', serif; color: var(--gold); font-size: 18px; margin-bottom: 4px; }
    .member-role { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
    .member-desc { color: var(--text-light); font-size: 13px; line-height: 1.65; }

    /* ============================================================
       NEWS
    ============================================================ */
    .news-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      padding: 16px clamp(12px, 4vw, 20px) clamp(30px, 5vw, 50px);
      max-width: 1140px;
      margin: 0 auto;
    }

    .news-card {
      background: var(--bg-card);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px;
      padding: clamp(18px, 3vw, 24px) clamp(16px, 3vw, 22px);
      transition: border-color 0.2s;
    }
    .news-card:hover { border-color: rgba(212,175,55,0.42); }
    .news-card h3 { font-weight: 700; font-size: 16px; color: white; margin-bottom: 12px; }
    .news-card p { color: var(--text-muted); font-size: 14px; line-height: 1.65; margin-bottom: 14px; }

    .news-date {
      display: inline-block;
      background: rgba(212,175,55,0.16);
      color: var(--gold);
      font-size: 12px;
      padding: 5px 13px;
      border-radius: 20px;
    }

    /* Slider */
    .news-slider { position: relative; margin-bottom: 14px; user-select: none; }

    .slider-img {
      width: 100%;
      height: clamp(160px, 30vw, 220px);
      object-fit: cover;
      border-radius: 10px;
      display: none;
      cursor: pointer;
    }
    .slider-img.active { display: block; }

    .news-slider button {
      position: absolute; top: 50%; transform: translateY(-50%);
      background: rgba(0,0,0,0.55);
      border: none; color: white;
      font-size: 18px;
      width: 30px; height: 30px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; border-radius: 50%;
      transition: background 0.2s;
      z-index: 2;
    }
    .news-slider button:hover { background: rgba(212,175,55,0.72); }
    .news-slider .prev { left: 7px; }
    .news-slider .next { right: 7px; }

    .news-single-img {
      width: 100%;
      height: clamp(160px, 30vw, 220px);
      object-fit: cover;
      border-radius: 10px;
      margin-bottom: 14px;
      cursor: pointer;
      display: block;
    }

    /* ============================================================
       LIGHTBOX
    ============================================================ */
    .lightbox {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.96);
      display: flex; align-items: center; justify-content: center;
      z-index: 999999;
      padding: 16px;
    }
    .lightbox img {
      max-width: 100%; max-height: 85dvh;
      border-radius: 8px;
      object-fit: contain;
    }
    .lightbox button {
      position: absolute; top: 50%; transform: translateY(-50%);
      background: rgba(255,255,255,0.18);
      border: none; color: white; font-size: 26px;
      padding: 10px 13px;
      cursor: pointer; border-radius: 50%;
      transition: background 0.2s;
    }
    .lightbox button:hover { background: rgba(255,255,255,0.32); }
    .lightbox .prev { left: clamp(8px, 3vw, 24px); }
    .lightbox .next { right: clamp(8px, 3vw, 24px); }
    .lightbox-close {
      position: absolute; top: 14px; right: 14px;
      background: rgba(255,255,255,0.18);
      border: none; color: white; font-size: 20px;
      width: 36px; height: 36px;
      cursor: pointer; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.2s;
      z-index: 2;
    }
    .lightbox-close:hover { background: rgba(212,175,55,0.6); }

    /* ============================================================
       SERVICES
    ============================================================ */
    .services-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      padding: 16px clamp(12px, 4vw, 20px) clamp(30px, 5vw, 50px);
      max-width: 1140px;
      margin: 0 auto;
    }

    .service-card {
      background: var(--bg-card);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px;
      padding: clamp(20px, 3vw, 26px) clamp(16px, 3vw, 22px);
      transition: border-color 0.2s;
    }
    .service-card:hover { border-color: rgba(212,175,55,0.36); }
    .service-icon { font-size: 34px; margin-bottom: 11px; display: block; }
    .service-card h3 { font-weight: 700; font-size: 16px; color: white; margin-bottom: 8px; }
    .service-card p { color: var(--text-muted); font-size: 14px; line-height: 1.65; }

    /* Formación toggle content */
    .formacion-content, .gratis-content {
      display: none;
      margin-top: 14px;
      border-top: 1px solid rgba(255,255,255,0.1);
      padding-top: 14px;
    }
    .formacion-content p, .gratis-content p { margin-bottom: 9px; }

    /* ============================================================
       CONTACT
    ============================================================ */
    .contact-section {
      text-align: center;
      padding: clamp(55px, 10vw, 110px) clamp(20px, 6vw, 80px) clamp(55px, 8vw, 90px);
      min-height: 60vh;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
    }
    .contact-section h1 {
      font-family: 'Playfair Display', serif;
      color: var(--gold);
      font-size: clamp(28px, 6vw, 50px);
      margin-bottom: 16px;
    }
    .contact-section p {
      color: var(--text-light);
      font-size: clamp(14px, 2.2vw, 17px);
      line-height: 1.7;
      max-width: 420px;
      margin: 0 auto 28px;
    }

    /* ============================================================
       FOOTER
    ============================================================ */
    .footer {
      background: var(--bg-footer);
      padding: clamp(34px, 5vw, 52px) clamp(16px, 5vw, 60px) clamp(24px, 4vw, 36px);
      text-align: center;
    }
    .footer h3 {
      color: var(--gold);
      font-family: 'Playfair Display', serif;
      font-size: clamp(16px, 3.5vw, 22px);
      margin-bottom: 22px;
      font-weight: 600;
    }

    .social-icons {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 12px;
      margin-bottom: 28px;
    }
    .social-icons a {
      width: 50px; height: 50px;
      border-radius: 50%;
      border: 2px solid var(--gold);
      display: flex; align-items: center; justify-content: center;
      color: var(--gold);
      text-decoration: none;
      font-size: 17px;
      transition: background 0.2s, transform 0.15s;
      flex-shrink: 0;
    }
    .social-icons a:hover { background: var(--gold); color: #111; transform: scale(1.08); }
    .social-icons svg { width: 22px; height: 22px; fill: currentColor; }

    .social-juventud {
      border-color: #a855f7 !important;
      color: #a855f7 !important;
      flex-direction: column !important;
      gap: 3px !important;
      width: auto !important;
      height: auto !important;
      min-height: 50px;
      padding: 7px 12px !important;
      border-radius: 14px !important;
    }
    .social-juventud:hover { background: #a855f7 !important; color: white !important; }
    .juventud-label { font-size: 8px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; line-height: 1; }

    .footer-copy {
      color: var(--text-muted);
      font-size: 12px;
      padding-top: 18px;
      border-top: 1px solid rgba(255,255,255,0.07);
    }

    /* ============================================================
       CURSO — progress bar
    ============================================================ */
    .progress-bar-wrap {
      background: rgba(255,255,255,0.08);
      border-radius: 20px; height: 8px;
      margin: 0 clamp(12px, 4vw, 20px) 8px;
      overflow: hidden;
      max-width: 800px;
      margin-left: auto; margin-right: auto;
    }
    .progress-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--gold-dim), var(--gold));
      border-radius: 20px;
      transition: width 0.5s ease;
    }
    .progress-label {
      text-align: center;
      color: var(--text-muted);
      font-size: 13px;
      margin-bottom: 18px;
    }

    /* ============================================================
       MODULO
    ============================================================ */
    .modulo { max-width: 800px; margin: 0 auto; width: 100%; }
    .modulo p { margin-bottom: 11px; line-height: 1.8; }

    .eval-label {
      display: block;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.09);
      border-radius: 8px;
      padding: 10px 14px;
      margin-top: 7px;
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s;
      font-size: 14px;
      color: var(--text-light);
      line-height: 1.5;
    }
    .eval-label:hover { border-color: rgba(212,175,55,0.42); background: rgba(212,175,55,0.07); }
    .eval-label input { margin-right: 9px; accent-color: var(--gold); }

    /* ============================================================
       GALERÍA
    ============================================================ */
    .galeria-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 18px;
      padding: 0 clamp(12px, 4vw, 20px) clamp(24px, 4vw, 40px);
      max-width: 1140px;
      margin: 0 auto;
    }

    .galeria-item {
      background: var(--bg-card);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px;
      overflow: hidden;
      transition: border-color 0.2s, transform 0.2s;
    }
    .galeria-item:hover { border-color: rgba(212,175,55,0.4); transform: translateY(-2px); }

    .galeria-img-wrap { position: relative; overflow: hidden; }
    .galeria-img-wrap img {
      width: 100%;
      height: clamp(160px, 28vw, 210px);
      object-fit: cover;
      display: block;
      cursor: pointer;
      transition: transform 0.3s ease;
    }
    .galeria-img-wrap:hover img { transform: scale(1.04); }

    .galeria-video-wrap {
      position: relative;
      padding-top: 56.25%;
      background: #000;
    }
    .galeria-video-wrap iframe {
      position: absolute; inset: 0;
      width: 100%; height: 100%;
      border: none;
    }

    .galeria-info { padding: 14px 16px 16px; }
    .galeria-info h4 { color: white; font-size: 15px; font-weight: 700; margin-bottom: 5px; }
    .galeria-info p { color: var(--text-muted); font-size: 13px; line-height: 1.55; margin-bottom: 8px; }
    .galeria-fecha { color: var(--gold); font-size: 12px; opacity: 0.8; }

    .galeria-tag {
      display: inline-block;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 20px;
      margin-bottom: 7px;
      letter-spacing: 0.3px;
    }
    .galeria-tag.foto { background: rgba(212,175,55,0.15); color: var(--gold); }
    .galeria-tag.video { background: rgba(59,130,246,0.18); color: #60a5fa; }

    /* Filtros */
    .filtro-btn {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      color: var(--text-light);
      padding: 8px 18px;
      border-radius: 20px;
      font-size: 14px;
      font-family: 'Lato', sans-serif;
      cursor: pointer;
      transition: all 0.18s;
    }
    .filtro-btn:hover, .filtro-btn.active {
      background: var(--gold);
      color: #111;
      border-color: var(--gold);
      font-weight: 700;
    }

    /* ============================================================
       RESPONSIVE GRID BREAKPOINTS
    ============================================================ */

    /* Tablet ≥ 600px */
    @media (min-width: 600px) {
      .team-grid { grid-template-columns: repeat(2, 1fr); }
      .news-grid { grid-template-columns: repeat(2, 1fr); }
      .services-grid { grid-template-columns: repeat(2, 1fr); }
      .galeria-grid { grid-template-columns: repeat(2, 1fr); }
    }

    /* Desktop ≥ 900px */
    @media (min-width: 900px) {
      .hamburger { display: none; }
      .nav-dropdown { display: none !important; }
      .nav-menu { display: flex; }

      .header { padding: 12px clamp(24px, 4vw, 50px); }

      .team-grid { grid-template-columns: repeat(3, 1fr); }
      .news-grid { grid-template-columns: repeat(3, 1fr); }
      .services-grid { grid-template-columns: repeat(3, 1fr); }
      .galeria-grid { grid-template-columns: repeat(3, 1fr); }
    }

    /* Large desktop ≥ 1100px */
    @media (min-width: 1100px) {
      .team-grid { grid-template-columns: repeat(4, 1fr); }
    }

    /* Small phones — extra compact */
    @media (max-width: 380px) {
      .logo-name { font-size: 14px; }
      .btn-wa { font-size: 13px; padding: 11px 18px; }
      .social-icons a { width: 44px; height: 44px; }
      .social-icons svg { width: 19px; height: 19px; }
    }

    .icon-small { font-size: 18px !important; }

    .card-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--gold);
      text-decoration: none;
      font-size: 14px;
      margin-top: 12px;
      transition: opacity 0.15s;
    }
    .card-link:hover { opacity: 0.75; }
    .card-link svg { width: 17px; height: 17px; fill: var(--gold); flex-shrink: 0; }

    .btn-card-cta {
      display: inline-block;
      margin-top: 12px;
      background: var(--gold);
      color: #111;
      padding: 10px 16px;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 700;
      font-size: 14px;
      cursor: pointer;
      border: none;
      font-family: 'Lato', sans-serif;
      transition: opacity 0.15s, transform 0.15s;
    }
    .btn-card-cta:hover { opacity: 0.88; transform: scale(1.02); }

    .news-slider { touch-action: pan-y; }