/*
Theme Name: RicardoHS
Author: wekum
Author URI: https://wekum.cl/
Theme URI: https:/wekum.cl/
Tags: full-site-editing, editor-style, block-styles, block-patterns
Text Domain: ricardohs
Requires at least: 6.3
Requires PHP: 7.4
Tested up to: 6.3
Version: 1.0.0

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Styles intended only for the front.*/
html {
	scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}


/* ===== CONTACTO ===== */
.cm-contact-wrapper,
.cm-contact-wrapper * {
  box-sizing: border-box;
}

/* Elimina márgenes raros de CF7 / FSE */
.cm-contact-wrapper p,
.cm-contact-wrapper br {
  margin: 0 !important;
  padding: 0 !important;
}

/* Layout general del formulario: stack con poco espacio entre campos */
.cm-contact-form {
  display: flex;
  flex-direction: column;
  row-gap: 8px; /* separación MUY corta entre filas */
  max-width: 540px;
}

/* Fila con 2 columnas (Nombre / Teléfono) */
.cm-row {
  width: 100%;
}

.cm-row-2 {
  display: flex;
  column-gap: 8px; /* separación lateral corta */
}

.cm-row-2 .cm-field {
  flex: 1;
}

/* Campo genérico */
.cm-field .wpcf7-form-control {
  width: 100%;
  border: 1px solid #dfe3ef;      /* borde gris suave estilo TuSalud */
  background-color: #ffffff;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #1b2538;
  line-height: 1.4;
  border-radius: 0;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* Alto de inputs y select */
.cm-field input.wpcf7-form-control,
.cm-field select.wpcf7-form-control {
  height: 50px;
}

/* Textarea similar a maqueta */
.cm-field textarea.wpcf7-form-control {
  min-height: 150px;
  resize: vertical;
}

/* Placeholder estilo TuSalud / Cristian */
.cm-contact-wrapper ::placeholder {
  color: #a5aec3;
  opacity: 1;
}

/* Estado focus tipo TuSalud */
.cm-field .wpcf7-form-control:focus {
  border-color: #0047bb;
  box-shadow: 0 0 0 1px rgba(0,71,187,0.08);
}

/* SELECT con flecha personalizada */
.cm-field select.wpcf7-form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ea9c2' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px 6px;
}

/* Botón Enviar (mismo estilo de tu captura) */
.cm-row-submit .wpcf7-submit {
  display: inline-block;
  border: none;
  background-color: #0047bb;
  color: #ffffff;
  padding: 12px 40px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  margin-top: 8px;   /* pequeño aire respecto al textarea */
  transition: background-color .2s ease, transform .1s ease;
}

.cm-row-submit .wpcf7-submit:hover {
  background-color: #003a99;
  transform: translateY(-1px);
}

.cm-row-submit .wpcf7-submit:active {
  transform: translateY(0);
}

/* Mensajes de CF7 */
.cm-contact-wrapper .wpcf7-response-output {
  margin: 10px 0 0 0;
  border-radius: 0;
  font-size: 13px;
}

/* CONTENEDOR GENERAL */
.cm-contact-wrapper {
  max-width: 540px;
  width: 100%;
}

/* Elimina márgenes extra de CF7 / FSE */
.cm-contact-wrapper p,
.cm-contact-wrapper br {
  margin: 0 !important;
  padding: 0 !important;
}

/* CONTENEDOR DEL FORMULARIO */
.cm-contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px; /* separación vertical entre filas (muy parecido a la maqueta) */
}

/* FILAS */
.cm-row {
  width: 100%;
}

/* Primera fila: 2 columnas (Nombre / Teléfono) */
.cm-row-2 {
  display: flex;
  gap: 8px; /* separación horizontal mínima */
}

.cm-row-2 .cm-field {
  flex: 1;
}

/* CAMPOS GENERALES */
.cm-field .wpcf7-form-control {
  width: 100%;
  border: 1px solid #dfe3ef;
  background-color: #ffffff;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #1b2538;
  line-height: 1.4;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* Altura de inputs (igual entre todos) */
.cm-field input.wpcf7-form-control,
.cm-field select.wpcf7-form-control {
  height: 52px;
}

/* Textarea (como en la maqueta) */
.cm-field textarea.wpcf7-form-control {
  min-height: 160px;
  resize: vertical;
}

/* Placeholder gris suave */
.cm-contact-wrapper ::placeholder {
  color: #a5aec3;
}

/* Focus */
.cm-field .wpcf7-form-control:focus {
  border-color: #0047bb;
  box-shadow: 0 0 0 1px rgba(0,71,187,0.08);
}

/* SELECT con flecha */
.cm-field select.wpcf7-form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ea9c2' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px 6px;
}

/* BOTÓN ENVIAR */
.cm-row-submit .wpcf7-submit {
  display: inline-block;
  border: none;
  background-color: #0047bb;
  color: #ffffff;
  padding: 12px 40px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  margin-top: 8px;
  transition: background-color .2s ease, transform .1s ease;
}

.cm-row-submit .wpcf7-submit:hover {
  background-color: #003a99;
  transform: translateY(-1px);
}

.cm-row-submit .wpcf7-submit:active {
  transform: translateY(0);
}

/* Mensajes CF7 */
.cm-contact-wrapper .wpcf7-response-output {
  margin-top: 10px;
  border-radius: 0;
  font-size: 13px;
}
/* Mensaje rojo bajo los campos (teléfono, email, etc.) */
.cm-contact-wrapper span.wpcf7-not-valid-tip {
  font-size: 11px;          /* más pequeño */
  line-height: 1.4;
  color: #d9534f;           /* rojo más elegante */
  margin-top: 2px;
}

/* Mensaje general de CF7 (éxito / error) */
.cm-contact-wrapper .wpcf7-response-output {
  font-size: 12px;          /* más pequeño que el texto normal */
  line-height: 1.4;
  margin-top: 8px;
  border-radius: 0;
}

/* Quita márgenes fantasmas de CF7 / FSE */
.cm-contact-wrapper p,
.cm-contact-wrapper br {
  margin: 0 !important;
  padding: 0 !important;
}

/* Filas del formulario: casi sin aire entre una y otra */
.cm-contact-form {
  display: flex;
  flex-direction: column;
  row-gap: 4px;   /* <-- si los quieres aún más juntos, baja a 2px */
}

.cm-row {
  margin: 0;      /* sin margen extra */
}

/* Primera fila: 2 columnas (Nombre / Teléfono) */
.cm-row-2 {
  display: flex;
  column-gap: 8px;   /* separación horizontal entre los dos inputs */
}

.cm-row-2 .cm-field {
  flex: 1;
}
.cm-row-2 {
  display: flex;
  gap: 8px;
}

.cm-row-2 .cm-field {
  flex: 1;
}

.cm-field .wpcf7-form-control {
  width: 100%;
}

/* === CONTACTO CRISTIAN MONRROY === */

/* Eliminamos márgenes que meten separación extra */
.cm-contact-wrapper p,
.cm-contact-wrapper br {
  margin: 0 !important;
  padding: 0 !important;
}

/* Contenedor general del formulario */
.cm-contact-form {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  row-gap: 6px; /* espacio entre filas (muy compacto) */
}

/* Filas genéricas */
.cm-row {
  width: 100%;
  margin: 0;
}

/* PRIMERA FILA: Nombre y Teléfono uno al lado del otro */
.cm-row-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
}

/* Cada campo dentro de la primera fila ocupa 1 columna */
.cm-row-2 .cm-field {
  width: 100%;
}

/* Campo genérico CF7 */
.cm-field .wpcf7-form-control {
  width: 100% !important;
  border: 1px solid #dfe3ef;
  background-color: #ffffff;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #1b2538;
  line-height: 1.4;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* Inputs y select con la misma altura */
.cm-field input.wpcf7-form-control,
.cm-field select.wpcf7-form-control {
  height: 52px;
}

/* Textarea */
.cm-field textarea.wpcf7-form-control {
  min-height: 160px;
  resize: vertical;
}

/* Placeholder gris */
.cm-contact-wrapper ::placeholder {
  color: #a5aec3;
}

/* Focus */
.cm-field .wpcf7-form-control:focus {
  border-color: #0047bb;
  box-shadow: 0 0 0 1px rgba(0,71,187,0.08);
}

/* Select con flecha */
.cm-field select.wpcf7-form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ea9c2' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px 6px;
}

/* Botón Enviar */
.cm-row-submit .wpcf7-submit {
  display: inline-block;
  border: none;
  background-color: #0047bb;
  color: #ffffff;
  padding: 12px 40px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  margin-top: 6px;
  transition: background-color .2s ease, transform .1s ease;
}

.cm-row-submit .wpcf7-submit:hover {
  background-color: #003a99;
  transform: translateY(-1px);
}

/* Mensajes de error bajo los campos (ej. teléfono) */
.cm-contact-wrapper span.wpcf7-not-valid-tip {
  font-size: 11px;
  line-height: 1.4;
  color: #d9534f;
  margin-top: 2px;
}

/* Mensaje general (enviado / error) */
.cm-contact-wrapper .wpcf7-response-output {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
  border-radius: 0;
}

/* Fuerza que NOMBRE y TELÉFONO estén uno al lado del otro */

/* Caso normal: .cm-row-2 contiene directamente los .cm-field */
.cm-contact-wrapper .cm-row.cm-row-2 {
  display: flex !important;
  flex-wrap: nowrap !important;
  column-gap: 8px;
}

.cm-contact-wrapper .cm-row.cm-row-2 > .cm-field {
  flex: 1 1 0;
  display: block;
}

/* Caso extra: si CF7 metió un <p> dentro de .cm-row-2 */
.cm-contact-wrapper .cm-row.cm-row-2 > p {
  display: flex !important;
  flex-wrap: nowrap !important;
  column-gap: 8px;
  margin: 0 !important;
}

.cm-contact-wrapper .cm-row.cm-row-2 > p > .cm-field {
  flex: 1 1 0;
  display: block;
}

/* Aseguramos que los inputs ocupen todo el ancho del espacio que les toca */
.cm-contact-wrapper .cm-row.cm-row-2 .cm-field .wpcf7-form-control-wrap,
.cm-contact-wrapper .cm-row.cm-row-2 .cm-field input {
  width: 100% !important;
}

/* ===== ZOOM SUAVE EN BLOQUES FONDO ===== */
.grid-rubros .wp-block-cover {
  overflow: hidden; /* clave */
}

/* Imagen de fondo */
.grid-rubros .wp-block-cover__image-background {
  transition: transform .45s ease;
}

/* Hover: zoom sutil */
.grid-rubros .wp-block-cover:hover .wp-block-cover__image-background {
  transform: scale(1.06);
}
/* ===== MENÚ FSE (wp-block-navigation): sin subrayado + activo fijo ===== */

/* Quita subrayado por defecto */
.wp-block-navigation a,
.wp-block-navigation-item__content {
  text-decoration: none !important;
  position: relative;
  padding-bottom: 6px; /* espacio para la línea */
}

/* Línea (por defecto oculta) */
.wp-block-navigation a::after,
.wp-block-navigation-item__content::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:0;
  height:2px;
  background:#004AAB; /* azul corporativo */
  transition: width .25s ease;
}

/* Hover / focus */
.wp-block-navigation a:hover::after,
.wp-block-navigation a:focus-visible::after,
.wp-block-navigation-item__content:hover::after,
.wp-block-navigation-item__content:focus-visible::after{
  width:100%;
}

/* ACTIVO (FSE): aria-current */
.wp-block-navigation a[aria-current="page"]::after,
.wp-block-navigation a[aria-current="true"]::after{
  width:100%;
  height:3px;
}

/* ACTIVO (fallback clásico WP) */
.wp-block-navigation .current-menu-item > a::after,
.wp-block-navigation .current_page_item > a::after,
.wp-block-navigation .current-menu-ancestor > a::after{
  width:100%;
  height:3px;
}

/* ===== SIDEBAR STICKY ===== */
.sidebar-sticky{
  position: sticky;
  top: 110px;              /* ajusta según alto del header */
  display: grid;
  gap: 22px;
}

/* Card base */
.sidebar-card{
  border-radius: 0;
  overflow: hidden;
}

/* ===== MENÚ AZUL ===== */
.sidebar-menu{
  background:#004AAB;
  padding: 26px 22px;
  color:#fff;
}

.sidebar-menu h2,
.sidebar-menu h3{
  color:#fff !important;
  margin:0 0 14px;
}

.sidebar-menu a{
  display:block;
  padding: 9px 10px;
  color:#fff !important;
  text-decoration:none !important;
  transition: background-color .2s ease, color .2s ease;
}

/* Hover items */
.sidebar-menu a:hover{
  background:#E4CCB2;
  color:#000D51 !important;
}

/* Activo (por aria-current) */
.sidebar-menu a[aria-current="page"],
.sidebar-menu a[aria-current="true"]{
  background:#E4CCB2;
  color:#000D51 !important;
}

/* ===== FORM BEIGE ===== */
.sidebar-form{
  background:#E4CCB2;
  padding: 26px 22px;
  color:#000D51;
}

.sidebar-form h2,
.sidebar-form h3{
  color:#000D51 !important;
  margin:0 0 14px;
}

/* Inputs (genérico) */
.sidebar-form input,
.sidebar-form textarea,
.sidebar-form select{
  width:100%;
  border:none;
  border-bottom:1px solid rgba(0,13,81,.45);
  background:transparent;
  padding:10px 6px;
  outline:none;
}

/* Botón form (ajusta selector si usas otro plugin) */
.sidebar-form button,
.sidebar-form input[type="submit"]{
  background:#004AAB;
  color:#fff;
  border:none;
  padding:10px 16px;
  cursor:pointer;
}

/* ===== SIDEBAR SERVICIOS ===== */

.sidebar-menu a{
  display:block;
  padding: 9px 10px;
  color:#ffffff;
  text-decoration:none !important;
  transition: background-color .2s ease, color .2s ease;
}

/* Hover */
.sidebar-menu a:hover{
  background:#E4CCB2;
  color:#000D51 !important;
}

/* ACTIVO (manual, fijo) */
.sidebar-menu a.is-active{
  background:#E4CCB2;
  color:#000D51 !important;
  font-weight:500;
}

/* ===== SIDEBAR SERVICIOS ===== */

.sidebar-menu{
  padding: 22px 20px; /* antes más grande */
}

/* Título "Servicios" */
.sidebar-menu h2,
.sidebar-menu h3{
  margin: 0 0 12px;
}

/* Links */
.sidebar-menu a{
  display:block;
  padding: 7px 10px;        /* ↓ reduce alto de cada item */
  margin: 2px 0;            /* ↓ elimina separación excesiva */
  line-height: 1.3;         /* más compacto */
  color:#ffffff;
  text-decoration:none !important;
  transition: background-color .2s ease, color .2s ease;
}
/* ACTIVO (manual): funciona si is-active está en <a> o en el contenedor */
.sidebar-menu a.is-active,
.sidebar-menu .is-active > a,
.sidebar-menu .is-active > .wp-block-navigation-item__content,
.sidebar-menu .is-active .wp-block-navigation-item__content{
  background:#E4CCB2 !important;
  color:#000D51 !important;
  font-weight:500;
  display:block;
}

/* Mensaje de éxito formulario contacto */
.wpcf7-response-output {
  font-size: 14px;      /* ← aquí controlas el tamaño */
  line-height: 1.4;
  padding: 12px 16px;
  margin-top: 20px;
  max-width: 420px;     /* evita que se vea gigante */
}

/* ===== Cards servicios: hover tipo Elementor ===== */
.card-servicio{
  transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
  will-change: transform, box-shadow;
}

/* Hover / focus (mouse + teclado) */
.card-servicio:hover,
.card-servicio:focus-within{
  transform: translateY(-8px);
  box-shadow: 0 28px 60px rgba(20, 20, 20, 0.10);
}

/* Opcional: si quieres un “borde” sutil al elevar */
.card-servicio{
  border: 1px solid rgba(0,0,0,0.06);
}
.card-servicio:hover,
.card-servicio:focus-within{
  border-color: rgba(0,0,0,0.10);
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce){
  .card-servicio{
    transition: none !important;
  }
}
