/**
 * Poliexpandidos - Tema con colores corporativos
 * Blanco, azul (#26186e), amarillo (#c9a227 mejor contraste)
 * + Tema oscuro
 */

/* ============================================
   MEJOR CONTRASTE - Amarillo para enlaces
   #f0d230 → #c9a227 (WCAG AA en fondos claros)
   ============================================ */

/* Enlaces principales - amarillo con mejor contraste */
a, a:hover, a:focus, a:active,
footer a.text-link:hover, strike, .post-meta span a:hover,
footer a.text-link, ul.meta-post li a:hover, ul.cat li a:hover,
ul.recent li h6 a:hover, ul.portfolio-categ li.active a,
ul.portfolio-categ li.active a:hover, ul.portfolio-categ li a:hover,
ul.related-post li h4 a:hover, span.highlight,
article .post-heading h3 a:hover,
.navbar .nav > .active > a, .navbar .nav > .active > a:hover,
.navbar .nav > li > a:hover, .navbar .nav > li > a:focus,
.navbar .nav > .active > a:focus {
  color: #c9a227 !important;
}

.navbar-brand span {
  color: #c9a227 !important;
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
  color: #c9a227 !important;
}

.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
  color: #c9a227 !important;
}

.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  color: #c9a227 !important;
}

/* Fondos y bordes amarillos */
.custom-carousel-nav.right:hover, .custom-carousel-nav.left:hover,
.dropdown-menu li:hover, .dropdown-menu li a:hover,
.dropdown-menu li > a:focus, .dropdown-submenu:hover > a,
.dropdown-menu .active > a, .dropdown-menu .active > a:hover,
.pagination ul > .active > a:hover, .pagination ul > .active > a,
.pagination ul > .active > span, .flex-control-nav li a:hover,
.flex-control-nav li a.active {
  background-color: #c9a227 !important;
}

.pagination ul > li.active > a, .pagination ul > li.active > span,
a.thumbnail:hover, input[type="text"].search-form:focus {
  border: 1px solid #c9a227 !important;
}

#sendmessage { color: #c9a227 !important; }
.pullquote-left { border-left: 5px solid #c9a227 !important; }
.pullquote-right { border-right: 5px solid #c9a227 !important; }
ul.clients li:hover { border: 4px solid #c9a227 !important; }
.box-bottom { background: #c9a227 !important; }
.btn-dark:hover, .btn-dark:focus, .btn-dark:active {
  background: #c9a227 !important;
  border: 1px solid #c9a227 !important;
}
.btn-theme {
  border: 1px solid #c9a227 !important;
  background: #c9a227 !important;
}
.modal.styled .modal-header { background-color: #c9a227 !important; }
.post-meta { border-top: 4px solid #c9a227 !important; }
.post-meta .comments a:hover { color: #c9a227 !important; }
.widget ul.tags li a:hover { background: #c9a227 !important; }
.recent-post .text h5 a:hover { color: #c9a227 !important; }
.pricing-box-alt.special .pricing-heading { background: #c9a227 !important; }
.item-thumbs .hover-wrap .overlay-img-thumb { background: #c9a227 !important; }
#pagination a:hover { background: #c9a227 !important; }
.pricing-box.special .pricing-offer { background: #c9a227 !important; }
.icon-square:hover, .icon-rounded:hover, .icon-circled:hover { background-color: #c9a227 !important; }
[class^="icon-"].active, [class*=" icon-"].active { background-color: #c9a227 !important; }
.fancybox-close:hover { background-color: #c9a227 !important; }
.fancybox-nav:hover span { background-color: #c9a227 !important; }
.da-slide .da-link:hover {
  background: #c9a227 !important;
  border: 4px solid #c9a227 !important;
}
.da-dots span { background: #c9a227 !important; }
#featured .flexslider .slide-caption { border-left: 5px solid #c9a227 !important; }
.nivo-directionNav a:hover { background-color: #c9a227 !important; }
.nivo-caption, .caption { border-bottom: #c9a227 5px solid !important; }

/* Header nav underline */
header .nav li a:hover, header .nav li a:focus,
header .nav li.active a, header .nav li.active a:hover,
header .nav li a.dropdown-toggle:hover, header .nav li a.dropdown-toggle:focus,
header .nav li.active ul.dropdown-menu li a:hover,
header .nav li.active ul.dropdown-menu li.active a {
  border-bottom-color: #c9a227 !important;
}

/* Input focus */
textarea:focus, input[type="text"]:focus, input[type="password"]:focus,
input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus,
input[type="tel"]:focus, input:focus {
  border-color: #c9a227 !important;
}


/* ============================================
   TEMA OSCURO - Material Design 3 / Best Practices
   Paleta: fondos neutros + acentos corporativos (azul/amarillo)
   ============================================ */

html.theme-dark,
html[data-theme="dark"] {
  --poli-bg: #0D1117;
  --poli-bg-surface: #161B22;
  --poli-bg-elevated: #21262D;
  --poli-bg-card: #1C2128;
  --poli-border: #30363D;
  --poli-border-subtle: #21262D;
  --poli-blue: #26186e;
  --poli-blue-hover: #3D2A8A;
  --poli-yellow: #F0B429;
  --poli-yellow-bright: #FFD54F;
  --poli-text: #E6EDF3;
  --poli-text-secondary: #8B949E;
  --poli-text-muted: #6E7681;
}

/* Base - aplica a todo */
html.theme-dark,
html[data-theme="dark"] {
  background-color: var(--poli-bg) !important;
}

html.theme-dark body,
html[data-theme="dark"] body,
html.theme-dark #wrapper,
html[data-theme="dark"] #wrapper {
  background-color: var(--poli-bg) !important;
  color: var(--poli-text) !important;
}

html.theme-dark #main,
html[data-theme="dark"] #main {
  background-color: var(--poli-bg) !important;
}

/* Header */
html.theme-dark header .navbar-default,
html[data-theme="dark"] header .navbar-default {
  background-color: var(--poli-bg-surface) !important;
  border-bottom-color: var(--poli-border) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

html.theme-dark header .nav li a,
html[data-theme="dark"] header .nav li a {
  color: var(--poli-text) !important;
}

html.theme-dark header .nav li a:hover,
html[data-theme="dark"] header .nav li a:hover,
html.theme-dark header .nav li.active a,
html[data-theme="dark"] header .nav li.active a {
  color: var(--poli-yellow) !important;
  border-bottom-color: var(--poli-yellow) !important;
}

html.theme-dark .navbar-default .navbar-nav > .active > a,
html[data-theme="dark"] .navbar-default .navbar-nav > .active > a,
html.theme-dark .navbar-default .navbar-nav > .open > a,
html[data-theme="dark"] .navbar-default .navbar-nav > .open > a {
  background-color: var(--poli-bg-elevated) !important;
  color: var(--poli-yellow) !important;
}

html.theme-dark .dropdown-menu,
html[data-theme="dark"] .dropdown-menu {
  background-color: var(--poli-bg-surface) !important;
  border-color: var(--poli-border) !important;
}

html.theme-dark .dropdown-menu li a,
html[data-theme="dark"] .dropdown-menu li a {
  color: var(--poli-text) !important;
}

html.theme-dark .dropdown-menu li a:hover,
html[data-theme="dark"] .dropdown-menu li a:hover,
html.theme-dark .dropdown-menu .active > a,
html[data-theme="dark"] .dropdown-menu .active > a {
  background-color: var(--poli-bg-elevated) !important;
  color: var(--poli-yellow) !important;
}

/* Secciones de contenido - CRÍTICO */
html.theme-dark #content,
html[data-theme="dark"] #content,
html.theme-dark #content-fancy,
html[data-theme="dark"] #content-fancy {
  background-color: var(--poli-bg) !important;
  color: var(--poli-text) !important;
}

html.theme-dark #content .container,
html[data-theme="dark"] #content .container,
html.theme-dark #content-fancy .container,
html[data-theme="dark"] #content-fancy .container {
  background-color: transparent !important;
}

html.theme-dark .container-fluid,
html[data-theme="dark"] .container-fluid,
html.theme-dark .container,
html[data-theme="dark"] .container {
  background-color: transparent !important;
  color: var(--poli-text) !important;
}

html.theme-dark .container-fluid.bg-grey,
html[data-theme="dark"] .container-fluid.bg-grey {
  background-color: var(--poli-bg-surface) !important;
}

/* Productos / Portfolio - content-fancy */
html.theme-dark #content-fancy,
html[data-theme="dark"] #content-fancy {
  padding: 50px 0 !important;
}

html.theme-dark #projects,
html[data-theme="dark"] #projects,
html.theme-dark .portfolio,
html[data-theme="dark"] .portfolio {
  background-color: transparent !important;
}

html.theme-dark .portfolio li,
html[data-theme="dark"] .portfolio li,
html.theme-dark .portfolio ul,
html[data-theme="dark"] .portfolio ul {
  background-color: transparent !important;
  border-color: var(--poli-border) !important;
}

html.theme-dark .item-thumbs,
html[data-theme="dark"] .item-thumbs {
  background-color: var(--poli-bg-card) !important;
  border: 1px solid var(--poli-border) !important;
  border-radius: 8px !important;
}

html.theme-dark .item-thumbs-down,
html[data-theme="dark"] .item-thumbs-down {
  background-color: transparent !important;
}

html.theme-dark .item-thumbs-down a,
html[data-theme="dark"] .item-thumbs-down a {
  color: var(--poli-yellow) !important;
}

html.theme-dark #content-fancy img,
html[data-theme="dark"] #content-fancy img {
  border-color: var(--poli-border) !important;
}

/* Portfolio filter buttons */
html.theme-dark .portfolio-categ,
html[data-theme="dark"] .portfolio-categ {
  background-color: transparent !important;
}

html.theme-dark .portfolio-categ li a,
html[data-theme="dark"] .portfolio-categ li a,
html.theme-dark .filter-button-group li a,
html[data-theme="dark"] .filter-button-group li a {
  color: var(--poli-text-secondary) !important;
}

html.theme-dark .portfolio-categ li.active a,
html[data-theme="dark"] .portfolio-categ li.active a,
html.theme-dark .portfolio-categ li a:hover,
html[data-theme="dark"] .portfolio-categ li a:hover,
html.theme-dark .filter-button-group li.active a,
html[data-theme="dark"] .filter-button-group li.active a {
  color: var(--poli-yellow) !important;
}

html.theme-dark .filter-button-group li,
html[data-theme="dark"] .filter-button-group li {
  color: var(--poli-text) !important;
}

/* inner-headline */
html.theme-dark #inner-headline,
html[data-theme="dark"] #inner-headline {
  background-color: var(--poli-bg-surface) !important;
  border-bottom: 1px solid var(--poli-border);
}

html.theme-dark #inner-headline .container,
html[data-theme="dark"] #inner-headline .container {
  background-color: transparent !important;
}

/* Breadcrumb */
html.theme-dark .breadcrumb,
html[data-theme="dark"] .breadcrumb {
  background-color: var(--poli-bg-elevated) !important;
  border: none;
}

html.theme-dark .breadcrumb li,
html[data-theme="dark"] .breadcrumb li,
html.theme-dark .breadcrumb a,
html[data-theme="dark"] .breadcrumb a {
  color: var(--poli-text-secondary) !important;
}

html.theme-dark .breadcrumb .active,
html[data-theme="dark"] .breadcrumb .active {
  color: var(--poli-yellow) !important;
}

/* Tipografía */
html.theme-dark h1, html.theme-dark h2, html.theme-dark h3,
html.theme-dark h4, html.theme-dark h5, html.theme-dark h6,
html[data-theme="dark"] h1, html[data-theme="dark"] h2,
html[data-theme="dark"] h3, html[data-theme="dark"] h4,
html[data-theme="dark"] h5, html[data-theme="dark"] h6 {
  color: var(--poli-text) !important;
}

html.theme-dark p,
html[data-theme="dark"] p,
html.theme-dark li,
html[data-theme="dark"] li,
html.theme-dark span,
html[data-theme="dark"] span {
  color: var(--poli-text) !important;
}

html.theme-dark .intro,
html[data-theme="dark"] .intro {
  color: var(--poli-text-secondary) !important;
}

/* Enlaces */
html.theme-dark a,
html[data-theme="dark"] a {
  color: var(--poli-yellow) !important;
}

html.theme-dark a:hover,
html[data-theme="dark"] a:hover,
html.theme-dark a:focus,
html[data-theme="dark"] a:focus {
  color: var(--poli-yellow-bright) !important;
}

html.theme-dark .container-fluid a,
html[data-theme="dark"] .container-fluid a {
  color: var(--poli-yellow) !important;
}

/* Footer */
html.theme-dark footer,
html[data-theme="dark"] footer {
  background-color: var(--poli-bg-surface) !important;
  border-top: 1px solid var(--poli-border);
}

html.theme-dark #sub-footer,
html[data-theme="dark"] #sub-footer {
  background-color: var(--poli-bg) !important;
  border-top: 1px solid var(--poli-border);
}

html.theme-dark footer a,
html[data-theme="dark"] footer a {
  color: var(--poli-yellow) !important;
}

html.theme-dark footer a:hover,
html[data-theme="dark"] footer a:hover {
  color: var(--poli-yellow-bright) !important;
}

html.theme-dark .copyright,
html[data-theme="dark"] .copyright,
html.theme-dark .credits,
html[data-theme="dark"] .credits {
  color: var(--poli-text-muted) !important;
}

/* Cards, boxes, jumbotron */
html.theme-dark .box,
html[data-theme="dark"] .box,
html.theme-dark .box-gray,
html[data-theme="dark"] .box-gray,
html.theme-dark .service-info,
html[data-theme="dark"] .service-info {
  background-color: var(--poli-bg-card) !important;
  border: 1px solid var(--poli-border);
  color: var(--poli-text) !important;
}

html.theme-dark .jumbotron,
html[data-theme="dark"] .jumbotron {
  background-color: var(--poli-bg-surface) !important;
  border: 1px solid var(--poli-border);
  color: var(--poli-text) !important;
}

html.theme-dark .callaction,
html[data-theme="dark"] .callaction,
html.theme-dark .big-cta,
html[data-theme="dark"] .big-cta {
  background-color: var(--poli-bg-surface) !important;
  color: var(--poli-text) !important;
}

html.theme-dark .contact,
html[data-theme="dark"] .contact {
  background-color: transparent !important;
}

/* About / Policy */
html.theme-dark #about,
html[data-theme="dark"] #about {
  background-color: transparent !important;
}

/* Rows y columns */
html.theme-dark .row,
html[data-theme="dark"] .row {
  background-color: transparent !important;
}

/* Section elements */
html.theme-dark section,
html[data-theme="dark"] section {
  background-color: transparent !important;
}

/* arrows-fluid (caseton page) */
html.theme-dark .arrows-fluid,
html[data-theme="dark"] .arrows-fluid {
  background-color: transparent !important;
  color: var(--poli-text) !important;
}

/* Clearfix */
html.theme-dark .clearfix,
html[data-theme="dark"] .clearfix {
  background-color: transparent !important;
}

/* Hover overlay on portfolio - mantiene overlay semitransparente */
html.theme-dark .item-thumbs .hover-wrap .overlay-img,
html[data-theme="dark"] .item-thumbs .hover-wrap .overlay-img {
  background: rgba(0, 0, 0, 0.6) !important;
}

html.theme-dark .item-thumbs .hover-wrap .overlay-img-thumb,
html[data-theme="dark"] .item-thumbs .hover-wrap .overlay-img-thumb {
  background-color: var(--poli-yellow) !important;
  color: var(--poli-bg) !important;
}

/* Formularios */
html.theme-dark input,
html[data-theme="dark"] input,
html.theme-dark textarea,
html[data-theme="dark"] textarea,
html.theme-dark .form-control,
html.theme-dark select {
  background-color: var(--poli-bg-card) !important;
  border-color: var(--poli-border) !important;
  color: var(--poli-text) !important;
}

html.theme-dark input::placeholder,
html[data-theme="dark"] input::placeholder,
html.theme-dark textarea::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: var(--poli-text-muted);
}

/* Featured / Slider */
html.theme-dark #featured,
html[data-theme="dark"] #featured {
  background-color: var(--poli-bg) !important;
}

html.theme-dark #featured .flexslider,
html[data-theme="dark"] #featured .flexslider {
  background-color: var(--poli-bg-surface) !important;
}

html.theme-dark #featured .flexslider .slide-caption,
html[data-theme="dark"] #featured .flexslider .slide-caption {
  background-color: rgba(0,0,0,0.75) !important;
  border-left-color: var(--poli-yellow) !important;
}

/* CTA */
html.theme-dark .cta-text h2 span,
html[data-theme="dark"] .cta-text h2 span {
  color: var(--poli-yellow) !important;
}

/* Recycle advice */
html.theme-dark .recycle-advice,
html[data-theme="dark"] .recycle-advice {
  background-color: var(--poli-bg-surface) !important;
  color: var(--poli-text) !important;
  border-color: var(--poli-border);
}

/* Botones */
html.theme-dark .btn-theme,
html[data-theme="dark"] .btn-theme {
  background-color: var(--poli-yellow) !important;
  border-color: var(--poli-yellow) !important;
  color: #0D1117 !important;
}

html.theme-dark .btn-theme:hover,
html[data-theme="dark"] .btn-theme:hover {
  background-color: var(--poli-yellow-bright) !important;
  color: #0D1117 !important;
}

/* Blockquote, meta-post, widgets */
html.theme-dark blockquote,
html[data-theme="dark"] blockquote {
  color: var(--poli-text-secondary) !important;
  border-color: var(--poli-border);
}

html.theme-dark .meta-post,
html[data-theme="dark"] .meta-post,
html.theme-dark .meta-post a,
html[data-theme="dark"] .meta-post a {
  color: var(--poli-text-secondary) !important;
}

html.theme-dark .widget,
html[data-theme="dark"] .widget {
  background-color: transparent !important;
  color: var(--poli-text) !important;
}

html.theme-dark .right-sidebar,
html[data-theme="dark"] .right-sidebar,
html.theme-dark .left-sidebar,
html[data-theme="dark"] .left-sidebar {
  background-color: transparent !important;
}

/* Pagination */
html.theme-dark #pagination,
html[data-theme="dark"] #pagination {
  color: var(--poli-text) !important;
}

html.theme-dark #pagination a,
html[data-theme="dark"] #pagination a {
  color: var(--poli-yellow) !important;
}

/* Form labels y grupos */
html.theme-dark label,
html[data-theme="dark"] label {
  color: var(--poli-text) !important;
}

html.theme-dark .form-group,
html[data-theme="dark"] .form-group {
  background-color: transparent !important;
}

/* Grid columns - sin fondo blanco */
html.theme-dark [class*="col-"],
html[data-theme="dark"] [class*="col-"] {
  background-color: transparent !important;
}

/* Social icons footer */
html.theme-dark .social-network a,
html[data-theme="dark"] .social-network a {
  color: var(--poli-text-secondary) !important;
}

html.theme-dark .social-network a:hover,
html[data-theme="dark"] .social-network a:hover {
  color: var(--poli-yellow) !important;
}

/* icon-angle-right en breadcrumb */
html.theme-dark .icon-angle-right,
html[data-theme="dark"] .icon-angle-right {
  color: var(--poli-text-muted) !important;
}

/* WhatsApp flotante */
html.theme-dark .flotante,
html[data-theme="dark"] .flotante {
  background-color: #25D366 !important;
  color: white !important;
}

/* Scroll up */
html.theme-dark .scrollup,
html[data-theme="dark"] .scrollup {
  background-color: var(--poli-bg-elevated) !important;
  color: var(--poli-yellow) !important;
  border: 1px solid var(--poli-border);
}

/* ============================================
   Theme Switch - En el footer, compacto
   NUNCA position:fixed - no tapa el menú
   ============================================ */

.footer-theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: static !important;
}

.theme-label-footer {
  font-size: 11px;
  font-weight: 600;
  color: inherit;
}

.footer-theme-switch .theme-switch-wrapper {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #26186e;
  border-radius: 16px;
  padding: 2px;
  box-shadow: 0 1px 4px rgba(38, 24, 110, 0.15);
  position: static !important;
}

.footer-theme-switch .theme-switch-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #26186e;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.footer-theme-switch .theme-switch-option:hover {
  background: rgba(38, 24, 110, 0.12);
  color: #26186e;
}

.footer-theme-switch .theme-switch-option.active {
  background: #26186e;
  color: #fff;
  box-shadow: 0 1px 4px rgba(38, 24, 110, 0.3);
}

.footer-theme-switch .theme-switch-option.active:hover {
  background: #1a0f4d;
  color: #fff;
}

.footer-theme-switch .theme-switch-option .fa {
  font-size: 13px;
}

/* Ocultar etiquetas en footer - solo iconos, más compacto */
.footer-theme-switch .theme-switch-label {
  display: none;
}

/* Tema oscuro - footer switch */
html.theme-dark .footer-theme-switch .theme-switch-wrapper,
html[data-theme="dark"] .footer-theme-switch .theme-switch-wrapper {
  background: var(--poli-bg-surface);
  border-color: var(--poli-yellow);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

html.theme-dark .footer-theme-switch .theme-switch-option,
html[data-theme="dark"] .footer-theme-switch .theme-switch-option {
  color: var(--poli-text-secondary);
}

html.theme-dark .footer-theme-switch .theme-switch-option:hover,
html[data-theme="dark"] .footer-theme-switch .theme-switch-option:hover {
  background: rgba(240, 180, 41, 0.15);
  color: var(--poli-yellow);
}

html.theme-dark .footer-theme-switch .theme-switch-option.active,
html[data-theme="dark"] .footer-theme-switch .theme-switch-option.active {
  background: var(--poli-yellow);
  color: var(--poli-bg);
  box-shadow: 0 1px 4px rgba(240, 180, 41, 0.4);
}

html.theme-dark .footer-theme-switch .theme-switch-option.active:hover,
html[data-theme="dark"] .footer-theme-switch .theme-switch-option.active:hover {
  background: #FFD54F;
  color: var(--poli-bg);
}

html.theme-dark .footer-theme-switch .theme-label-footer,
html[data-theme="dark"] .footer-theme-switch .theme-label-footer {
  color: var(--poli-text-secondary);
}

/* Integrar switch con iconos sociales en sub-footer */
#sub-footer .col-lg-6:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

#sub-footer .footer-theme-switch {
  margin-bottom: 0;
}

#sub-footer .col-lg-6:last-child ul.social-network {
  float: none;
}

@media (max-width: 991px) {
  #sub-footer .col-lg-6:last-child {
    justify-content: flex-start;
  }
}
