/**
 * IBG Gramado — tema escuro e acessibilidade
 * Carregar depois do CSS base (ibg-layout / ou style-friendly em páginas antigas)
 */

/* Páginas antigas (Pixy): .mil-up podia ficar invisível sem GSAP */
body.ibg-site .mil-up {
  opacity: 1 !important;
  -webkit-transform: none !important;
  transform: none !important;
}

/* Contacto ainda com preloader Pixy sem animação GSAP */
body.ibg-site .mil-preloader {
  display: none !important;
}

html[data-theme="dark"] body {
  background-color: #121110 !important;
  color: #eceae6 !important;
}

/* Contraste forte no escuro (texto nunca “cinza sobre cinza”) */
html[data-theme="dark"] body.ibg .ibg-main,
html[data-theme="dark"] body.ibg-site .mil-content {
  color: #e8e4df !important;
}

html[data-theme="dark"] body.ibg .ibg-welcome h1,
html[data-theme="dark"] body.ibg .ibg-section-head h2,
html[data-theme="dark"] body.ibg .ibg-event-title,
html[data-theme="dark"] body.ibg-site .mil-head1,
html[data-theme="dark"] body.ibg-site h1,
html[data-theme="dark"] body.ibg-site h2,
html[data-theme="dark"] body.ibg-site .mil-display2,
html[data-theme="dark"] body.ibg-site .mil-display3 {
  color: #faf8f5 !important;
}

html[data-theme="dark"] body.ibg .ibg-lead,
html[data-theme="dark"] body.ibg .ibg-card-text,
html[data-theme="dark"] body.ibg .ibg-prose-deco,
html[data-theme="dark"] body.ibg .ibg-min-intro,
html[data-theme="dark"] body.ibg .ibg-footer__legal,
html[data-theme="dark"] body.ibg-site .mil-text-md,
html[data-theme="dark"] body.ibg-site .mil-text-sm,
html[data-theme="dark"] body.ibg-site .mil-stylized {
  color: #e2ded8 !important;
}

html[data-theme="dark"] body.ibg .ibg-welcome p,
html[data-theme="dark"] body.ibg .ibg-section-alt,
html[data-theme="dark"] body.ibg #noticias {
  color: #e8e4df !important;
}

html[data-theme="dark"] body.ibg .ibg-blog-heading,
html[data-theme="dark"] body.ibg #noticias h2 {
  color: #faf8f5 !important;
}

html[data-theme="dark"] body.ibg .ibg-card-title {
  color: #faf8f5 !important;
}

html[data-theme="dark"] body.ibg .ibg-event-callout__line2 {
  color: var(--ibg-sage) !important;
}

html[data-theme="dark"] body.ibg .ibg-burger span,
html[data-theme="dark"] body.ibg .ibg-burger span::before,
html[data-theme="dark"] body.ibg .ibg-burger span::after {
  background: #faf8f5 !important;
}

html[data-theme="dark"] body.ibg .ibg-footer__links a {
  color: #e2ded8 !important;
}
html[data-theme="dark"] body.ibg .ibg-footer__motto {
  color: #faf8f5 !important;
}
html[data-theme="dark"] body.ibg .ibg-footer__contact-list,
html[data-theme="dark"] body.ibg .ibg-footer__contact-list a {
  color: #e2ded8 !important;
}
html[data-theme="dark"] body.ibg .ibg-footer__cta-card {
  background: rgba(82, 183, 136, 0.12);
  border-color: rgba(82, 183, 136, 0.28);
}
html[data-theme="dark"] body.ibg .ibg-footer__cta-card h2 {
  color: #faf8f5 !important;
}

html[data-theme="dark"] body.ibg .ibg-footer__social a,
html[data-theme="dark"] body.ibg .ibg-drawer-social a {
  color: var(--ibg-green) !important;
}
html[data-theme="dark"] body.ibg .ibg-footer__social a .ibg-lucide,
html[data-theme="dark"] body.ibg .ibg-footer__social a svg,
html[data-theme="dark"] body.ibg .ibg-drawer-social a .ibg-lucide,
html[data-theme="dark"] body.ibg .ibg-drawer-social a svg {
  stroke: currentColor;
}
html[data-theme="dark"] body.ibg .ibg-icon-btn .ibg-lucide,
html[data-theme="dark"] body.ibg .ibg-icon-btn svg {
  stroke: currentColor;
}
html[data-theme="dark"] body.ibg .ibg-accent {
  color: var(--ibg-gold) !important;
}

html[data-theme="dark"] .ibg-surface.ibg-surface--frost {
  background: transparent !important;
}
html[data-theme="dark"] .ibg-surface--frost::before {
  background: rgba(22, 20, 18, 0.76) !important;
}

html[data-theme="dark"] .ibg-section-alt.ibg-section--frost {
  background: transparent !important;
}
html[data-theme="dark"] .ibg-section--frost::before {
  background: rgba(26, 24, 22, 0.8) !important;
}

html[data-theme="dark"] #ministerios.ibg-section--frost-light {
  background: var(--ibg-paper) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .mil-page-wrapper,
html[data-theme="dark"] .mil-content {
  background: #121110;
}

html[data-theme="dark"] .ibg-welcome:not(.ibg-welcome--hero),
html[data-theme="dark"] .ibg-section-alt {
  background: #1c1a18 !important;
}

html[data-theme="dark"] .ibg-surface {
  background: #161514;
}

html[data-theme="dark"] .mil-m1,
html[data-theme="dark"] .mil-m4,
html[data-theme="dark"] .mil-head1,
html[data-theme="dark"] .mil-display1,
html[data-theme="dark"] .mil-display2,
html[data-theme="dark"] .mil-display3,
html[data-theme="dark"] .mil-head4,
html[data-theme="dark"] .mil-footer-link {
  color: #f2f0ec !important;
}

html[data-theme="dark"] .mil-text-md {
  color: #e0dcd6 !important;
}

html[data-theme="dark"] .mil-text-sm {
  color: #d8d4cf !important;
}

html[data-theme="dark"] .mil-stylized {
  color: #d0ccc6 !important;
}

html[data-theme="dark"] .mil-m2,
html[data-theme="dark"] .mil-stylized.mil-m2 {
  color: #d0ccc6 !important;
}

html[data-theme="dark"] .mil-deco-text {
  color: #c8c4be !important;
  border-left-color: #37cc8d !important;
}

html[data-theme="dark"] .mil-a1 {
  color: #ffc48a !important;
}

html[data-theme="dark"] .mil-a2 {
  color: #6fe0b5 !important;
}

html[data-theme="dark"] .mil-head6,
html[data-theme="dark"] .mil-head6 a {
  color: #eceae6 !important;
}

html[data-theme="dark"] .mil-breadcrumbs a,
html[data-theme="dark"] .mil-breadcrumbs li {
  color: #c8c4be !important;
}

html[data-theme="dark"] .mil-top-panel-2 {
  background: rgba(18, 16, 15, 0.94) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .mil-top-panel-2.mil-scroll {
  background-color: rgba(28, 26, 24, 0.92) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .mil-top-panel-2.mil-menu-open {
  background: rgba(18, 16, 15, 0.98) !important;
}

html[data-theme="dark"] .mil-top-panel-2 .mil-left-side .mil-logo {
  color: #eceae6 !important;
}

html[data-theme="dark"] .mil-top-panel-2 .mil-onepage-nav ul li a {
  color: #e8e4df !important;
}

html[data-theme="dark"] .mil-top-panel-2 .mil-buttons-tp-frame .mil-buttons .mil-tp-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #eceae6 !important;
}

html[data-theme="dark"] .mil-top-panel .mil-buttons-tp-frame .mil-buttons .mil-tp-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #eceae6 !important;
}

html[data-theme="dark"] .mil-menu-frame {
  background: #1a1816;
}

html[data-theme="dark"] .mil-main-menu li a {
  color: #eceae6 !important;
}

html[data-theme="dark"] .mil-footer:before {
  background: linear-gradient(
    180deg,
    rgba(18, 17, 16, 0) 0%,
    rgba(30, 28, 26, 0.6) 80%
  ) !important;
}

html[data-theme="dark"] .mil-footer-menu-frame {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .mil-footer-menu-frame .mil-footer-menu li a,
html[data-theme="dark"] .mil-footer-menu-frame .mil-social li a {
  color: #e0dcd6 !important;
}

html[data-theme="dark"] .mil-half-container .mil-text-box.mil-g-m1:before {
  background: linear-gradient(308.26deg, #2a2826 0%, #3d3b38 100%) !important;
  opacity: 1;
}

html[data-theme="dark"] .ibg-gallery-item .ibg-label {
  background: #eceae6;
  color: #1a1816;
}

html[data-theme="dark"] .mil-menu-btn span,
html[data-theme="dark"] .mil-menu-btn span:after,
html[data-theme="dark"] .mil-menu-btn span:before {
  background: #eceae6 !important;
}

html[data-theme="dark"] .mil-preloader {
  background: #0e0d0c !important;
}

html[data-theme="dark"] .mil-preloader .mil-head1 {
  color: #eceae6 !important;
}

html[data-theme="dark"] .mil-progress-track {
  background: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .mil-progress-track .mil-progress {
  background: #37cc8d !important;
}

html[data-theme="dark"] .mil-stylized-btn {
  background-color: #3a3a3e !important;
}

html[data-theme="dark"] .mil-stylized-btn i,
html[data-theme="dark"] .mil-stylized-btn span {
  color: #f5f2ed !important;
}

html[data-theme="dark"] .mil-stylized-btn:hover {
  background-color: #4a4a50 !important;
}

html[data-theme="dark"] code {
  background: rgba(255, 255, 255, 0.1);
  color: #f0ece6;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

html[data-theme="dark"] .mil-bottom-part .mil-text-sm {
  color: #b8b4ae !important;
}

html[data-theme="dark"] .mil-blog-card-sm .mil-text-frame {
  color: #eceae6;
}

html[data-theme="dark"] .mil-iconbox .mil-head4 {
  color: #f2f0ec !important;
}

html[data-theme="dark"] .mil-iconbox .mil-stylized.mil-m1 {
  color: #e8e4df !important;
}

html[data-theme="dark"] .mil-iconbox i {
  color: #6fe0b5 !important;
}

/* Formulário / contato */
html[data-theme="dark"] form input,
html[data-theme="dark"] form textarea {
  color: #f7f4ef !important;
  border-bottom-color: rgba(255, 255, 255, 0.35) !important;
  background-color: rgba(0, 0, 0, 0.15) !important;
}

html[data-theme="dark"] form input:hover,
html[data-theme="dark"] form input:focus,
html[data-theme="dark"] form textarea:hover,
html[data-theme="dark"] form textarea:focus {
  border-color: #37cc8d !important;
}

html[data-theme="dark"] form input::placeholder,
html[data-theme="dark"] form textarea::placeholder {
  color: #a39e97 !important;
  opacity: 1;
}

html[data-theme="dark"] form label {
  color: #f0ece6 !important;
}

html[data-theme="dark"] .mil-btn.mil-a2 {
  background-color: #37cc8d !important;
  color: #121110 !important;
}

html[data-theme="dark"] .mil-btn.mil-a2:hover {
  filter: brightness(1.08);
}

html[data-theme="dark"] .mil-text-link {
  color: #6fe0b5 !important;
}

/* Hero com imagem de fundo — títulos legíveis */
html[data-theme="dark"] .mil-hero-1 .mil-hero-text .mil-display1,
html[data-theme="dark"] .mil-hero-1 .mil-hero-text .mil-display2,
html[data-theme="dark"] .mil-sm-hero .mil-hero-text h1 {
  color: #f7f4ef !important;
}

html[data-theme="dark"] .mil-hero-1 .mil-stylized.mil-m2 {
  color: #d8d4cf !important;
}

/* Barra tema / idioma (partilhada index + contato) */
.ibg-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.25rem;
}

.ibg-ctrl-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  color: inherit;
}

.ibg-lang {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(53, 54, 57, 0.2);
}

.ibg-lang button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.55rem;
  color: #353639;
  transition: background 0.2s, color 0.2s;
}

.ibg-lang button.ibg-lang-active {
  background: #37cc8d;
  color: #fff;
}

html[data-theme="dark"] .ibg-lang button {
  color: #e8e4df;
}

html[data-theme="dark"] .ibg-lang {
  border-color: rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .ibg-lang button.ibg-lang-active {
  background: #2d9a72;
  color: #fff;
}

/* Como chegar — cartões em modo escuro (horários deixam de “parecer brancos”) */
html[data-theme="dark"] body.ibg .ibg-visit-card {
  background: rgba(26, 25, 23, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e8e4df;
}
html[data-theme="dark"] body.ibg .ibg-visit-card--hours {
  background: linear-gradient(
    168deg,
    rgba(32, 30, 28, 0.98) 0%,
    rgba(20, 22, 24, 0.96) 100%
  ) !important;
  border-color: rgba(200, 170, 90, 0.28) !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-card h3 {
  color: #faf8f5 !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-text,
html[data-theme="dark"] body.ibg .ibg-visit-program-text,
html[data-theme="dark"] body.ibg .ibg-visit-hours-body {
  color: #e2ded8 !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-program-row {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-program-ico {
  background: linear-gradient(145deg, rgba(201, 162, 39, 0.22), rgba(45, 106, 79, 0.2)) !important;
  color: #e8c86a !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-today {
  background: linear-gradient(135deg, rgba(45, 106, 79, 0.28) 0%, rgba(32, 55, 45, 0.45) 100%) !important;
  border-color: rgba(100, 200, 150, 0.35) !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-today-kicker {
  color: #9dffc2 !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-today-date,
html[data-theme="dark"] body.ibg .ibg-visit-today-hours {
  color: #f0ece6 !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-today-note {
  color: #c4beb6 !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-program-list--today .ibg-visit-program-ico {
  background: rgba(45, 106, 79, 0.35) !important;
  color: #8fd9b8 !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-program-list--today .ibg-visit-program-text {
  color: #f0ece6 !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-card-icon {
  background: rgba(82, 183, 136, 0.18) !important;
  color: #8fd9b8 !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-card--hours .ibg-visit-card-icon {
  background: rgba(201, 162, 39, 0.2) !important;
  color: #e8c86a !important;
}
html[data-theme="dark"] body.ibg .ibg-visit-banner {
  background: #141312;
}
html[data-theme="dark"] body.ibg .ibg-visit-section .ibg-eyebrow,
html[data-theme="dark"] body.ibg .ibg-visit-section .ibg-section-head h2 {
  color: inherit;
}

html[data-theme="dark"] body.ibg .ibg-ofertas-section {
  background:
    radial-gradient(100% 70% at 50% 0%, rgba(82, 183, 136, 0.14) 0%, transparent 50%),
    linear-gradient(180deg, #161514 0%, #121110 100%) !important;
}
html[data-theme="dark"] body.ibg .ibg-ofertas-card {
  background: #1a1917 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] body.ibg .ibg-ofertas-panel__text {
  color: #ddd9d3 !important;
}
html[data-theme="dark"] body.ibg .ibg-ofertas-footnote {
  color: #a8a39b !important;
}

.ibg-contact-intro {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.ibg-contact-intro p {
  margin: 0 0 1rem;
  line-height: 1.65;
}

.ibg-menu-posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 767px) {
  .ibg-menu-posts-grid {
    grid-template-columns: 1fr;
  }
}
