/*
 * Theme Name:  Revision Child
 * Theme URI:   https://revision.codesupply.co/
 * Description: Revision Child Theme
 * Author:      Code Supply Co.
 * Author URI:  https://codesupply.co/
 * Template:    revision
 * Version:     1.0.0
 */

/* Copy any classes from parent theme here. They will override the parent's version. */

.entry-content {
	padding: 20px 0;
}

/***********************************
 Eliminamos la imagen destacada de ciertas paginas
***********************************/

body.page-id-715 .cs-sidebar-disabled .entry-content,
body.page-id-126 .cs-sidebar-disabled .entry-content,
body.page-id-652 .cs-sidebar-disabled .entry-content,
body.page-id-526 .cs-sidebar-disabled .entry-content {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0;
  margin-right: 0;
}

body.page-id-715 .cs-entry__outer.cs-entry__overlay,
body.page-id-126 .cs-entry__outer.cs-entry__overlay,
body.page-id-652 .cs-entry__outer.cs-entry__overlay,
body.page-id-526 .cs-entry__outer.cs-entry__overlay {
  display: none !important;
}


/***********************************
 Eliminamos el padding de las filas 
 con fondo de imagen o color
***********************************/

.et_pb_section {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.et_pb_with_background .et_pb_row {
    width: 100% !important;
}

/***********************************
 Color Boton de Whats
***********************************/

/* Estado normal */
.cs-button.cs-header__custom-button,
.cs-button.cs-header__custom-button::before {
  background: #1DAA61 !important;   /* verde WhatsApp */
  color: #ffffff !important;        /* texto/ícono blancos */
  border-color: #1DAA61 !important; /* por si hay borde */
}

/* Hover */
.cs-button.cs-header__custom-button:hover,
.cs-button.cs-header__custom-button:hover::before {
  background: #50BA80 !important;   /* verde oscuro en hover */
  color: #ffffff !important;
  border-color: #50BA80 !important;
}

/* Asegura que el ícono también herede el color */
.cs-button.cs-header__custom-button i,
.cs-button.cs-header__custom-button .fa-brands {
  color: inherit !important;
}

/************************************************************
 Ritmo vertical consistente para secciones de contenido Divi
 Usar agregando la clase: spacing-theme a la Sección o Fila
*************************************************************/
.spacing-theme {
  /* Ajusta estas dos variables para “afinar” todo el bloque */
  --rhythm: clamp(0.8rem, 0.6rem + 0.9vw, 1.4rem); /* espacio base */
  --lh: 1.65;                                      /* line-height */
}

/* 1) Neutraliza márgenes heredados de Divi dentro del scope */
.spacing-theme :is(h1,h2,h3,h4,h5,h6,p) {
  margin-block: 0 !important;
}

/* 2) Tipografía base del párrafo */
.spacing-theme p {
  line-height: var(--lh);
  margin-block: var(--rhythm) !important; /* espacio arriba y abajo */
}

/* 3) Encabezados con jerarquía clara (arriba / abajo) */
.spacing-theme h1 { line-height: 1.20; margin-block: calc(var(--rhythm)*2) calc(var(--rhythm)*0.75) !important; }
.spacing-theme h2 { line-height: 1.22; margin-block: calc(var(--rhythm)*1.75) calc(var(--rhythm)*0.65) !important; }
.spacing-theme h3 { line-height: 1.25; margin-block: calc(var(--rhythm)*1.5)  calc(var(--rhythm)*0.55) !important; }
.spacing-theme h4 { line-height: 1.28; margin-block: calc(var(--rhythm)*1.25) calc(var(--rhythm)*0.5)  !important; }
.spacing-theme h5 { line-height: 1.3;  margin-block: calc(var(--rhythm)*1.1)  calc(var(--rhythm)*0.45) !important; }
.spacing-theme h6 { line-height: 1.35; margin-block: var(--rhythm)            calc(var(--rhythm)*0.4)  !important; }

/* 4) Reduce espacio entre título y primer párrafo inmediato */
.spacing-theme :is(h1,h2,h3,h4,h5,h6) + p {
  margin-top: calc(var(--rhythm)*0.25) !important; /* queda compacto y legible */
}

/* 5) Ajustes de listas y elementos comunes */
.spacing-theme :is(ul,ol) {
  margin-block: var(--rhythm) !important;
  padding-inline-start: 1.25em;
  line-height: var(--lh);
}
.spacing-theme li + li { margin-top: calc(var(--rhythm)*0.35); }

.spacing-theme figure,
.spacing-theme blockquote,
.spacing-theme pre {
  margin-block: calc(var(--rhythm)*1.25) !important;
}

/* 6) Evita “doble espacio” cuando Divi mete <p> de cierre */
.spacing-theme .et_pb_text_inner p:last-child,
.spacing-theme .et_pb_text p:last-child { margin-bottom: 0 !important; }

/* 7) Opcional: toques finos en móvil */
@media (max-width: 767px) {
  .spacing-theme { --rhythm: clamp(0.9rem, 0.7rem + 1.5vw, 1.6rem); }
}
