/* ==========================================================================
   ARAL MOREIRA - DARK MODE & HIGH CONTRAST MODULE (SOLID CSS)
   ========================================================================== */

body.high-contrast {
  /* Redefine Core Palette Variables */
  --color-primary: #2ee2a1 !important;
  --color-primary-light: #44f0b3 !important;
  --color-primary-dark: #1bb774 !important;
  --color-secondary: #ff5252 !important;
  --color-bg-light: #121212 !important;
  --color-text-main: #e0e0e0 !important;
  --color-text-muted: #aaaaaa !important;
  --color-white: #1e1e1e !important;
  --color-border: #333333 !important;

  background-color: #121212 !important;
  color: #e0e0e0 !important;
}

/* Base Elements */
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6 {
  color: #ffffff !important;
}

body.high-contrast p,
body.high-contrast span,
body.high-contrast li,
body.high-contrast td,
body.high-contrast th,
body.high-contrast div {
  color: inherit;
}

body.high-contrast a {
  color: #2ee2a1 !important;
}
body.high-contrast a:hover {
  color: #55f0ba !important;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

body.high-contrast .site-header {
  background-color: #1a1a1a !important;
  border-bottom: 1px solid #333333 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
}

/* Adapt Header Logos for Dark Mode */
body.high-contrast .site-branding .logo-normal {
  display: none !important;
}
body.high-contrast .site-branding .logo-dark {
  display: block !important;
}

/* Primary Menu & Mega Menu */
body.high-contrast .primary-menu > li > a {
  color: #ffffff !important;
}
body.high-contrast .primary-menu > li > a:hover,
body.high-contrast .primary-menu > li.current-menu-item > a {
  color: #2ee2a1 !important;
}

body.high-contrast .sub-menu,
body.high-contrast .mega-sub-menu {
  background-color: #222222 !important;
  border: 1px solid #333333 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;
}

body.high-contrast .mega-col-title {
  color: #2ee2a1 !important;
  border-bottom-color: #333333 !important;
}

body.high-contrast .mega-col li a {
  color: #cccccc !important;
}

body.high-contrast .mega-col li a:hover {
  color: #2ee2a1 !important;
  background-color: rgba(46, 226, 161, 0.1) !important;
}

body.high-contrast .search-trigger-btn,
body.high-contrast .mic-trigger-btn {
  color: #2ee2a1 !important;
}

/* ==========================================================================
   HOME SECTIONS & CARDS
   ========================================================================== */

body.high-contrast .home-news-section,
body.high-contrast .news-section,
body.high-contrast .home-calendar-section,
body.high-contrast .home-secretarias-section,
body.high-contrast .home-services-section,
body.high-contrast .quick-access-section {
  background-color: #121212 !important;
}

/* SERVICES SECTION */
body.high-contrast .service-card {
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}
body.high-contrast .service-card:hover {
  border-color: #2ee2a1 !important;
}
body.high-contrast .service-card h3 {
  color: #ffffff !important;
}
body.high-contrast .service-card p {
  color: #cccccc !important;
}

/* Main News & News Grid */
body.high-contrast .news-card,
body.high-contrast .news-featured {
  background-color: transparent !important; /* let inner handle bg */
}

body.high-contrast .news-card-content,
body.high-contrast .news-featured-content {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
  border: 1px solid #333 !important;
}

body.high-contrast .news-card-title,
body.high-contrast .news-card-title a,
body.high-contrast .news-featured-title,
body.high-contrast .news-featured-title a,
body.high-contrast .news-grid-item h3,
body.high-contrast .news-grid-item h3 a {
  color: #ffffff !important;
}

body.high-contrast .news-card-excerpt,
body.high-contrast .news-featured-excerpt {
  color: #bbbbbb !important;
}

body.high-contrast .news-card-meta,
body.high-contrast .news-featured-meta {
  color: #888888 !important;
}

/* Buttons */
body.high-contrast .btn-outline {
  border-color: #2ee2a1 !important;
  color: #2ee2a1 !important;
  background-color: transparent !important;
}
body.high-contrast .btn-outline:hover {
  background-color: #2ee2a1 !important;
  color: #121212 !important;
}

body.high-contrast .btn-primary,
body.high-contrast .btn-read-more {
  background-color: #1bb774 !important;
  color: #ffffff !important;
}

/* Secretarias Section & Cards */
body.high-contrast .am-sec-card {
  background-color: transparent !important;
}

body.high-contrast .am-sec-card-content {
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
  border-top: none !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
}

body.high-contrast .am-sec-card-content h3 {
  color: #ffffff !important;
}

body.high-contrast .am-sec-card-resp {
  background-color: #162a20 !important;
  color: #2ee2a1 !important;
  border: 1px solid rgba(46, 226, 161, 0.3) !important;
}

/* Diario Oficial & Calendar */
body.high-contrast .calendar-wrapper {
  background-color: transparent !important;
}

body.high-contrast .calendar-box {
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  padding: 25px !important; /* Forces symmetrical padding since it acts as a standalone card here */
}

body.high-contrast .calendar-header {
  border-bottom-color: #333 !important;
}
body.high-contrast .calendar-header h4,
body.high-contrast .calendar-nav-btn {
  color: #ffffff !important;
}

body.high-contrast .calendar-grid {
  color: #e0e0e0 !important;
}
body.high-contrast .calendar-day-name {
  color: #aaaaaa !important;
}
body.high-contrast .calendar-day {
  color: #e0e0e0 !important;
}

body.high-contrast .calendar-day.has-edition {
  background-color: rgba(46, 226, 161, 0.2) !important;
  color: #2ee2a1 !important;
  font-weight: bold !important;
}
body.high-contrast .calendar-day.selected {
  background-color: #1bb774 !important;
  color: #fff !important;
}

/* Diario Feed */
body.high-contrast .diario-list h3 {
  color: #2ee2a1 !important;
}
body.high-contrast .diario-item {
  background-color: #1e1e1e !important;
  border-left: 4px solid #2ee2a1 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
}
body.high-contrast .diario-item h4 {
  color: #ffffff !important;
}
body.high-contrast .diario-date {
  color: #aaaaaa !important;
}

/* ==========================================================================
   SINGLE NOTÍCIA (single.php) & SINGLE SECRETARIA
   ========================================================================== */

body.high-contrast .am-single-article {
  background-color: #121212 !important;
}

body.high-contrast .am-single-content-wrapper {
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;
}

body.high-contrast .am-single-content {
  color: #d0d0d0 !important;
}

body.high-contrast .am-single-content h1,
body.high-contrast .am-single-content h2,
body.high-contrast .am-single-content h3,
body.high-contrast .am-single-content h4 {
  color: #ffffff !important;
}

body.high-contrast .am-single-content blockquote {
  background-color: #162a20 !important;
  color: #2ee2a1 !important;
  border-left: 5px solid #2ee2a1 !important;
}

body.high-contrast .am-single-footer {
  border-top-color: #333333 !important;
}

body.high-contrast .am-single-share span {
  color: #ffffff !important;
}

body.high-contrast .am-single-share a {
  background-color: #2a2a2a !important;
  color: #2ee2a1 !important;
}

body.high-contrast .am-single-share a:hover {
  background-color: #2ee2a1 !important;
  color: #121212 !important;
}

/* Single Secretaria */
body.high-contrast .am-secretaria-wrapper {
  background-color: #121212 !important;
}

body.high-contrast .am-profile-card,
body.high-contrast .am-map-card,
body.high-contrast .am-secretaria-content {
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
  color: #e0e0e0 !important;
}

body.high-contrast .am-profile-name,
body.high-contrast .am-content-heading {
  color: #ffffff !important;
}

body.high-contrast .am-profile-contacts li {
  color: #cccccc !important;
}

/* ==========================================================================
   FOOTER & COOKIE BANNER
   ========================================================================== */

body.high-contrast .site-footer,
body.high-contrast .site-footer::before {
  background-color: #0a0a0a !important;
}
body.high-contrast .site-footer {
  border-top: 1px solid #333333 !important;
}

body.high-contrast .footer-widget h4 {
  color: #ffffff !important;
}

body.high-contrast .footer-sitemap-list a,
body.high-contrast .footer-info-col p,
body.high-contrast .footer-info-col a {
  color: #bbbbbb !important;
}

body.high-contrast .footer-sitemap-list a:hover {
  color: #2ee2a1 !important;
}

body.high-contrast .footer-bottom {
  background-color: #050505 !important;
  border-top: 1px solid #222222 !important;
  color: #888888 !important;
}

body.high-contrast .glass-cookie-banner {
  background: rgba(20, 20, 20, 0.95) !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   LIVE SEARCH MODAL & ACCESSIBILITY TOOLBAR
   ========================================================================== */

body.high-contrast .live-search-modal,
body.high-contrast .live-search-box {
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}

body.high-contrast .live-search-input {
  background-color: #2a2a2a !important;
  color: #ffffff !important;
  border: 1px solid #444444 !important;
}

body.high-contrast .search-service-card {
  background-color: #252525 !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}
body.high-contrast .search-service-card:hover {
  border-color: #2ee2a1 !important;
  background-color: #2a2a2a !important;
}

body.high-contrast .voice-command-bar {
  background-color: rgba(20, 20, 20, 0.95) !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}

body.high-contrast .accessibility-toolbar {
  background: #1a1a1a !important;
  border: 1px solid #333333 !important;
}

body.high-contrast .accessibility-toolbar button {
  color: #2ee2a1 !important;
}
body.high-contrast .accessibility-toolbar button:hover {
  background-color: #2ee2a1 !important;
  color: #121212 !important;
}
