/* ==========================================================================
   Factura Electrónica Uruguay (factura.uy) — Hoja de estilos principal
   Réplica fiel del diseño original (tema iStudio Orange) integrado con Bootstrap 5
   ========================================================================== */

:root {
  --factura-orange: #f47424;
  --factura-orange-dark: #d95f14;
  --factura-text: #555555;
  --factura-muted: #777777;
  --factura-heading: #353535;
  --factura-border: #eeeeee;
  --factura-border-dotted: #dedede;
  --factura-footer-bg: #f7f7f7;
}

/* ----------------------- GENERAL LAYOUT ----------------------- */
body {
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: var(--factura-text);
  margin: 0;
  padding: 0;
}

.site-center {
  max-width: 964px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: normal;
  color: var(--factura-heading);
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 15px;
}

h2 {
  font-size: 26px;
  line-height: 1.25;
  margin-bottom: 15px;
}

h3 {
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 14px;
}

h4 {
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 8px;
}

h5 {
  font-size: 14px;
  margin: 4px 0;
}

a,
a:link,
a:visited {
  color: var(--factura-orange);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover,
a:focus {
  color: var(--factura-heading);
  text-decoration: none;
}

p {
  line-height: 19px;
  margin-bottom: 14px;
  color: var(--factura-text);
  font-size: 12px;
}

img {
  max-width: 100%;
  height: auto;
  border: none;
}

.alignleft {
  float: left;
  margin: 4px 15px 10px 0;
}

.alignright {
  float: right;
  margin: 4px 0 10px 15px;
}

.aligncenter {
  display: block;
  margin: 0 auto 15px;
}

.divider {
  border-bottom: 1px solid #dadada;
  margin: 12px 0;
  clear: both;
}

/* ----------------------- HEADER & NAVIGATION ----------------------- */
#headerwrapper {
  background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 65%, #f0f0f0 100%);
  border-bottom: 1px solid #e2e2e2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

#header {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

#logo {
  padding: 10px 0;
}

#logo img {
  display: block;
  height: 55px;
  width: auto;
}

/* Navigation bar (jqueryslidemenu replica + responsive Bootstrap toggle) */
#myslidemenu {
  margin-left: auto;
}

#myslidemenu .navbar {
  padding: 0;
}

#menu-pages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

#menu-pages > li {
  position: relative;
}

#menu-pages > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 13px;
  font-size: 13px;
  font-weight: normal;
  color: #555555;
  border-top: 3px solid transparent;
  border-radius: 0;
  white-space: nowrap;
}

#menu-pages > li > a:hover,
#menu-pages > li.current-menu-item > a,
#menu-pages > li:hover > a {
  color: var(--factura-orange);
  border-top-color: var(--factura-orange);
}

#menu-pages > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #999999;
}

#menu-pages > li.menu-item-has-children:hover > a::after,
#menu-pages > li.current-menu-item.menu-item-has-children > a::after {
  border-top-color: var(--factura-orange);
}

/* Submenu dropdown */
#menu-pages ul.sub-menu {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-top: 2px solid var(--factura-orange);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: none;
  z-index: 1050;
}

#menu-pages ul.sub-menu li a {
  display: block;
  padding: 8px 14px;
  font-size: 12px;
  color: #555555;
  border-bottom: 1px dotted #eeeeee;
  white-space: normal;
}

#menu-pages ul.sub-menu li:last-child a {
  border-bottom: none;
}

#menu-pages ul.sub-menu li a:hover,
#menu-pages ul.sub-menu li.current-menu-item a {
  background: #fafafa;
  color: var(--factura-orange);
}

@media (min-width: 992px) {
  #menu-pages > li.menu-item-has-children:hover > ul.sub-menu {
    display: block;
  }
}

.navbar-toggler-factura {
  border: 1px solid #dcdcdc;
  background: #ffffff;
  padding: 5px 10px;
  border-radius: 4px;
  color: #555555;
  font-size: 13px;
}

/* ----------------------- HOMEPAGE: 3-COL FEATURES BOX ----------------------- */
#featuresbox {
  list-style: none;
  margin: 22px 0 18px;
  padding: 0;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-card img {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-top: 2px;
}

.feature-card h4 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
}

.feature-card h4 a {
  color: var(--factura-heading);
}

.feature-card h4 a:hover {
  color: var(--factura-orange);
}

.feature-card p {
  margin-bottom: 0;
  color: var(--factura-muted);
  font-size: 12px;
  line-height: 18px;
}

/* ----------------------- HOMEPAGE: SLIDESHOW ----------------------- */
#slidecontainer {
  padding: 10px 0;
  border-top: 1px solid var(--factura-border);
  border-bottom: 1px solid var(--factura-border);
}

#facturaSlider {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

#facturaSlider .carousel-item img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.nivo-style-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 11px;
  line-height: 1.45;
  z-index: 5;
}

.nivo-style-caption a {
  color: #ffffff;
  font-weight: bold;
}

.nivo-style-caption a:hover {
  color: #ffd3b3;
  text-decoration: underline;
}

#facturaSlider .carousel-control-prev,
#facturaSlider .carousel-control-next {
  width: 44px;
  opacity: 0.75;
}

#facturaSlider .carousel-control-prev:hover,
#facturaSlider .carousel-control-next:hover {
  opacity: 1;
}

#facturaSlider .carousel-control-prev-icon,
#facturaSlider .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  background-size: 55% 55%;
  width: 32px;
  height: 32px;
}

/* ----------------------- TAG BAR & BREADCRUMBS ----------------------- */
#tagbar {
  border-bottom: 1px solid var(--factura-border);
  padding: 10px 0;
  margin-top: 4px;
}

#tagbar h3,
#tagbar h1 {
  color: #686868;
  font-size: 22px;
  line-height: 1.3;
  margin: 4px 0;
  font-weight: normal;
  text-transform: none;
}

.breadcrumbs-plus {
  font-size: 11px;
  color: #777777;
  text-align: right;
}

.breadcrumbs-plus p {
  margin: 6px 0 0;
  font-size: 11px;
  color: #777777;
}

.breadcrumbs-plus .separator {
  margin: 0 4px;
  color: #999999;
}

/* ----------------------- HOMEPAGE: SERVICES 2x2 LIST ----------------------- */
#serviceslist {
  list-style: none;
  margin: 26px 0 10px;
  padding: 0;
}

#serviceslist .service-item {
  margin-bottom: 20px;
}

#serviceslist .service-item h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

#serviceslist .service-item h4 a {
  color: var(--factura-orange);
}

#serviceslist .service-item h4 a:hover {
  color: var(--factura-heading);
}

#serviceslist .service-item p {
  color: var(--factura-muted);
  margin-bottom: 0;
  line-height: 18px;
}

/* ----------------------- INNER PAGE CONTENT ----------------------- */
#content {
  margin-top: 20px;
  margin-bottom: 24px;
}

#maincontent {
  font-size: 12px;
  line-height: 19px;
}

#maincontent h2 {
  font-size: 24px;
  margin-top: 4px;
  margin-bottom: 12px;
}

#maincontent h3 {
  font-size: 19px;
  margin-top: 12px;
  margin-bottom: 10px;
}

#maincontent h4 {
  font-size: 16px;
  margin-top: 10px;
  margin-bottom: 8px;
}

/* Styled Lists matching original theme */
.bulletlist,
.checklist,
.arrowlist,
.itemlist {
  list-style: none;
  margin: 14px 0 18px;
  padding: 0;
}

.bulletlist li,
.checklist li,
.arrowlist li,
.itemlist li {
  position: relative;
  margin: 4px 0;
  padding: 2px 0 6px 20px;
  color: #666666;
  border-bottom: 1px dotted var(--factura-border-dotted);
  line-height: 18px;
}

.bulletlist li::before {
  content: "▪";
  position: absolute;
  left: 4px;
  top: 2px;
  color: var(--factura-orange);
  font-size: 13px;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: 2px;
  color: #6d9900;
  font-weight: bold;
}

.arrowlist li::before {
  content: "»";
  position: absolute;
  left: 4px;
  top: 1px;
  color: var(--factura-orange);
  font-weight: bold;
}

.itemlist li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  top: 2px;
  color: #999999;
}

/* Tables inside legal/normativa articles */
#maincontent table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 18px;
  color: #555555;
  font-size: 12px;
}

#maincontent table th {
  background-color: #aaaaaa;
  color: #ffffff;
  font-weight: normal;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid #d7d7d7;
}

#maincontent table td {
  padding: 8px 10px;
  border: 1px solid #e2e2e2;
  line-height: 18px;
  vertical-align: top;
}

#maincontent table tbody tr:nth-child(even) {
  background-color: #f6f6f6;
}

#maincontent ul:not([class]),
#maincontent ol:not([class]) {
  padding-left: 20px;
  margin-bottom: 14px;
}

#maincontent ul:not([class]) li,
#maincontent ol:not([class]) li {
  margin-bottom: 5px;
  line-height: 18px;
}

#maincontent hr {
  border-color: #e5e5e5;
  margin: 18px 0;
  clear: both;
}

.video-embed {
  border: 1px solid #e5e5e5;
  background: #000000;
}

/* ----------------------- BLOG / CATEGORY LISTING ----------------------- */
#listlatestnews {
  list-style: none;
  margin: 0;
  padding: 0;
}

#listlatestnews > li {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f2f2f2;
}

.postmeta {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--factura-border);
}

.leftpost {
  flex-shrink: 0;
  width: 44px;
  text-align: center;
  color: #666666;
  line-height: 1.1;
  padding-right: 10px;
}

.leftpost .date {
  display: block;
  font-size: 24px;
  font-weight: normal;
  color: #555555;
}

.leftpost .month {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: #888888;
}

.mainpost {
  flex: 1;
  border-left: 1px solid var(--factura-border);
  padding-left: 12px;
}

.mainpost h4,
.mainpost .posttitle {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.metapost {
  font-size: 10px;
  text-transform: uppercase;
  color: #9a9a9a;
}

.metapost a {
  color: #777777;
}

.metapost a:hover {
  color: var(--factura-orange);
}

.postbox {
  font-size: 12px;
  line-height: 19px;
}

a.linkreadmore {
  display: inline-block;
  font-weight: bold;
  border-bottom: 1px dotted #cccccc;
  color: #585858;
  font-size: 12px;
}

a.linkreadmore:hover {
  color: var(--factura-orange);
  border-bottom-color: var(--factura-orange);
}

/* ----------------------- SIDEBAR ----------------------- */
#sidebar {
  margin-top: 4px;
}

.sidebox {
  border: 1px solid var(--factura-border);
  padding: 12px 18px 18px;
  margin-bottom: 24px;
  background: #ffffff;
}

.sidebox h4 {
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 3px solid var(--factura-border);
  color: #484848;
  font-size: 17px;
}

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

.sidebox ul li {
  position: relative;
  font-size: 11px;
  margin: 3px 0;
  padding: 3px 0 4px 16px;
  color: #7d7d7d;
  border-bottom: 1px dotted var(--factura-border-dotted);
  line-height: 17px;
}

.sidebox ul li::before {
  content: "▪";
  position: absolute;
  left: 2px;
  top: 3px;
  color: #aaaaaa;
  font-size: 11px;
}

.sidebox ul li.current_page_item > a {
  font-weight: bold;
  color: var(--factura-heading);
}

.sidebox ul.children {
  margin-top: 4px;
  margin-left: 8px;
}

.sidebox ul.children li:last-child {
  border-bottom: none;
}

/* Sidebar Poll Widget (Encuesta) */
.wp-polls-ul {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
}

.sidebox .wp-polls-ul li {
  padding-left: 0;
  border-bottom: none;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}

.sidebox .wp-polls-ul li::before {
  content: none;
}

.wp-polls .btn-poll {
  border: 1px solid #c8c8c8;
  background-color: #f3f6f8;
  color: #444444;
  font-size: 11px;
  padding: 3px 12px;
  cursor: pointer;
}

.wp-polls .btn-poll:hover {
  background-color: var(--factura-orange);
  border-color: var(--factura-orange);
  color: #ffffff;
}

.poll-bar-track {
  background: #eeeeee;
  height: 10px;
  border-radius: 2px;
  overflow: hidden;
  margin: 3px 0 8px;
}

.poll-bar-fill {
  background: var(--factura-orange);
  height: 100%;
}

/* ----------------------- CONTACT FORM ----------------------- */
.factura-contact-card {
  border: 1px solid #e6e6e6;
  background: #fcfcfc;
  border-radius: 4px;
  padding: 20px;
  margin-top: 16px;
}

.factura-contact-card .form-label {
  font-size: 12px;
  font-weight: bold;
  color: #4a4a4a;
  margin-bottom: 4px;
}

.factura-contact-card .form-control {
  font-size: 13px;
  border-color: #dcdcdc;
  border-radius: 3px;
}

.factura-contact-card .form-control:focus {
  border-color: var(--factura-orange);
  box-shadow: 0 0 0 0.2rem rgba(244, 116, 36, 0.18);
}

.btn-factura {
  background-color: var(--factura-orange);
  border-color: var(--factura-orange);
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 3px;
}

.btn-factura:hover,
.btn-factura:focus {
  background-color: var(--factura-orange-dark);
  border-color: var(--factura-orange-dark);
  color: #ffffff;
}

/* Honeypot oculto para bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ----------------------- FOOTER ----------------------- */
#footerwrapper {
  margin-top: 16px;
  background: var(--factura-footer-bg);
  border-top: 1px solid var(--factura-border);
  border-bottom: 1px solid var(--factura-border);
}

#footer {
  padding: 22px 0 16px;
}

.footerbox h4 {
  font-size: 17px;
  color: #353535;
  margin-bottom: 12px;
}

.latestblog {
  list-style: none;
  margin: 0;
  padding: 0;
}

.latestblog li {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9e9e9;
  line-height: 15px;
  color: #666666;
}

.latestblog li:last-child {
  border-bottom: none;
}

.latestblog li .blogtitle a {
  font-weight: bold;
  font-size: 12px;
  color: var(--factura-orange);
}

.latestblog li .blogtitle a:hover {
  color: var(--factura-heading);
}

.latestblog li p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 15px;
  color: #666666;
}

.copyright p {
  margin: 6px 0 0;
  font-size: 11px;
  color: #777777;
}

.social-links {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.social-links li a img {
  width: 20px;
  height: 20px;
  display: block;
  transition: opacity 0.15s ease;
}

.social-links li a:hover img {
  opacity: 0.75;
}

/* ----------------------- 404 PAGE ----------------------- */
.error-404-box {
  text-align: center;
  padding: 48px 20px;
  border: 1px solid var(--factura-border);
  background: #fafafa;
  border-radius: 4px;
  margin: 24px 0 36px;
}

.error-404-code {
  font-size: 68px;
  font-weight: bold;
  color: var(--factura-orange);
  line-height: 1;
  margin-bottom: 12px;
}

/* ----------------------- RESPONSIVE TWEAKS ----------------------- */
@media (max-width: 991.98px) {
  #myslidemenu {
    width: 100%;
    padding-bottom: 10px;
  }

  #menu-pages {
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid #e5e5e5;
    padding-top: 8px;
  }

  #menu-pages > li > a {
    border-top: none;
    border-left: 3px solid transparent;
    padding: 8px 10px;
  }

  #menu-pages > li.current-menu-item > a,
  #menu-pages > li > a:hover {
    border-left-color: var(--factura-orange);
    background: #f5f5f5;
  }

  #menu-pages ul.sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid #eeeeee;
    margin-left: 14px;
    padding-left: 6px;
    display: block;
  }

  .breadcrumbs-plus {
    text-align: left;
  }

  .social-links {
    justify-content: flex-start;
    margin-top: 10px;
  }
}
