:root {
  --brand-black: #111;
  --brand-white: #fff;
  --gray-100: #f7f7f7;
  --gray-300: #d9d9d9;
  --gray-700: #3B3B3B;
  --gray-800: #2F3030;
  --accent: #0d6efd;
  --teal: #38d1c7;
  --ink: #0f0f0f;
  --line: #e6e6e6;
  --bg: #4A4A4A;
  --panel: #353535;
  --txt: #ffffff;
  --muted: #c9c9c9;
  --max: 1440px;
}

html, body {
  scroll-behavior: smooth
}

body {
  font-family: 'Space Grotesk';
}

a {
  text-decoration: none
}

/* ===== HEADER ===== */
/* Force header styles to override old CSS - must come first */
header.site-header,
.site-header {
  /*position: sticky;*/
  top: 0;
  z-index: 10 !important;
  background: #fff !important;
  height: 96px !important;
  min-height: 0px !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

.topbar {
  padding: .25rem 0;
  border-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: visible;
  background: transparent;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  height: 110px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 30%, 0 4%);
  z-index: -1;
  pointer-events: none;
}

.brand {
  font-weight: 700;
  letter-spacing: .02em;
}

.hdr-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .25rem;
}

.lang-tabs {
  display: flex;
  gap: .5rem;
}

.lang-tabs a {
  font-size: .9rem;
  padding: 0.5rem 0.4rem;
  border: 1px solid transparent;
  color: #000;
  border-radius: 50%;
  font-weight: 300;
  width: 40px;
  height: 40px;
  text-align: center;
  text-transform: uppercase;
}

.lang-tabs a.active {
  background: #fff;
  color: #000;
  border: 1px solid #ddd;
}

.lang-tabs a:hover {
  background: #fff;
  color: #000;
  border: 1px solid #ddd;
}

.hdr-icons {
  display: flex;
  gap: 1.5rem;
}

.hdr-icons a {
  color: #111;
  opacity: 1;
  font-size: 1.4rem;
  font-weight: 700;
}

.hdr-icons a:hover {
  opacity: 1;
}

.hdr-icons a i {
  font-size: 1.8rem;
}

/* ===== HERO (diagonal blanca fina->gruesa izquierda->derecha) ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #d9d9d9 0%, #3B3B3B 100%);
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 110px;
  background: #fff;
  /* fino a la izquierda (4%) y más grueso a la derecha (45%) */
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 4%);
  z-index: 3;
  pointer-events: none;
}

.hero .carousel {
  --bs-carousel-transition-duration: .9s;
}

.hero .carousel-item {
  height: 64vh;
  min-height: 460px;
  background: linear-gradient(135deg, #d9d9d9 0%, #3B3B3B 100%);
}

.hero .slide-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.hero .embed-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero .embed-wrap,
.hero .embed-wrap {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  position: absolute;
}

.hero .embed-wrap iframe,
.hero .embed-wrap video {
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Asegura que el texto rota con cada slide, no queda fijo */
.hero .carousel-caption {
  left: 8%;
  right: auto;
  bottom: 64px;
  text-align: left;
  z-index: 4;
}

.caption-box {
  background: rgba(0, 0, 0, .42);
  padding: 1.1rem 1.25rem;
  border-radius: .5rem;
  backdrop-filter: saturate(140%) blur(2px);
}

.hero .carousel-control-prev, .hero .carousel-control-next {
  width: 5.5rem;
}

/* reduce parpadeo en fade */
.carousel-fade .carousel-item {
  transition-property: opacity;
}

.carousel-fade .carousel-item,
.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
  opacity: 0;
}

.carousel-fade .active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
}

/* ===== Menú Fixed ===== */
:root {
  --headH: 96px;
  /* alto normal aprox. */
  --headHFixed: 60px;
  /* alto reducido en modo fixed */
  --logoH: 44px;
  /* alto normal del logo */
  --logoHFixed: 30px;
  /* alto del logo en modo fixed */
  --tr: 360ms cubic-bezier(.2, .8, .2, 1);
  /* más suave */
}

/* Animar el padding-top del body para evitar salto */
html body {
  transition: padding-top var(--tr);
}

/* Tu header tal cual, con animación de altura */
.site-header {
  height: 96px !important;
  min-height: 0px !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  background: #fff;
  /* cubre contenido debajo */
  transition:
  height var(--tr),
  padding var(--tr),
  box-shadow var(--tr),
  background var(--tr);
  z-index: 1000;
}

.site-header.is-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--headHFixed, 46px) !important;
  min-height: 0px !important;
  max-height: none !important;
  overflow: visible !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
}

.site-header .brand {
  display: flex;
  align-items: center;
}

.site-header .logo-gam {
  height: var(--logoH);
  width: auto;
  object-fit: contain;
  display: block;
  transition: height var(--tr), transform var(--tr), opacity var(--tr);
}

.site-header.is-fixed .logo-gam {
  height: var(--logoHFixed);
  transform: translateY(-1px);
  opacity: .95;
}

.site-header.is-fixed .brand {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.site-header.is-fixed .hdr-right {
  padding-top: 0 !important;
}

.site-header .lang-tabs,
.site-header .hdr-icons a:not(.menu-trigger) {
  transition: opacity var(--tr), transform var(--tr), visibility var(--tr);
  will-change: opacity, transform;
}

.site-header.is-fixed .lang-tabs,
.site-header.is-fixed .hdr-icons a:not(.menu-trigger) {
  opacity: 0;
  transform: translateY(-6px);
  visibility: hidden;
  pointer-events: none;
}

.site-header .hdr-icons .menu-trigger {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.site-header.is-fixed .hdr-right {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0 !important;
}

.site-header.is-fixed .lang-tabs {
  display: none !important;
}

.site-header.is-fixed .hdr-icons a:not(.menu-trigger) {
  display: none !important;
}

.site-header .topbar .container {
  height: 100%;
  align-items: center;
}

:root {
  --headHFixed: 46px;
  --tr: 320ms cubic-bezier(.2, .8, .2, 1);
}

.site-header {
  transition: height var(--tr), padding var(--tr), box-shadow var(--tr);
}

.site-header .logo-gam {
  transition: height var(--tr), transform var(--tr), opacity var(--tr);
}

.site-header.is-fixed .logo-gam {
  height: 30px;
  transform: translateY(-1px);
  opacity: .95;
}

/* ===== OBRAS ===== */
.obras-section {
  padding: 2.5rem 0;
}

.obras-filtros .link {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .01em;
  color: #111;
  margin-right: 1.25rem;
}

.btn-calendario {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-weight: 700;
  font-size: 1.35rem;
  border: 1px solid #000;
}

.btn-calendario:hover {
  background: #fff;
  color: #000;
  border: 1px solid #000;
}

.obra {
  position: relative;
  display: block;
  color: inherit;
  overflow: hidden;
  height: 100%;
  transition: 0.3s;
  transform: scale(1.0);
}

.obra:hover {
  z-index: 3;
  transform: scale(1.03);
}

.obra-img {
  background: #d9d9d9;
}

.c-blue {
  background: #2457ff;
}

.c-sky {
  background: #3fb0f3;
}

.c-yellow {
  background: #ffc55e;
}

.c-mint {
  background: #b8f5ea;
}

.c-coral {
  background: #ff8b8b;
}

.c-magenta {
  background: #ff4fe7;
}

.c-orange {
  background: #ff7a3a;
}

.c-red {
  background: #ff5252;
}

.obra-img {
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-position: center center;
  background-size: cover;
  height: 230px;
}

.obra-content {
  position: relative;
  height: 230px;
}

.obra-title p {
  font-weight: 700;
  font-size: 1.3rem;
  font-family: 'Space Grotesk';
}

.obra-desc {
  color: #000;
  margin: 0 0 .6rem;
  font-weight: 300;
  font-family: 'Space Grotesk';
}

.obra-date p {
  font-weight: 700;
  margin: 0;
}

.obra-time p {
  font-weight: 300;
  margin: 0;
}

/* ===== ENTÉRATE ===== */
.enterate-wrap {
  margin: 2rem 0;
}

.enterate-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
}

.enterate-head p {
  font-weight: 700;
  margin: 0;
  font-family: 'Space Grotesk';
  font-size: 1.2rem;
}

.enterate-more {
  font-weight: 700;
  color: #111;
  font-family: 'Space Grotesk';
  font-size: 1.2rem;
}

.enterate-section a {
  display: block;
  text-decoration: none;
  color: #000;
  transition: 0.3s;
  transform: scale(1.0);
}

.enterate-section a:hover {
  z-index: 3;
  transform: scale(1.03);
}

.enterate-box {
  background: #e9e4d7;
  border: 1px solid #e9e4d7;
  border-radius: 0px;
  padding: 1.3rem;
}

.enterate-media {
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-position: top center;
  background-size: cover;
  height: 280px;
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}

.enterate-kicker p {
  font-weight: 700;
  margin: 0 0 .5rem;
  font-family: 'Space Grotesk';
  font-size: 1.1rem;
}

.enterate-desc p {
  font-weight: 700;
  margin: 0;
  font-family: 'Space Grotesk';
  font-size: 1.1rem;
}

.enterate-meta p {
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #4a4a4a;
  margin: 0;
  font-family: 'Space Grotesk';
  font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.gam-footer {
  background: var(--bg);
  color: var(--txt);
  padding: 34px 24px 36px;
  position: relative;
  overflow: hidden;
  font-family: 'Space Grotesk';
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* Newsletter */
.gf-news {
  position: relative;
  min-height: 380px;
  height: 100%;
}

.gf-news-bg {
  position: absolute;
  left: -35vw;
  right: -2vw;
  top: -100px;
  bottom: -260px;
  background: var(--panel);
  transform: skewY(-10deg);
  transform-origin: top left;
  opacity: .99;
  box-shadow: 0 60px 120px rgba(0, 0, 0, .40)
}

.gf-news-inner {
  position: absolute;
  left: 30px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.gf-news-inner p {
  margin: 0;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--txt);
}

.gf-news-sub p {
  margin: 0px;
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--txt);
}

.gf-form {
  display: flex;
  align-items: center;
  gap: 16px
}

.gf-form input {
  flex: 1;
  max-width: 860px;
  height: 66px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 0 28px;
  font-size: 19px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .30)
}

.gf-form input::placeholder {
  color: #8a8a8a
}

.gf-send {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .06);
  display: grid;
  place-items: center;
  background: #fff;
  color: #111;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .30);
  cursor: pointer;
  transition: transform .15s ease
}

.gf-form input {
  height: 64px;
  font-size: 1.05rem;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.gf-send {
  width: 64px;
  height: 64px;
  background: #fff;
  color: #111;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.gf-send:hover {
  transform: translateY(-1px);
  opacity: 1;
}

.gob-chile img, .logo-media img {
  filter: invert(1);
}

.top-footer a {
  color: #fff;
}

.top-footer a:hover {
  text-decoration: underline;
}

.logo-footer p {
  font-family: 'Space Grotesk';
  color: #fff;
  font-size: 0.7rem !important;
  font-weight: 300;
  margin-bottom: 0;
  line-height: 140%;
  text-transform: inherit !important;
}

.logo-footer img {
  filter: invert(1);
}

.gam-stgo p {
  font-weight: 300;
  margin-bottom: 0;
  font-size: 0.8rem;
}

.media p {
  font-weight: 300;
  margin-bottom: 0;
  font-size: 0.8rem;
}

.social ul {
  margin-bottom: 0;
  padding: 0;
}

.social ul li {
  display: inline-block;
}

.social ul li a {
  color: #000;
  background: #fff;
  border-radius: 50%;
  text-align: center;
  vertical-align: middle;
  font-weight: 300;
  display: inline-block;
  width: 35px;
  height: 35px;
  font-size: 1rem;
  padding: 7px;
  margin-left: 3px;
}

.social ul li a:hover {
  color: #fff;
  background: #000;
}

/* ===== MENU ===== */
.mega-panel {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 3000;
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  overflow: hidden;
  display: none;
  transition: max-height .35s ease, opacity .35s ease, transform .35s ease;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  background-position: top left !important;
  background-size: cover !important;
}

.mega-panel.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  max-height: 100vh;
}

.mega-inner {
  padding: 0;
  height: 100%;
  position: relative;
}

/* Izquierda turquesa con diagonal */
.menu-left {
  position: relative;
  /*background: var(--teal);*/
  /*color: var(--ink);*/
  font-weight: 300;
  font-family: 'Space Grotesk';
  font-size: 0.8rem;;
}

/*.menu-left::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  height: 100%;
  width: 160px;
  background: var(--teal);
  transform: skewX(6deg);
  transform-origin: left top;
  pointer-events: none;
}*/

.menu-logo {
  display: block;
  margin-bottom: 16px;
}

.menu-left h5 {
  font-weight: 700;
  margin: 0px;
  font-family: 'Space Grotesk';
  font-size: 1.3rem;
}

.menu-left ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-left li {
  margin: 0 0 5px 0;
}

.menu-left a {
  color: var(--ink);
  text-decoration: none;
}

.menu-left a:hover {
  text-decoration: underline;
}

.color-line {
  height: 1px;
  width: 220px;
  margin: 18px 0 18px;
  background: #000;
  border-radius: 2px;
}

/* Derecha */
.menu-right {
  position: relative;
  font-weight: 300;
  font-family: 'Space Grotesk';
  font-size: 0.8rem;
}

.mega-col h5 {
  font-weight: 700;
  margin: 0px;
  font-family: 'Space Grotesk';
  font-size: 1.3rem;
}

.mega-col h5 a {
  font-weight: 700;
  font-size: 1.3rem;
  font-family: 'Space Grotesk';
}

.mega-col a {
  color: var(--ink);
  font-weight: 300;
  line-height: 100%;
  font-size: 0.8rem;
}

.mega-col a:hover {
  text-decoration: underline;
}

.mega-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Botón X */
.mega-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: transparent;
  border: 0;
  color: #111;
  font-size: 34px;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
}

.menu-gam {
  position: absolute;
  top: 20px;
}

.mega-center {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.bg-gam {
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-position: top center;
  background-size: cover;
  height: 100%;
}

/* Desktop: ensure no background colors on menu columns */
@media (min-width: 992px) {
  .menu-col-1,
  .menu-col-2 {
    background-color: transparent !important;
  }
}

/* Mobile menu backgrounds - ONLY on mobile */
@media (max-width: 991.98px) {
  .mega-panel {
    background-image: none !important;
  }

  .mega-center {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    padding-top: 0;
  }

  .mega-panel .container {
    padding-top: 0;
    padding-bottom: 1rem;
  }

  .mega-inner {
    padding-top: 1rem;
  }

  .menu-col-1 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    background-color: var(--megamenu-col1-bg, transparent) !important;
  }

  .menu-col-2 {
    background-color: #fff !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  .mega-panel .row > div:last-child {
    background-color: #fff !important;
  }
}

/* ===== SEARCH MODAL ===== */
.search-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    transition: all .5s;
    display: none;
    z-index: 10001;
}

.search-wrapper.hide {
    opacity: 0;
}

.search-wrapper .search-input-wrapper {
    flex: 0 0 auto;
    margin: 0 10%;
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    background-color: transparent;
    padding: 10px;
    min-width: 10px;
    border-radius: 0px;
    border: 1px solid #000;
    transition: all .4s;
}

.search-wrapper .search-info {
    margin: 0 10%;
    flex: 1;
    overflow-y: auto;
}

.search-wrapper .search-info a {
    color: #000;
    display: block;
    line-height: 110%;
    min-height: 100%;
    height: 100%;
    text-decoration: none;
    padding: 10px;
}

.search-wrapper .search-info a .type, .search-wrapper .search-info a .date, .search-wrapper .search-info a .info {
    font-size: 0.85rem;
}

.search-wrapper .search-info a .title {
    font-weight: 700;
    line-height: 130%;
    font-size: 0.9rem;
}

.search-wrapper .search-info a:hover {
    background-color: #efede1;
}

@media screen and (max-width: 576px) {
    .search-wrapper .search-input-wrapper {
        margin: 0 20px;
        margin-top: 3rem;
    }
    .search-wrapper .search-info {
        margin: 0 20px;
    }
}

.search-wrapper .search-input-wrapper .search-input {
    flex: 1;
}

.search-wrapper .search-input-wrapper .search-input::placeholder {
    color: rgba(189, 189, 189, 0.7);
}

.search-wrapper .search-input-wrapper .search-submit {
    flex-basis: 40px;
    cursor: pointer;
}

.search-wrapper .search-input-wrapper input, .search-wrapper .search-input-wrapper button {
    background-color: transparent;
    border: none;
    font-size: 25px;
    padding: 3px;
    color: #000;
    min-width: 10px;
}

.search-wrapper .search-input-wrapper input:focus, .search-wrapper .search-input-wrapper button:focus {
    outline: none;
}

.search-wrapper .search-close {
    position: fixed;
    padding: 5px;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: rgba(0, 0, 0, 0.8);
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all .4s;
    width: 40px;
    height: 40px;
    z-index: 10002;
}

.search-wrapper .search-close:focus {
    outline: none;
}

.search-wrapper .search-close:hover {
    color: #000;
}
