/* Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.1.0
Text Domain: hello-elementor-child
*/

/* ==========================================================================
   1. RESET Y LIMPIEZA DEL TEMA PADRE
   ========================================================================== */

/* Ocultar el header y footer originales del tema */
#site-header,
.site-header,
#site-footer,
.site-footer,
.page-header,
.entry-title {
    display: none !important;
}

/* Asegurar visibilidad de los nuevos elementos y reset de box-sizing */
header.mi-header-pro,
footer.mi-footer-pro {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both;
}

/* ==========================================================================
   2. ESTILOS GLOBALES Y COLORES
   ========================================================================== */

a {
    color: #4da528;
    /* Verde césped */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3a7d1e;
}

.boton-presupuesto {
    background-color: #4da528 !important;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.boton-presupuesto:hover {
    background-color: #3a7d1e !important;
}

/* ==========================================================================
   3. CONTENEDORES (Evitan la deformación en el blog)
   ========================================================================== */

.container-header,
.container-footer,
.container-personalizado {
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   4. CABECERA (HEADER)
   ========================================================================== */

.mi-header-pro {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 9999;
}

.mi-header-pro .logo img,
.mi-header-pro .custom-logo {
    max-width: 150px !important;
    height: auto !important;
    display: block;
}

/* Menú de escritorio */
.menu-listado {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.menu-listado li {
    position: relative;
    padding: 15px 10px;
}

.menu-listado li a {
    color: #4da528;
    font-weight: 600;
}

/* Submenús (Desplegables) */
.menu-listado .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(10px);
    z-index: 999;
    list-style: none;
    padding: 10px 0;
    border-radius: 5px;
}

.menu-listado li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-listado .sub-menu li {
    padding: 0;
    width: 100%;
}

.menu-listado .sub-menu li a {
    padding: 10px 20px;
    display: block;
    color: #333 !important;
    font-size: 14px;
}

.menu-listado .sub-menu li a:hover {
    background-color: #f5f5f5;
    color: #4da528 !important;
}

.menu-item-has-children>a::after {
    content: ' ▾';
    font-size: 10px;
}

/* ==========================================================================
   5. RESPONSIVE Y MENÚ HAMBURGUESA
   ========================================================================== */

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    gap: 5px;
    padding: 10px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #4da528;
    transition: 0.3s;
}

@media (max-width: 991px) {
    .menu-toggle {
        display: flex;
        order: 2;
    }

    .header-cta {
        display: none;
        /* Ocultar botón en móvil para priorizar menú */
    }

    .mi-header-pro .logo img {
        max-width: 120px !important;
    }

    .navegacion-principal {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .navegacion-principal.is-active {
        max-height: 800px;
        /* Suficiente para el contenido */
        padding: 20px 0;
    }

    .menu-listado {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .menu-listado li {
        padding: 10px 0;
        width: 100%;
        text-align: center;
    }

    /* Submenús en móvil siempre visibles o apilados */
    .menu-listado .sub-menu {
        position: static !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        transform: none !important;
        background-color: #fafafa;
    }
}

/* ==========================================================================
   6. PIE DE PÁGINA (FOOTER)
   ========================================================================== */

.mi-footer-pro {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-info h3 {
    color: #4da528;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li a {
    color: #ffffff !important;
}

.footer-links ul li a:hover {
    color: #4da528 !important;
}

.footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: #888;
}

@media (max-width: 768px) {
    .container-footer {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

/* ==========================================================================
   7. AJUSTES ESPECÍFICOS PARA ENTRADAS (BLOG)
   ========================================================================== */

.single-post .mi-header-pro {
    border-bottom: 1px solid #eee;
}