/* ==========================================================================
   clausulasuelotoledo.com — plantilla hija de Cassiopeia (Joomla 5)
   Reproduce el aspecto de la web anterior (JoomLead Beawe): barra superior
   gris, barra de navegación oscura, cabecera con foto de Toledo, pie oscuro.
   ========================================================================== */

:root {
  --cst-dark: #262a31;
  --cst-darker: #1b1e24;
  --cst-grey: #f2f2f2;
  --cst-text: #444;
  --cst-muted: #777;
  --cst-accent: #2fb5d6;
  --cst-accent-dark: #1f97b5;
  --cassiopeia-color-primary: #262a31;
  --cassiopeia-color-link: #2fb5d6;
  --cassiopeia-color-hover: #1f97b5;
  --cassiopeia-font-family-body: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cassiopeia-font-family-headings: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cassiopeia-font-weight-headings: 300;
}

body.site {
  color: var(--cst-text);
  font-size: 15px;
  line-height: 1.7;
}

h1, h2, h3, h4 { font-weight: 300; color: #333; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
a { color: var(--cst-accent); }
a:hover { color: var(--cst-accent-dark); }

/* --- Barra superior ------------------------------------------------------ */
.container-header { background: var(--cst-dark); background-image: none; }
.container-header .container-topbar {
  background: var(--cst-grey);
  color: var(--cst-muted);
  font-size: 13px;
  padding: 0;
}
.container-topbar .grid-child,
.container-topbar .mod-custom { margin: 0; }
.container-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 8px 2rem; }
.container-topbar p { margin: 0; text-transform: uppercase; letter-spacing: .3px; }
.container-topbar > div:last-child p { text-transform: none; }
.wrapper-static .container-topbar { padding-left: calc((100% - 1320px) / 2 + 2rem); padding-right: calc((100% - 1320px) / 2 + 2rem); }

/* --- Navegación ---------------------------------------------------------- */
.container-header .container-nav { padding: 0; }
.container-header .mod-menu { gap: 0; }
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > .mod-menu__heading {
  color: #cfd3d8;
  font-size: 15px;
  padding: 18px 16px;
  text-decoration: none;
}
.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a { color: #ffffff; }
.container-header .mod-menu .mm-collapse,
.container-header .mod-menu ul.mod-menu__sub { background: #2f343c; }
.container-header .mod-menu ul.mod-menu__sub a { color: #d8dce1; font-size: 14px; padding: 8px 16px; }
.container-header .mod-menu ul.mod-menu__sub a:hover { color: #fff; background: #3a4049; }
.container-header .container-search { display: flex; align-items: center; margin-left: auto; }
.container-header .navbar-brand { display: none; }

/* Botón CONTACTO y botones generales */
.cst-btn {
  display: inline-block;
  background: var(--cst-accent);
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 2px;
  text-decoration: none !important;
  transition: background .2s;
}
.cst-btn:hover { background: var(--cst-accent-dark); }
.cst-btn-nav { margin: 10px 0 10px 1rem; }

/* --- Cabecera con foto (portada) ----------------------------------------- */
.container-banner { padding: 0; }
.container-banner .mod-custom { margin: 0; }
.cst-hero {
  position: relative;
  background: #0d1420 url("/images/14.jpg") center top / cover no-repeat;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.cst-hero::before { content: ""; position: absolute; inset: 0; background: rgba(5, 10, 20, .35); }
.cst-hero-inner { position: relative; max-width: 960px; padding: 70px 24px; }
.cst-hero-titles { position: relative; min-height: 64px; }
.cst-hero h1 { color: #fff; font-weight: 300; font-size: 48px; margin: 0; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.cst-hero-t1, .cst-hero-t2 { position: absolute; left: 0; right: 0; top: 0; animation: cst-swap 16s infinite; }
.cst-hero-t2 { animation-delay: 8s; opacity: 0; }
@keyframes cst-swap {
  0% { opacity: 0; } 6% { opacity: 1; } 44% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; }
}
.cst-hero-sub { font-size: 28px; font-weight: 300; margin: 40px 0 16px; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.35); display: inline-block; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.cst-hero-small { font-size: 13px; letter-spacing: 4px; text-transform: uppercase; margin: 0 0 32px; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.cst-hero-cta { margin: 0; }
.cst-hero .cst-btn { font-size: 15px; letter-spacing: 4px; padding: 13px 34px; }
@media (max-width: 767px) {
  .cst-hero { min-height: 440px; }
  .cst-hero h1 { font-size: 30px; }
  .cst-hero-titles { min-height: 80px; }
  .cst-hero-sub { font-size: 20px; margin-top: 24px; }
  .cst-hero-small { letter-spacing: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .cst-hero-t1, .cst-hero-t2 { animation: none; }
  .cst-hero-t2 { display: none; }
  .cst-hero-t1 { opacity: 1; position: static; }
}

/* --- Módulos de contenido (sin "tarjeta") -------------------------------- */
.site-grid .card { border: 0; background: transparent; box-shadow: none; }
.site-grid .card-body { padding: 0; }
.container-top-a, .container-top-b, .container-bottom-a, .container-bottom-b { margin: 2rem 0; }
.container-top-a .card, .container-top-b .card, .container-bottom-a .card, .container-bottom-b .card { margin-bottom: 2rem; }
.container-component { margin-top: 1rem; }
.com-content-article .page-header h1, .item-page h1, .com-contact h1 { font-size: 1.9rem; color: #333; }
.article-info, .article-info-term { color: #999; font-size: 13px; }
.item-page img, .mod-custom img { max-width: 100%; height: auto; }
.contact-form fieldset { border: 0; padding: 0; }
.contact .form-control { max-width: 640px; }

/* Utilidades UIkit usadas en los módulos antiguos */
.uk-grid { display: flex; flex-wrap: wrap; gap: 24px; margin: 0; padding: 0; list-style: none; }
.uk-grid > * { flex: 1 1 260px; min-width: 0; }
.uk-width-medium-1-2 { flex-basis: calc(50% - 24px); }
.uk-width-medium-1-3 { flex-basis: calc(33.333% - 24px); }
.uk-width-medium-4-5 { flex-basis: 80%; }
.uk-width-medium-1-5 { flex-basis: 20%; }
.uk-width-large-5-6 { max-width: 83.333%; margin-left: auto; margin-right: auto; }
.uk-align-center { display: block; margin-left: auto; margin-right: auto; }
.uk-text-center { text-align: center; }
.uk-margin-large-top { margin-top: 3rem; }
.uk-margin { margin-bottom: 1rem; }
.uk-flex { display: flex; } .uk-flex-middle { align-items: center; }
.uk-block { padding: 1rem 0; }
.uk-panel-box { background: #f7f7f7; border: 1px solid #eee; padding: 1.2rem; border-radius: 4px; }
.uk-button, .uk-button-primary { display: inline-block; background: var(--cst-accent); color: #fff !important; padding: 8px 16px; border-radius: 2px; text-decoration: none !important; }
.uk-cover-background { background-size: cover; background-position: center; }
.uk-overlay-scale { transition: transform .3s; }
.uk-overlay-scale:hover { transform: scale(1.05); }
.wow { visibility: visible !important; opacity: 1 !important; }
blockquote { font-style: italic; color: #555; border-left: 4px solid var(--cst-accent); padding-left: 1rem; margin: 1rem auto; max-width: 720px; }

/* Estilos del antiguo editor JCK que usan algunos artículos */
.blubox-jck, .grebox-jck, .redbox-jck, .blabox-jck, .yelbox-jck { background: #fafafa; border-style: solid; border-width: 1px 1px 1px 8px; margin: 10px 0 20px; padding: 8px 8px 8px 20px; border-top-left-radius: 15px; border-bottom-left-radius: 15px; color: #444; }
.yelbox-jck { border-color: #ddd #ddd #ddd #f2f096; color: #544c4a; }
img.polaroids_zoom { transform: rotate(2deg); transition: all .4s ease-in-out; background: #fff; box-shadow: 0 3px 6px rgba(0,0,0,.25); float: left; margin: 10px 20px 25px 14px; padding: 10px 10px 15px; height: 100px; width: auto; }
img.polaroids_zoom:hover { transform: scale(1.3); position: relative; z-index: 50; }
.row-fluid { display: flex; flex-wrap: wrap; gap: 2%; width: 100%; }
.row-fluid [class*="span"] { flex: 1 1 200px; min-height: 30px; }
.row-fluid .span6 { flex-basis: 48%; } .row-fluid .span4 { flex-basis: 31%; }
div.row-fluid img.polaroids_zoom { height: auto; max-width: 120px; }

/* --- Pie ----------------------------------------------------------------- */
.container-footer { background: var(--cst-dark); color: #aab0b7; padding: 0; margin-top: 2rem; }
.container-footer .grid-child { padding: 0; }
.container-footer .mod-custom { margin: 0; }
.container-footer .mod-custom:first-child { padding: 24px 2rem; text-align: center; font-size: 14px; }
.container-footer .mod-custom:first-child p { margin: 0; }
.container-footer a { color: var(--cst-accent); }
.cst-footlinks { background: var(--cst-darker); border-top: 1px solid #333; padding: 16px 2rem; text-align: center; font-size: 13px; }
.cst-footlinks a { color: #8ec9e0; margin: 0 10px; text-decoration: none; white-space: nowrap; }
.cst-footlinks a:hover { color: #fff; }
.back-to-top-link { background: #3a4049; }

/* Botón flotante de WhatsApp */
.cst-whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='white'><path d='M16 3C9.4 3 4 8.4 4 15c0 2.4.7 4.6 1.9 6.5L4 29l7.7-1.9A11.9 11.9 0 0 0 16 27c6.6 0 12-5.4 12-12S22.6 3 16 3zm0 21.7c-2 0-3.9-.6-5.5-1.6l-.4-.2-4.6 1.1 1.1-4.5-.3-.4A9.6 9.6 0 0 1 5.6 15c0-5.7 4.7-10.4 10.4-10.4S26.4 9.3 26.4 15 21.7 24.7 16 24.7zm5.4-7.7c-.3-.1-1.7-.9-2-1-.3-.1-.5-.1-.7.1-.2.3-.8 1-.9 1.2-.2.2-.3.2-.6.1-.3-.1-1.2-.5-2.4-1.5-.9-.8-1.5-1.7-1.6-2-.2-.3 0-.5.1-.6l.4-.5c.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5l-.9-2.2c-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.5.1-.8.4-.3.3-1 1-1 2.4s1 2.8 1.2 3c.1.2 2.1 3.2 5 4.4.7.3 1.2.5 1.7.6.7.2 1.3.2 1.8.1.6-.1 1.7-.7 2-1.4.2-.7.2-1.3.2-1.4-.1-.1-.3-.2-.6-.3z'/></svg>") center / 34px 34px no-repeat;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.cst-whatsapp:hover { background-color: #1ebe5a; }
.container-footer .mod-custom:has(.cst-whatsapp) { padding: 0; }

/* --- Ajustes de menú (metismenu de Cassiopeia) --------------------------- */
.container-header .mod-menu > li { flex-wrap: nowrap; align-items: center; }
.container-header .mod-menu > li > .mm-toggler { height: auto; align-self: stretch; }
@media (min-width: 992px) {
  .container-header .container-nav { display: flex; align-items: center; }
  .container-header .mod-menu > li > a { padding: 20px 14px; }
}

/* --- Secciones de la portada -------------------------------------------- */
.cst-intro { text-align: center; }
.cst-intro-title { text-transform: uppercase; letter-spacing: 2px; font-size: 1.4rem; margin: 0 0 1rem; }
.cst-intro-img { margin: 0; }
.cst-intro-img img { width: 100%; max-height: 220px; object-fit: cover; object-position: center; border-radius: 3px; }

.cst-100 h2 { display: flex; align-items: center; gap: 1rem; font-size: 1.4rem; }
.cst-100 h2 img { max-width: 220px; height: auto; }

.cst-ventajas { background: #f7f7f7; border: 1px solid #ececec; border-radius: 4px; padding: 2.5rem 2rem; }
.cst-ventajas-top { text-align: center; }
.cst-ventajas-top img { width: 170px; height: auto; margin-bottom: .5rem; }
.cst-ventajas-top blockquote { background: #fff; border-left: 0; border-top: 3px solid var(--cst-accent); border-radius: 3px; padding: 1rem 1.5rem; display: inline-block; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.cst-ventajas h2 { text-align: center; text-transform: uppercase; letter-spacing: 2px; font-size: 1.4rem; margin: 2rem 0 1.5rem; }
.cst-ventajas-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem 2rem; }
.cst-ventajas-grid h3 { font-size: 1.1rem; margin: 0 0 .4rem; color: #2a2e34; font-weight: 400; }
.cst-ventajas-grid p { margin: 0; color: #666; }

.cst-trabajo-intro { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: center; margin-bottom: 2rem; }
.cst-kicker { margin: 0; color: #777; font-size: 14px; }
.cst-trabajo-intro h2 { font-size: 2rem; margin: 0; }
.cst-trabajo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.cst-trabajo-grid li { position: relative; overflow: hidden; border-radius: 4px; background: #222; }
.cst-trabajo-grid img { display: block; width: 100%; height: 240px; object-fit: cover; opacity: .9; transition: transform .4s, opacity .4s; }
.cst-trabajo-grid li:hover img { transform: scale(1.05); opacity: .6; }
.cst-trabajo-grid div { position: absolute; inset: auto 0 0 0; padding: 1rem 1.2rem; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0)); }
.cst-trabajo-grid strong { display: block; font-weight: 600; }
.cst-trabajo-grid span { display: block; font-size: 13px; opacity: .9; }
@media (max-width: 767px) {
  .cst-trabajo-intro { grid-template-columns: 1fr; }
}

/* Menú: anular el salto de línea del indicador de submenú (mayor especificidad que template.css) */
.container-header .metismenu.mod-menu > li.metismenu-item { flex-wrap: nowrap; align-items: center; }
.container-header .metismenu.mod-menu > li.metismenu-item > .mm-toggler { margin-inline-start: -8px; margin-inline-end: 6px; }
/* Módulos apilados (no en columnas) en las zonas de contenido */
.site-grid .container-top-a, .site-grid .container-top-b, .site-grid .container-bottom-a, .site-grid .container-bottom-b { display: block; }

@media (min-width: 992px) {
  .container-header .container-nav { flex-wrap: nowrap; justify-content: space-between; }
  .container-header .container-nav .mod-menu { flex: 0 1 auto; }
  .container-header .container-search { flex: 0 0 auto; }
  .container-header .metismenu.mod-menu > li.metismenu-item > .mm-toggler { transform: scale(.6); margin-inline-start: -12px; margin-inline-end: 0; }
  .container-header .metismenu.mod-menu > li.metismenu-item > a { padding: 20px 12px; }
}

@media (min-width: 992px) {
  /* abrir los desplegables al pasar el ratón (además del clic en la flecha) */
  .container-header .metismenu.mod-menu > li.parent:hover > ul.mm-collapse { display: block; height: auto; }
  .container-header .metismenu.mod-menu > li.parent > ul.mm-collapse { min-width: 260px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
}
