/*------------------------------------------------------------------------
# TheSaaS Drupal - Modificado para Mi Abotgado
# ------------------------------------------------------------------------
# 00. Fuentes Corporativas y Variables Bootstrap
# 01. Custom CSS
# 02. Menu
# 03. Section
# 04. Forms
# 05. Blog & Portfolio
# 06. Edit form
# 07. Swiper slider
# 08. Identidad Mi Abotgado (Logo y Botones)
# 09. Ajuste Exclusivo Contraste Página Contacto y Formularios
# 10. Corrección de Contraste en Secciones Oscuras
# 11. Estilos Globales para Formularios (Básico y Webform)
# 12. Banner de Cookies Flotante
--------------------------------------------------------------------------------*/

/* 00. Fuentes Corporativas y Variables Bootstrap
--------------------------------------------------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Montserrat:wght@700&display=swap');

:root {
    --bs-primary: #191970; /* Dark Blue */
    --bs-info: #40E0D0; /* Turquoise */
    --bs-warning: #D4AF37; /* Gold */
    --bs-body-bg: #FFFFFF; /* White */
    --bs-body-color: #333333; 
    --bs-font-sans-serif: 'Lato', sans-serif !important;
    --bs-body-font-family: 'Lato', sans-serif !important;
}

/* 01. Custom CSS
--------------------------------------------------------------------------------*/
html { font-size: 100%;}
body { 
 font-family: "Lato", sans-serif !important; 
 font-size: .9375rem;
 font-weight: 400; 
 line-height: 1.9;
 color: #333333; 
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .navbar-brand {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
}

.partner-sm img { width: auto; }

@media screen and (min-width: 768px) {
  body { margin-top: 0; }
}
.form-group:last-child, .panel:last-child, .popover ol:last-child, .popover ul:last-child, p:last-child {
  margin-bottom: 1rem;
}
.row:before, .row:after { display: block; }
a { text-decoration: none; }
hr { margin: 2rem auto; opacity: 0.1; }
.text-white hr { border-top-color: rgba(255, 255, 255, 0.15); }
.w-50 { width: 50px !important; }
.card-body { padding: 1.5rem; }
.text-light { color: #999 !important; }

/* Regions */
.footer { padding: 0; }

/* Buttons */
.btn {
    font-size: 11px;
    padding: 8px 26px 6px;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    border-radius: 2px;
    outline: none;
    transition: 0.15s linear;
    font-family: 'Montserrat', sans-serif !important;
}
.btn-round { border-radius: 10rem; }
.btn-success { color: #fff; background-color: #3cd458; border-color: #3cd458; }
.btn-info { color: #fff; background-color: #926dde; border-color: #926dde; }
.btn-light { color: #757575; background-color: #f8f9fa; border-color: #f8f9fa; }
.btn-xs { padding: 4px 12px 3px; font-size: 10px; }
.btn-lg { padding: 7px 32px 6px; font-size: 12px; }
.btn-xl { padding: 10px 38px 10px; font-size: 13px; }
.btn-circle { padding: 0; border-radius: 10rem; display: inline-flex; }
.btn-white { color: #757575; background-color: #fff; border-color: #fff; }

/* Backgrounds */
.bg-primary { background-color: #191970 !important; } 
.bg-info { background-color: #40E0D0 !important; } 
.bg-warning { background-color: #D4AF37 !important; } 
.bg-purple { background-color: #7a54d8; color: #fff; }
.bg-purple-light { background-color: #b9a0c9; color: #fff; }
.bg-blue-light { background-color: #8ea6e6; color: #fff; }
.bg-pink { background-color: #f64d62; color: #fff; }
.bg-skype { background-color: #00aff0; color: #fff; }
.bg-project { background-color: #7a54d8; color: #fff; }
.bg-job { background-color: #c2b2cd; color: #fff; }
.bg-metal { background-color: #262A37; }
.bg-iceberg { background-color: #65b7cc; }
.bg-red { background-color: #f64d62; }

/* Card */
.card { border: 0; transition: .5s; }
.accordion-connected .card { padding: 0; }
.accordion-header { cursor: pointer; }
.card.shadow-1 { border: none; }
.form-control { border: 1px solid #eaeff4; }
div.hr { border-top: 1px solid rgba(117, 117, 117, 0.09); height: 0; overflow: visible; margin: 2rem auto; }

/* Pagination */
ul.pagination { justify-content: center; gap: 10px; margin-top: 2rem; }
.border { border: 1px solid #f1f2f3 !important; }

/* 02. Menu
--------------------------------------------------------------------------------*/
.nav-item, .nav-link { cursor: pointer; }
.nav-link { color: #757575; font-weight: 400; font-family: 'Montserrat', sans-serif !important; }
.navbar { position: absolute; }
.navbar .navbar-mobile { width: auto; }
.navbar-toggler { border: none; }
@media (max-width: 991.98px) { .navbar .navbar-mobile { width: 300px; } }
.body-scrolled .navbar.navbar-sticky {
  position: fixed; top: 0; transition: margin-left .5s, background-color .5s;
  background-color: rgba(255, 255, 255, 0.99); box-shadow: 0 1px 9px rgba(0, 0, 0, 0.05);
}
.body-scrolled .navbar.navbar-sticky .btn-white.btn-outline { border-color: #f1f2f3; color: #b5b9bf; }
.body-scrolled .navbar.navbar-light.navbar-sticky { color: #535353; }
.body-scrolled .navbar.navbar-light.navbar-sticky .logo-dark { display: inline-block; }
.body-scrolled .navbar.navbar-light.navbar-sticky .logo-light { display: none; }
.body-scrolled .navbar.navbar-light.navbar-sticky .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(117,117,117,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-dark .nav-navbar>.nav-item>.nav-link, .navbar-dark .nav-navbar>.nav-link, 
.navbar-stick-dark.stick .nav-navbar>.nav-item>.nav-link, .navbar-stick-dark.stick .nav-navbar>.nav-link { color: rgba(117, 117, 117, 0.8); }
.body-scrolled .navbar.navbar-light.navbar-sticky .nav-navbar > .nav-item > .nav-link,
.body-scrolled .navbar.navbar-light.navbar-sticky .topbar-toggler,
.body-scrolled .navbar.navbar-light.navbar-sticky .drawer-toggler { color: rgba(117, 117, 117, 0.8); }
.body-scrolled .scroll-top { opacity: 0.6; }
.navbar-dark .navbar-toggler, .navbar-stick-dark.stick .navbar-toggler { color: rgba(117, 117, 117, 0.8); }

/* 08. Identidad Mi Abotgado (Logo y Botones)
--------------------------------------------------------------------------------*/
.navbar-brand img, .header .navbar-brand img {
    max-height: 70px !important; 
    width: auto !important;
    display: block !important;
}

@media (max-width: 991px) {
    .navbar-brand img { max-height: 45px !important; }
}

.btn-success, .navbar .btn-success {
    background-color: #40E0D0 !important; 
    border-color: #40E0D0 !important;
    color: #191970 !important; 
    font-weight: 700;
}

.btn-success:hover, .navbar .btn-success:hover {
    background-color: #191970 !important; 
    border-color: #191970 !important;
    color: #FFFFFF !important; 
}

.btn-outline-success { color: #40E0D0 !important; border-color: #40E0D0 !important; }
.btn-outline-success:hover { background-color: #40E0D0 !important; color: #191970 !important; }

.nav-link {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: 13px;
}

/* 09. Ajuste Exclusivo Contraste Página Contacto y Formularios B2B
--------------------------------------------------------------------------------*/
body.path-contact:not(.body-scrolled) .navbar,
body.path-webform:not(.body-scrolled) .navbar {
    background-color: var(--bs-primary) !important; 
    position: absolute !important; 
}

body.path-contact:not(.body-scrolled) .nav-link,
body.path-webform:not(.body-scrolled) .nav-link {
    color: var(--bs-body-bg) !important; 
}

body.path-contact:not(.body-scrolled) .navbar-brand img,
body.path-webform:not(.body-scrolled) .navbar-brand img {
    filter: brightness(0) invert(1) !important; 
}

body.path-contact main.main-content,
body.path-webform main.main-content {
    padding-top: 140px !important;
}

/* 10. Corrección Quirúrgica de Contraste (Secciones Oscuras)
   SOLO cambia el texto que está DENTRO de secciones con fondo azul.
--------------------------------------------------------------------------------*/
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4,
section.bg-primary h2, 
.bg-primary .text-primary {
    color: var(--bs-info) !important; /* Forza el Turquesa para que resalte */
}

.bg-primary p, .bg-primary .lead {
    color: rgba(255, 255, 255, 0.9) !important; /* Blanco suave */
}

.bg-primary .display-4 {
    color: #ffffff !important;
    opacity: 0.2 !important;
}

/* 11. Estilo Exclusivo para TODOS los Formularios (Básico y Webform)
--------------------------------------------------------------------------------*/

/* Alinear y dar espacio al cuadro de "No soy un robot" */
.captcha {
    margin-top: 20px !important;
    margin-bottom: 25px !important;
    display: block !important;
}

/* Estilo del botón "Enviar Mensaje" (Turquesa, estilo píldora) */
.contact-message-feedback-form .form-submit,
.webform-submission-form .button,
.webform-submission-form .form-submit {
    background-color: #40E0D0 !important; /* Turquesa */
    color: #191970 !important; /* Azul Oscuro */
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    padding: 12px 35px !important;
    border-radius: 50px !important; 
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
    width: auto !important;
}

/* Efecto al pasar el mouse sobre el botón */
.contact-message-feedback-form .form-submit:hover,
.webform-submission-form .button:hover,
.webform-submission-form .form-submit:hover {
    background-color: #191970 !important; /* Azul Oscuro */
    color: #ffffff !important; /* Letras Blancas */
}

/* 12. Banner de Cookies Flotante
--------------------------------------------------------------------------------*/
.cookie-card {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 380px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  animation: slideInLeftElegant 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease, visibility 0s 0s;
  visibility: visible;
}

.cookie-card.hidden {
  transform: translateX(-120%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease, visibility 0s 0.5s;
}

@keyframes slideInLeftElegant {
  0% { transform: translateX(-120%) scale(0.96); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

.cookie-header {
  background-color: #D2FF00 !important; /* Asegura el color neón */
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.cookie-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #122823;
  font-family: 'Montserrat', sans-serif !important;
}

.cookie-body {
  padding: 20px 24px;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-y: auto;
  max-height: 320px;
}

.cookie-link {
  color: #122823;
  font-weight: 700;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.cookie-link:hover { opacity: 0.8; }

.cookie-buttons {
  display: flex;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  flex-shrink: 0;
}

.cookie-btn {
  flex: 1;
  padding: 16px 8px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease;
  color: #6b7280;
  user-select: none;
  font-family: 'Montserrat', sans-serif !important;
  text-transform: none;
  letter-spacing: normal;
}

.cookie-btn:hover { background-color: #f9fafb; }
.cookie-btn:active { background-color: #f3f4f6; }
.cookie-btn.accept { color: #122823; border-left: 1px solid #e5e7eb; }

.cookie-step { display: flex; flex-direction: column; }
.cookie-step.is-hidden { display: none; }

.toggle-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.toggle-group label:first-child {
  font-size: 0.85rem;
  font-weight: 600;
  color: #122823;
  padding-right: 12px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #d1d5db;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider { background-color: #122823; }
input:checked + .slider:before { transform: translateX(20px); }
input:disabled + .slider { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 480px) {
  .cookie-card { left: 12px; right: 12px; bottom: 12px; width: auto; }
}