/* ======================================================
   VARIABLES INSTITUCIONALES
   ====================================================== */
:root{
  --vino: #7A1632;
  --vino-900: #5D0F25;
  --arena: #C9B98F;
  --arena-2: #BFAE80;

  --gris-100: #F4F4F6;

  --texto: #141416;
  --muted: rgba(20,20,22,.72);
  --borde: rgba(0,0,0,.10);

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

*{ box-sizing:border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--texto);
  background: var(--gris-100);
}

.container{
  width: min(1200px, 92%);
  margin: 0 auto;
}

.muted{ color: var(--muted); }

/* ======================================================
   GRECAS
   ====================================================== */
.greca{
  height: 28px;
  background-image: url("img/grecas.png");
  background-repeat: repeat-x;
  background-size: auto 28px;
  background-position: center;
}
.greca--top{ border-bottom: 1px solid rgba(255,255,255,.14); }
.greca--bottom{ border-top: 1px solid rgba(255,255,255,.14); }

/* ======================================================
   HEADER / TOPBAR
   ====================================================== */
.site-header{
  background: var(--vino-900);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.topbar{ padding: 14px 0; }

.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 260px;
}

.brand__logo{
  height: 54px;
  width:auto;
  display:block;
}

.brand__text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.brand__title{
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .2px;
  color: var(--arena);
}

.brand__subtitle{
  font-size: 12px;
  opacity: .90;
}

.topbar__nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.topbar__actions{
  display:flex;
  gap:10px;
  align-items:center;
}

/* ======================================================
   BOTONES
   ====================================================== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration:none;
  font-weight: 900;
  font-size: 14px;
  border: 1px solid transparent;
  cursor:pointer;
  user-select:none;
}

.btn--primary{
  background: rgba(255,255,255,.14);
  color:#fff;
  border-color: rgba(255,255,255,.26);
}
.btn--primary:hover{ background: rgba(255,255,255,.20); }

.btn--ghost{
  background: transparent;
  color:#fff;
  border-color: rgba(255,255,255,.35);
}
.btn--ghost:hover{ background: rgba(255,255,255,.15); }

/* ======================================================
   SUBMENÚS (dropdown con <details>)
   ====================================================== */
.navdrop{ position: relative; }

.navdrop > summary{ list-style:none; }
.navdrop > summary::-webkit-details-marker{ display:none; }

.navdrop__summary{
  position: relative;
  padding-right: 34px;
}
.navdrop__summary::after{
  content:"▾";
  position:absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: .9;
}

.navdrop__panel{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;

  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 14px 30px rgba(0,0,0,.14);
  padding: 10px;
  z-index: 999;
}

.navdrop:not([open]) .navdrop__panel{ display:none; }

.navdrop__item{
  display:block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration:none;
  color: var(--texto);
  font-weight: 900;
  font-size: 13px;
}
.navdrop__item:hover{
  background: rgba(122,22,50,.10);
  color: var(--vino);
}

.navdrop__group{ padding:4px; }

.navdrop__title{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .3px;
  color: rgba(20,20,22,.65);
  padding: 6px 10px 8px;
}

.navdrop__divider{
  height: 1px;
  background: rgba(0,0,0,.10);
  margin: 8px 6px;
}

/* ======================================================
   MAIN + FONDO SUAVE DEL PORTAL (sin afectar login)
   ====================================================== */
main.container{
  padding: 18px 0 0;
  position: relative;
}

/* Fondo suave SOLO en portal normal */
body:not(.is-login) main.container::before{
  content:"";
  position:absolute;
  inset: -10px 0 auto 0;
  height: 520px;
  background:
    radial-gradient(520px 260px at 12% 0%, rgba(122,22,50,.10), transparent 60%),
    radial-gradient(520px 260px at 88% 18%, rgba(201,185,143,.12), transparent 62%);
  pointer-events:none;
  z-index: 0;
}
body:not(.is-login) main.container > *{ position: relative; z-index: 1; }

/* ======================================================
   HERO (GLASS GUINDA)
   ====================================================== */
.hero{
  position: relative;
  border-radius: var(--radius);
  overflow:hidden;
  padding: 34px 22px;
  margin-bottom: 18px;

  background: rgba(122,22,50,.86);
  border: 1px solid rgba(255,255,255,.14);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    0 18px 44px rgba(0,0,0,.14),
    inset 0 1px 0 rgba(255,255,255,.10);

  color:#fff;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(420px 200px at 18% 10%, rgba(201,185,143,.22), transparent 60%),
    radial-gradient(420px 200px at 90% 30%, rgba(255,255,255,.08), transparent 62%),
    linear-gradient(135deg, rgba(0,0,0,.10), transparent 58%);
  pointer-events:none;
}

.hero::after{
  content:"";
  position:absolute;
  right:-40px;
  top:-20px;
  width:min(520px, 55%);
  height: 120%;
  background: url("img/SPCH_LOGO_FONDOCLARO.png") no-repeat right center / contain;
  opacity:.09;
  pointer-events:none;
}

.hero > *{ position:relative; z-index:1; }

.hero h1{
  margin:0 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: .2px;
}

.hero p,
.hero .muted{
  margin:0 0 16px;
  color: rgba(255,255,255,.78);
}

/* Botón del hero en arena */
.hero .btn--primary{
  background: var(--arena);
  border-color: rgba(255,255,255,.10);
  color: #1b1400;
}
.hero .btn--primary:hover{ background: var(--arena-2); }

/* ======================================================
   SECCIONES / TARJETAS
   ====================================================== */
.section{ margin: 22px 0; }

.section__title{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 0 0 10px;
}

.section__title::before{
  content:"";
  width: 10px;
  height: 22px;
  border-radius: 999px;
  background: var(--vino);
}

.cardgrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card{
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(0,0,0,.10);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  padding: 14px;

  position: relative;
  overflow: hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(122,22,50,.10), rgba(201,185,143,.10));
  opacity: .28;
  pointer-events:none;
}

.card > *{ position: relative; z-index: 1; }

.card a{
  color: var(--vino);
  font-weight: 900;
  text-decoration:none;
}
.card a:hover{ text-decoration: underline; }

/* ======================================================
   NOTICIAS / BOLETINES (GLASS GUINDA TIPO SITIO OFICIAL)
   ====================================================== */
#noticias .news{
  background: rgba(122,22,50,.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 18px 44px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.10);

  border-radius: var(--radius);
  overflow:hidden;
  position: relative;
}

#noticias .news::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:
    radial-gradient(420px 200px at 14% 0%, rgba(201,185,143,.22), transparent 60%),
    radial-gradient(480px 220px at 92% 28%, rgba(255,255,255,.08), transparent 62%),
    linear-gradient(135deg, rgba(0,0,0,.10), transparent 60%);
  pointer-events:none;
}

#noticias .news > *{ position: relative; z-index: 1; }

.news__viewport{ overflow:hidden; }

.news__track{
  display:flex;
  transition: transform .45s ease;
  will-change: transform;
}

.news__slide{
  flex: 0 0 100%;
  padding: 16px;
}

#noticias .news__card{
  display:grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  align-items: stretch;

  background: rgba(255,255,255,.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 14px 30px rgba(0,0,0,.10);
  overflow:hidden;
}

.news__img{
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: rgba(255,255,255,.18);
}

.news__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  filter: saturate(1.02) contrast(1.02);
}

.news__body{ padding: 12px 12px 12px 0; }

.news__meta{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(20,20,22,.62);
  margin-bottom: 6px;
}

.news__title{
  margin:0 0 6px;
  font-size: 16px;
  font-weight: 900;
  color: var(--texto);
  line-height: 1.2;
}

.news__excerpt{
  margin:0 0 10px;
  color: rgba(20,20,22,.74);
  font-size: 14px;
}

.news__link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight: 900;
  text-decoration:none;
  color: var(--vino);
}
.news__link:hover{ text-decoration: underline; }

.news__controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.12);
}

.news__btn{
  width: 40px;
  height: 40px;
  border-radius: 12px;

  background: rgba(201,185,143,.92);
  border: 1px solid rgba(255,255,255,.18);
  color: #1b1400;

  font-size: 20px;
  font-weight: 900;
  cursor:pointer;

  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}

.news__btn:hover{ background: rgba(191,174,128,.96); }
.news__btn:active{ transform: translateY(1px); }

.news__dots{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
}

.news__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;

  background: rgba(255,255,255,.70);
  border: 1px solid rgba(255,255,255,.35);

  cursor:pointer;
}

.news__dot.is-active{
  background: rgba(201,185,143,.95);
  border-color: rgba(255,255,255,.30);
}

/* ======================================================
   LOGIN / AUTH (SOLO LOGIN: body.is-login)
   ====================================================== */
body:not(.is-login) .section::before{ content: none !important; }

body.is-login .section{ position: relative; }
body.is-login .section::before{
  content:"";
  position:absolute;
  inset:-16px;
  background:
    radial-gradient(460px 240px at 14% 10%, rgba(122,22,50,.14), transparent 60%),
    radial-gradient(520px 260px at 86% 20%, rgba(201,185,143,.18), transparent 60%);
  pointer-events:none;
}

.auth{
  display:flex;
  justify-content:center;
  margin-top: 10px;
}

body.is-login .auth__card{
  width: min(520px, 100%);
  padding: 22px 22px 18px;
  border-radius: 18px;

  background: rgba(122,22,50,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 18px 40px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.10);

  color:#fff;
  position: relative;
  overflow:hidden;
}

body.is-login .auth__card::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:
    radial-gradient(360px 180px at 15% 0%, rgba(201,185,143,.24), transparent 60%),
    radial-gradient(380px 180px at 90% 30%, rgba(255,255,255,.08), transparent 62%);
  pointer-events:none;
}

body.is-login .auth__card > *{ position:relative; z-index:1; }

.auth__title{ margin: 0 0 6px; font-size: 26px; font-weight: 900; }
.auth__subtitle{ margin: 0 0 14px; }
body.is-login .muted{ color: rgba(255,255,255,.78); }

.auth__form{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

body.is-login .auth__label{
  color: rgba(255,255,255,.90);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .2px;
  margin-top: 6px;
}

body.is-login .auth__input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
}

body.is-login .auth__input::placeholder{ color: rgba(255,255,255,.60); }

body.is-login .auth__input:focus{
  outline:none;
  background: rgba(255,255,255,.16);
  border-color: rgba(201,185,143,.55);
  box-shadow: 0 0 0 4px rgba(201,185,143,.22);
}

.auth__password{
  display:flex;
  gap: 10px;
  align-items:center;
}

body.is-login .auth__toggle{
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  color:#fff;
}

body.is-login .auth__toggle:hover{ background: rgba(255,255,255,.18); }

.auth__row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

body.is-login .auth__remember{
  color: rgba(255,255,255,.82);
  font-weight: 700;
}

body.is-login .auth__link{
  color: var(--arena);
  font-weight: 900;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 10px;
}

body.is-login .auth__link:hover{
  background: rgba(201,185,143,.18);
}

body.is-login .auth__submit{
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;

  background: var(--arena);
  color: #1b1400;
  border: 1px solid rgba(255,255,255,.10);

  box-shadow: 0 16px 30px rgba(0,0,0,.18);
}

body.is-login .auth__submit:hover{ background: var(--arena-2); }

body.is-login .auth__status{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.88);
  display:none;
}

body.is-login .auth__status.is-ok{ display:block; border-color: rgba(201,185,143,.55); }
body.is-login .auth__status.is-error{ display:block; border-color: rgba(255,120,120,.55); }

/* ======================================================
   FOOTER
   ====================================================== */
.footer{
  background: var(--vino-900);
  color: rgba(255,255,255,.88);
  border-top: 1px solid rgba(255,255,255,.18);
  margin-top: 28px;
}

.footer__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding: 18px 0 22px;
}

.footer__logo{
  height: 36px;
  width:auto;
  opacity:.95;
}

/* ======================================================
   RESPONSIVE
   ====================================================== */
@media (max-width: 980px){
  .topbar__inner{ flex-direction: column; align-items:flex-start; }
  .cardgrid{ grid-template-columns: 1fr; }
  .brand__logo{ height: 48px; }

  .navdrop__panel{
    position: static;
    min-width: auto;
    margin-top: 8px;
  }
}

@media (max-width: 720px){
  #noticias .news,
  #noticias .news__card,
  .card,
  .hero,
  .navdrop__panel{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #noticias .news__card{ grid-template-columns: 1fr; }
  .news__body{ padding: 12px; }
  .news__img{ height: 160px; }
}

@media (max-width: 560px){
  body.is-login .auth__card{
    padding: 18px 16px 14px;
    border-radius: 16px;
  }
  .auth__title{ font-size: 24px; }
}
/* ======================================================
   NOTICIAS: 2 POR VISTA (desktop) / 1 (móvil)
   Pegar al final de styles.css
   ====================================================== */

/* Dos slides por vista */
#noticias .news__slide{
  flex: 0 0 50%;
  padding: 16px;
}

/* Ajuste de altura/espaciado para que se vea parejo */
#noticias .news__card{
  height: 100%;
}

/* En pantallas pequeñas: 1 por vista */
@media (max-width: 900px){
  #noticias .news__slide{
    flex-basis: 100%;
  }
}
