/*
Theme Name:   Astra Child
Theme URI:    https://wpastra.com/
Description:  Tema hijo personalizado para la web de專Grup ADA.
Author:       Desarrollador Senior
Author URI:   https://adagrup.es
Template:     astra
Version:      1.0.0
Text Domain:  astra-child
*/

#masthead {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: rgba(255,255,255,0.85); /* semiopaco desde el inicio */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#masthead .main-header-menu a {
    color: #134073; /* color normal */
}

#masthead .main-header-menu a:hover {
    color: #F28C4F; /* color al pasar el ratón */
}

#masthead .main-header-menu .current-menu-item > a {
    color: #134073; /* color de la página activa */
}

#masthead .main-header-menu .current-menu-item > a:hover {
    color: #F28C4F; /* hover de la página activa */
}

[id] {
  scroll-margin-top: 100px; /* Ajusta según la altura de tu cabecera */
}

/* 1. Marco de referencia total */
.columna-clicable {
    position: relative !important;
    overflow: hidden !important; /* Importante para que el enlace no se salga de las esquinas redondeadas */
}

/* 2. El enlace "todopoderoso" */
.enlace-fantasma a.elementor-button {
    position: absolute !important;
    /* Forzamos el enlace a estirarse más allá del padding del contenedor */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    
    /* Z-index altísimo para que esté por encima de iconos y textos */
    z-index: 9999 !important;
    
    /* Lo hacemos invisible */
    background: transparent !important;
    color: transparent !important;
    border: none !important;
}

/* 3. El truco maestro: Forzamos a los padres del botón a ser "transparentes" para el posicionamiento */
.columna-clicable .elementor-widget-wrap,
.columna-clicable .elementor-widget-container,
.columna-clicable .elementor-button-wrapper,
.enlace-fantasma {
    position: static !important;
}

/* 4. Mantenemos la altura igualada y el cursor de mano */
.columna-clicable {
    cursor: pointer;
    display: flex !important;
    flex-direction: column !important;
}

/* Lo dejamos en su sitio pero invisible */
.ht-ctc-chat {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.8s ease-in-out !important; /* Aparecerá con un fundido suave */
}

/* 1. Posicionamos cada botón en un sitio distinto para que no se solapen */

/* Botón de WhatsApp (Click to Chat) - Lo dejamos abajo */
.ht-ctc-chat {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    /* Forzamos que el móvil lo mantenga siempre visible */
    -webkit-transform: translateZ(0);
    will-change: transform;
}

/* 1. Posicionamiento estable y sin pisarse */
.ht-ctc-chat {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    -webkit-transform: translate3d(0,0,0) !important;
    transform: translate3d(0,0,0) !important;
}

#ast-scroll-top, .ast-scroll-top, .elementor-back-to-top {
    position: fixed !important;
    bottom: 90px !important; /* Encima del de WhatsApp */
    right: 25px !important;
    z-index: 999998 !important;
    -webkit-transform: translate3d(0,0,0) !important;
    transform: translate3d(0,0,0) !important;
}

/* 2. EL TRUCO MAESTRO: Forzamos a las animaciones a quedarse en la capa de abajo */
/* Targeteamos la clase que usa Elementor para sus animaciones de entrada */
.animated {
    z-index: 1 !important; /* Obliga a la sección que está apareciendo a no saltar sobre los botones */
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

/* 3. Evitamos que el cuerpo de la web cree capas extrañas en móvil */
html, body {
    /* Si tenías algún perspective o transform aquí, lo quitamos */
    overflow-x: hidden; 
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   FORMULARIO GRUP ADA: ANCHO TOTAL + ESPACIOS MÍNIMOS
   ============================================================ */

/* 1. Contenedor: Mantenemos el ancho y el estilo limpio */
.srfm-form-container {
    width: 100% !important;
    display: block !important;
    background: #ffffff !important;
    padding: 20px !important; /* Un poco menos de padding interno */
    border-radius: 12px !important;
    border: 1px solid #eef2f6 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}

/* 2. BLOQUES: Aquí es donde quitamos el espacio gordo entre campos */
.srfm-block {
    margin-bottom: 10px !important; /* Antes estaba en 15px o más */
    padding: 0 !important;
    width: 100% !important;
}

/* 3. ETIQUETAS: Casi pegadas al cuadro de texto */
.srfm-block .srfm-block-label {
    margin-bottom: 2px !important; /* Distancia mínima etiqueta -> input */
    padding-bottom: 0 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #334155 !important;
    text-transform: uppercase !important;
}

/* 4. CAMPOS: Estilizados pero sin márgenes que los empujen */
.srfm-input-common, 
.srfm-block input, 
.srfm-block textarea, 
.srfm-block select {
    width: 100% !important;
    padding: 10px 12px !important; /* Un pelín más compactos */
    margin: 0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
}

/* 5. ELIMINAR EL HUECO DE ERROR: Esto es lo que más espacio quita */
.srfm-field-error, 
.srfm-field-help,
.srfm-field-feedback {
    display: none !important; /* Oculta el espacio reservado para avisos */
}

/* 6. BOTÓN: Azul ADA y sin animaciones raras */
button.srfm-submit-btn {
    animation: none !important;
    background-color: #0056b3 !important;
    color: #ffffff !important;
    width: 100% !important;
    padding: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    border: none !important;
    margin-top: 10px !important; /* Separación justa con el último campo */
}

/* Estilo del texto animado */
.titulo-animado {
    color: #f28c4f !important;
display: block !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 8vw !important;
    box-sizing: border-box !important;
@media (max-width: 1024px) {
    .titulo-animado {
        margin-left: 4vw !important; 
    }
}
@media (max-width: 767px) {
    .titulo-animado {
        margin-left: 0 !important; 
        text-align: center !important;
    }
}

#texto-variable {
    color: #ffffff; 
}

/* El cursor que parpadea */
.cursor {
    font-weight: 400;
    color: #ffffff;
    animation: parpadeo 0.8s infinite;
}

@keyframes parpadeo {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 1. TAMAÑO PARA ESCRITORIO (Pantallas grandes) */
.titulo-animado {
    font-size: 32px !important;
    line-height: 1.2 !important;
    margin-bottom: 20px !important;
    display: block;
}

/* 2. TAMAÑO PARA TABLETS (Opcional) */
@media (max-width: 1024px) {
    .titulo-animado {
        font-size: 22px !important; 
    }
}

/* 3. TAMAÑO PARA MÓVIL (Pantallas de menos de 767px) */
@media (max-width: 767px) {
    .titulo-animado {
        font-size: 12px !important; 
        line-height: 1.4 !important; 
        text-align: left !important; 
    }
    
    #texto-variable {
        display: inline-block; /* Ayuda a que la animación fluya mejor en pantallas estrechas */
    }
}
	
/* 