/* =======================================
   Genética Jovellanos – Global Styles
   Palette: Blue (#011957), Gold (#fcbd00), White, Black
   ======================================= */

   :root{
    --gold: #fcbd00;
    --blue: #011957;
    --white: #ffffff;
    --black: #000000;
  }
  
  /* Reset & typography */
  *{ box-sizing: border-box; }
  html{ height: 100%; }
  body{
    margin: 0;
    color: var(--black);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(to bottom, #ffffff, #f9f9fc);
  }
  
  /* Layout: sticky footer + unified width */
  body.page{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  main{
    flex: 1;
    padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 3vw, 1.5rem);
    max-width: 900px;      /* same width on all pages */
    margin: 0 auto;
  }
  
  /* Section panel look */
  main > section{
    background: #f2f2f7;
    padding: 2rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid rgba(1,25,87,0.15);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  }
  
  /* Headings */
  h1, h2, h3{
    color: var(--blue);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.5rem;
    margin: 0 0 1rem;
  }
  
  /* =======================================
     Global list styling (all pages)
     ======================================= */
  main ul, main ol{
    margin: 0 0 1rem;
    padding-left: 1.3rem;
  }
  main li{ margin: 0.35rem 0; line-height: 1.6; }
  main ul li::marker{ color: var(--gold); font-size: 1.1em; }
  main ol{ list-style: decimal; }
  main ol li::marker{ color: var(--blue); font-weight: 700; }
  main ul ul, main ul ol, main ol ul, main ol ol{
    margin: .35rem 0;
    padding-left: 1.1rem;
    font-size: .95em;
    opacity: .95;
  }
  /* Optional utilities */
  main .list-columns{ columns: 2; column-gap: 2rem; }
  main .list-columns li{ break-inside: avoid; }
  main .list-accent{ list-style: none; padding-left: 0; margin: 1rem 0; }
  main .list-accent li{
    position: relative;
    padding: .55rem .9rem .55rem 2.2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(1,25,87,.06);
    margin: .5rem 0;
  }
  main .list-accent li::before{
    content: "";
    position: absolute;
    left: .9rem; top: 50%;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--gold);
    transform: translateY(-50%);
  }
  
  /* Historia specifics */
  main ol{ padding-left: 1.2rem; }
  main ol > li{ margin-bottom: 2rem; }
  main ol > li > ul{ margin-top: .5rem; padding-left: 1.2rem; }
  main ol > li > p{ margin-top: .8rem; }
  main ol > li > strong{
    color: var(--blue);
    font-size: 1.1rem;
    font-weight: 600;
  }
  
  /* ---------------------------------------
     Header / Navigation
     --------------------------------------- */
  header{
    position: relative;
    background: linear-gradient(to bottom, #011957, #000b34); /* blue gradient */
    color: var(--gold);
    text-align: center;
    padding: .9rem 1rem .6rem;
    border-bottom: 2px solid var(--gold);
  }
  .nav-container{
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  /* Logo */
  .brand{
    height: clamp(120px, 20vw, 220px);
    width: auto;
    display: block;
    margin: 0 0 .8rem;
  }
  
  /* Hamburger button (top-right) */
  .menu-toggle{
    position: absolute;
    top: 10px;
    right: clamp(12px, 4vw, 24px);
    width: 32px;
    height: 24px;
    display: none; /* shown on mobile only */
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 1100; /* above drawer */
  }
  .menu-toggle span{
    display: block;
    height: 2px;
    width: 100%;
    background: var(--gold);  /* yellow lines */
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
    position: relative;
  }
  .menu-toggle span:nth-child(2){ margin: 6px 0; }
  /* morph to X when open */
  .menu-toggle.open span:nth-child(1){
    transform: rotate(45deg) translate(5px, 5px);
  }
  .menu-toggle.open span:nth-child(2){
    opacity: 0;
  }
  .menu-toggle.open span:nth-child(3){
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Gold line under logo, inset from sides */
  nav{
    border-top: 2px solid var(--gold);
    margin: 0 clamp(1rem, 5vw, 2rem);
    padding-top: 0.6rem;
    width: 100%;
  }
  nav ul{
    list-style: none;
    padding: 0;
    margin: 0;
  }
  nav li{
    display: inline-block;
    margin: 0 0.6rem;
  }
  nav a{
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s ease;
  }
  nav a:hover,
  nav a:focus{
    color: var(--gold);
    outline: none;
  }
  
  /* Media */
  img{ max-width: 100%; height: auto; display: block; }
  .table-scroll{ overflow-x: auto; }
  
  /* ---------------------------------------
     Footer + Social icons
     --------------------------------------- */
  footer{
    background: var(--blue);
    color: var(--white);
    text-align: center;
    padding: 1.1rem;
    border-top: 2px solid var(--gold);
    font-size: .95rem;
  }
  .social-links{
    margin-top: .75rem;
    display: flex;
    justify-content: center;
    gap: 1.2rem;
  }
  .social-links a{
    font-size: 1.5rem;
    color: var(--white);
    transition: color .2s ease, transform .2s ease;
  }
  .social-links a:hover{
    color: var(--gold);
    transform: scale(1.15);
  }
  
  /* ---------------------------------------
     Contact form
     --------------------------------------- */
  .contact-form{
    display: grid;
    gap: .9rem;
    width: 100%;        /* form spans section width */
    margin-top: .75rem;
  }
  .contact-form label{
    font-weight: 600;
    color: var(--blue);
    margin-bottom: .15rem;
  }
  .contact-form input,
  .contact-form textarea{
    width: 100%;
    max-width: 600px;   /* cap fields so they don’t look too long */
    padding: .7rem .85rem;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: var(--black);
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .contact-form input:hover,
  .contact-form textarea:hover{ border-color: #cfcfcf; }
  .contact-form input:focus,
  .contact-form textarea:focus{
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(252,189,0,.25);
  }
  .contact-form button{
    justify-self: start;
    background: var(--blue);
    color: var(--white);
    border: none;
    padding: .7rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: .2px;
    transition: transform .08s ease, background .2s ease, box-shadow .2s ease;
  }
  .contact-form button:hover{
    background: #0e2377;
    box-shadow: 0 8px 22px rgba(1,25,87,.25);
  }
  .contact-form button:active{ transform: translateY(1px); }
  .contact-form + p{ color: #666; }
  
  /* Hide honeypot field */
  .hp{
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  /* ---------------------------------------
     Masonry galleries (Eventos & Gallos)
     --------------------------------------- */
  .masonry{
    column-count: 1;
    column-gap: 1rem;
    margin-top: 1rem;
  }
  .masonry .card{
    width: 100%;
    display: block;
    break-inside: avoid;
    margin: 0 0 1rem;
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0,0,0,.08);
    transform: translateY(20px) scale(.98);
    opacity: 0;
    transition:
      transform .5s cubic-bezier(.2,.8,.2,1),
      opacity .5s ease,
      box-shadow .25s ease;
    background: #fff;
  }
  .masonry .card.tall{ aspect-ratio: 3/4; object-fit: cover; }
  .masonry .card.wide{ aspect-ratio: 4/3; object-fit: cover; }
  .masonry .card:hover{
    transform: translateY(0) scale(1.01);
    box-shadow: 0 10px 28px rgba(1,25,87,.25);
  }
  .masonry .card.in-view{
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  @media (min-width: 600px){ .masonry{ column-count: 2; } }
  @media (min-width: 900px){ .masonry{ column-count: 3; } }
  @media (min-width: 1200px){ .masonry{ column-count: 4; } }
  
  /* ---------------------------------------
     Próximamente visuals
     --------------------------------------- */
  .protagonist{
    text-align: center;
    margin-bottom: 2rem;
  }
  .protagonist img{
    max-width: 400px;    /* reduced size */
    width: 90%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(1,25,87,0.15);
    margin: 0 auto;
    display: block;
  }
  
  .silhouettes{
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }
  .silhouettes img{
    width: 180px;        /* larger silhouettes */
    height: auto;
    filter: brightness(0);                 /* solid black */
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);  /* subtle shadow */
    border-radius: 6px;
  }
  .silhouettes img:hover{
    transform: scale(1.15);
    box-shadow: 0 10px 20px rgba(0,0,0,0.35);
  }
  
  /* ============================
     Mobile: Drawer, Overlay & Animations
     ============================ */
  @media (max-width: 740px){
    .menu-toggle{ display: inline-block; }
  
    /* Off-canvas drawer */
    nav ul{
      position: fixed;
      top: 0;
      right: 0;
      height: 100vh;
      width: min(80vw, 300px);
      padding: 5rem 1.25rem 2rem;
      margin: 0;
      background: var(--blue);
      border-left: 2px solid var(--gold);
      box-shadow: -18px 0 30px rgba(0,0,0,.25);
      transform: translateX(100%);   /* start off-screen */
      opacity: 0;
      transition: transform 0.35s ease, opacity 0.35s ease;
      display: block;
      text-align: left;
      z-index: 1000;
    }
    nav ul.open{
      transform: translateX(0);
      opacity: 1;
    }
  
    nav li{
      display: block;
      margin: 0 0 0.9rem;
    }
    nav a{
      display: block;
      padding: .4rem 0;
    }
  
    /* Drawer link animations: staggered */
    nav ul li a{
      opacity: 0;
      transform: translateX(12px);
      transition: opacity .35s ease, transform .35s ease;
    }
    nav ul.open li:nth-child(1) a{ transition-delay: .05s; opacity:1; transform: translateX(0); }
    nav ul.open li:nth-child(2) a{ transition-delay: .10s; opacity:1; transform: translateX(0); }
    nav ul.open li:nth-child(3) a{ transition-delay: .15s; opacity:1; transform: translateX(0); }
    nav ul.open li:nth-child(4) a{ transition-delay: .20s; opacity:1; transform: translateX(0); }
    nav ul.open li:nth-child(5) a{ transition-delay: .25s; opacity:1; transform: translateX(0); }
  
    /* Form fields full width on phones */
    .contact-form input,
    .contact-form textarea{ max-width: 100%; }
  }
  
  /* Overlay behind the drawer */
  .menu-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;  /* smooth fade */
    z-index: 900; /* below drawer (1000) and hamburger (1100) */
  }
  .menu-overlay.active{
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Accessibility: reduced motion */
  @media (prefers-reduced-motion: reduce){
    nav ul,
    .menu-overlay,
    nav ul li a{ transition: none !important; }
  }
  
/* Force Próximamente + Contáctanos to match full width */
body.proximamente main,
body.contactanos main {
  max-width: 900px;   /* same as the other sections */
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 3vw, 1.5rem);
}

@media (max-width: 740px){
  .brand{
    height: clamp(160px, 50vw, 240px); /* larger logo */
    margin: 0 0 0.5rem;                 /* less gap under logo */
  }
}
