/*
 Theme Name:   Logitic Child
 Theme URI:    https://demo.rstheme.com/wordpress/logitic/
 Description:  Logitic Child
 Author:       RSTheme
 Author URI:   http://rstheme.com
 Template:     logitic
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Ajustes generales de estilos */
.wpcf7-form-control-wrap {
  color: black !important;
}
.elementor-kit-9152 {
  --e-global-color-primary: #0034ad !important;
}
.elementor-21 .elementor-element.elementor-element-5402ca1 .rs-skill-bar .skillbar .skill-bar-percent {
  color: #0034ad !important;
}
.elementor-widget .sub-text svg path {
  fill: #0034ad !important;
}
.elementor-2406 .elementor-element.elementor-element-b0cf021 .rs-service-flex.style2 .grid-item.active .service-inner .title,
.elementor-2406 .elementor-element.elementor-element-b0cf021 .rs-service-flex.style2 .grid-item.active .service-inner .title i {
  color: white !important;
}
.elementor-2406 .elementor-element.elementor-element-95e3d06 .prelements-heading .title-inner .sub-text {
  color: white !important;
}
.elementor-2406 .elementor-element.elementor-element-b0cf021 .rs-service-flex.style2 .grid-item.active .service-inner .title svg path {
  fill: #3d5ba1 !important;
}

/* Ocultar controles de Leaflet en dispositivos táctiles */
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
  display: none !important;
}

/* ==================================================
   1) Botón “Acceso para clientes” en el HEADER fijo
   ================================================== */
header#rs-header .rs-contact-box .address-item.boxstyle1 {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.5em 1em !important;
  background-color: #0056b3 !important;
  color: #ffffff !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: background-color 0.2s ease !important;
  margin-top: 0.5em !important;
  padding-left: 0 !important;
}
header#rs-header .rs-contact-box .address-item.boxstyle1:hover {
  background-color: #004494 !important;
}
header#rs-header .rs-contact-box .address-item.boxstyle1 .address-icon img {
  width: 1.5em !important;
  height: auto !important;
  margin-right: 0.5em !important;
  padding-bottom: 5px !important;
}
header#rs-header .rs-contact-box .address-item.boxstyle1 .address-text {
  display: inline-block !important;
  font-size: 0.9em !important;
  line-height: 1 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
}
header#rs-header .rs-contact-box .address-item.boxstyle1::before {
  display: none !important;
  content: none !important;
}
#rs-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
body {
  padding-top: 80px !important;
}


.address-item.boxstyle1:hover .des {
    color: #ffffff !important;
}

.elementor-2612 .elementor-element.elementor-element-b829fd3 .wpcf7-submit {
    padding: 14px 40px 14px 40px !important; 
}


/* ==================================================
   2) “Acceso para clientes” en MENÚ PRINCIPAL y MÓVIL
      solo por URL fija en el NAV (sin IDs ni clases variables)
   ================================================== */

/* (a) En escritorio y tablet ≥1025px: ocultar SOLO el enlace dentro del nav/menu */
@media (min-width: 1025px) {
  nav a[href="https://clientes.hayalogistica.es/mclient/"] {
    display: none !important;
  }
}

/* (b) En móvil y tablet ≤1024px:
      - ocultar el botón fijo del header
      - mostrar el enlace en el menú (nav) con estilo de botón */
@media (max-width: 1024px) {
  /* ocultar botón fijo */
  header#rs-header .rs-contact-box {
    display: none !important;
  }

  /* mostrar enlace en menú móvil/tablet */
  nav a[href="https://clientes.hayalogistica.es/mclient/"] {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.5em 1em !important;
    background-color: #0056b3 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    transition: background-color 0.2s ease !important;
    margin: 0.5em 0 0 0 !important;
  }
  nav a[href="https://clientes.hayalogistica.es/mclient/"]::before {
    content: url('/wp-content/uploads/2024/11/descarga-12.png') !important;
    display: inline-block !important;
    margin-right: 0.5em !important;
    vertical-align: middle !important;
    height: auto !important;
	padding-top:3px !important;
  }
  nav a[href="https://clientes.hayalogistica.es/mclient/"]:hover {
    background-color: #004494 !important;
    color: #ffffff !important;
  }
}

/* ==================================================
   3) Otros estilos del tema hijo
   ================================================== */
.rs-service-flex.style1 .row .grid-item .service-inner .title a:hover {
  color: #66A3FF !important;
}

@media screen and (max-width: 480px) {
  .wpcf7 input[type="file"] {
    display: block;
    width: 100%;
    white-space: normal;
    word-break: break-word;
  }
}

@media (max-width: 1366px) {
  .elementor-17 .elementor-element.elementor-element-24bb899 .hfe-site-logo .hfe-site-logo-container img {
    height: 73px !important;
    width: auto !important;
  }
}

/* MAPA MODAL */
#delegaciones-modal.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 1.5em;
  box-sizing: border-box;
}
#delegaciones-modal .modal-content {
  background: linear-gradient(145deg, #e7f0fb 0%, #ffffff 100%);
  padding: 2.2em 2.8em;
  border-radius: 18px;
  width: 95%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  font-family: 'Sarabun', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1f2937;
  border: 2px solid #cce0f7;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#delegaciones-modal .modal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #0f172a;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #93c5fd;
  padding-bottom: 0.5rem;
}

#delegaciones-modal .close-modal {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.8rem;
  cursor: pointer;
  color: #60a5fa;
  transition: color 0.2s ease, transform 0.2s ease;
}

#delegaciones-modal .close-modal:hover {
  color: #1d4ed8;
  transform: rotate(90deg);
}

#delegaciones-modal .modal-content p {
  margin-bottom: 1rem;
  color: #334155;
}

#delegaciones-modal .modal-content a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

#delegaciones-modal .modal-content a:hover {
  border-color: #2563eb;
}

/* LISTA */
#delegaciones-list h4 {
  font-weight: bold;
  margin: 1em 0 0.5em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.2em;
}

#delegaciones-list .sede-central a {
  font-weight: bold;
  color: #0073e6;
}

#delegaciones-list div {
  margin-bottom: 0.7em;
}

#delegaciones-list a {
  text-decoration: none;
  color: #1a3a6d;
  font-weight: 500;
  cursor: pointer;
}

#delegaciones-list a:hover {
  text-decoration: underline;
}

/* Evitar que el cuerpo intercepte el scroll del sidebar */
html, body {
  overscroll-behavior: none;
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ============ MAPA + SIDEBAR ADAPTATIVO ============ */

.delegaciones-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  margin-bottom: 2em;
  max-width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
}

#delegaciones-sidebar {
  width: 320px;
  max-width: 100%;
  max-height: 700px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #ccc;
  padding: 1.5em;
  box-sizing: border-box;
}

#delegaciones-map-container {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 700px;
  max-height: 80vh;
  box-sizing: border-box;
}

#delegaciones-map {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

/* ======= RESPONSIVE BREAKPOINTS ======= */

/* Pantallas hasta 1366px */
@media (max-width: 1366px) {
  #delegaciones-sidebar {
    width: 280px;
  }

  #delegaciones-map-container {
    min-height: 600px;
  }

  #delegaciones-map {
    height: 100%;
  }
}

/* Tablets verticales y portátiles pequeños (768px a 1024px) */
@media (max-width: 1024px) {
  .delegaciones-wrapper {
    flex-direction: column;
  }

  #delegaciones-sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    margin-bottom: 1em;
  }

  #delegaciones-map-container {
    width: 100%;
    height: 600px;
  }

  #delegaciones-map {
    height: 100%;
  }
}

/* Móviles grandes (481px a 767px) */
@media (max-width: 767px) {
  #delegaciones-map-container {
    height: 500px;
  }

  #delegaciones-map {
    height: 100%;
  }
}

/* Móviles pequeños (≤ 480px) */
@media (max-width: 480px) {
  #delegaciones-sidebar {
    padding: 0.8em;
  }

  #delegaciones-map-container {
    height: 400px;
  }

  #delegaciones-map {
    height: 100%;
  }
}

.wpcf7 select {
    width: 100%;
    max-width: 430px;
    height: 68px;
}



