/*
Theme Name: OPG Terra - Media Partner
Theme URI: https://mediapartner.es
Description: Plantilla generada por Media Partner para OPG Terra. Basada en DIVI
Author: Roberto Castiñeira (castineira@mediapartner.es)
Author URI: https://mediapartner.es
Template: Divi
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: opg-terra-media-partner
Domain Path: /languages
*/

/* ==========================================================================
   Global Styles
   General resets, box model, body defaults, links, and utility classes.
   ========================================================================== */
/* Add your global styles below */

/* Glassmorfismo */
.efecto-glass {
    -webkit-backdrop-filter: blur(5px) saturate(150%);
    backdrop-filter: blur(5px) saturate(150%);
    border: 1px solid rgb(255 255 255 / 18%);
    box-shadow:
        0 8px 32px rgb(0 0 0 / 12%),
        inset 0 1px 0 rgb(255 255 255 / 12%);
    isolation: isolate;
}




/* ==========================================================================
   Typography
   Headings (h1-h6), paragraphs, blockquotes, lists, and font overrides.
   ========================================================================== */
/* Add your typography styles below */


/* ==========================================================================
   Header & Navigation
   Main header, logo, primary menu, mobile menu, top header bar.
   ========================================================================== */
/* Add your header styles below */

/* Ancho del submenu ancho para desktop*/
.submenu-ancho > ul.sub-menu { width: 380px !important;}
.submenu-ancho > ul.sub-menu > li { width: 100% !important; }
.submenu-ancho > ul.sub-menu > li > a { width: 100% !important;}


/* ==========================================================
   MENÚ PRINCIPAL - SUBMENÚS EN MÓVIL
   ========================================================== */

@media only screen and (max-width: 980px) {

    /* El menú móvil nunca puede superar el ancho disponible */
    .et_mobile_menu {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Elementos del menú y submenús */
    .et_mobile_menu li,
    .et_mobile_menu li ul,
    .et_mobile_menu li ul.sub-menu,
    .et_mobile_menu li li {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 
     * MUY IMPORTANTE:
     * permite que los nombres largos ocupen varias líneas
     */
    .et_mobile_menu li a,
    .et_mobile_menu li li a,
    .et_mobile_menu .sub-menu li a {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-wrap: break-word !important;
        word-break: normal !important;

        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;

        line-height: 1.35em !important;
    }

    /* Primer nivel */
    .et_mobile_menu > li > a {
        padding-left: 5% !important;
        padding-right: 5% !important;
    }

    /* Segundo nivel: Servicios */
    .et_mobile_menu .sub-menu li a {
        padding-left: 9% !important;
        padding-right: 8% !important;
    }

    /* Tercer nivel, si existiese */
    .et_mobile_menu .sub-menu .sub-menu li a {
        padding-left: 13% !important;
        padding-right: 8% !important;
    }

    /* Evita que UL internos introduzcan desplazamientos laterales */
    .et_mobile_menu ul.sub-menu {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

}






/* icono de linkedin en cabecera */
.et-social-linkedin a.icon:before { content: '\e09d'; }


/* Alinear todo el contenido de la barra secundaria a la derecha */
@media (min-width: 981px) {
    #top-header .container { text-align: right; }
    #et-info,  #et-secondary-menu {  float: none; display: inline-block;  }
    #et-info { margin-right: 15px; }
}


/* DIVI - Ocultar barra secundaria al hacer scroll y dejar el menú principal sticky arriba */
@media (min-width: 981px) {
    /* Animación de la barra secundaria */
    #top-header { overflow: hidden; max-height: 100px; opacity: 1;
		transition: max-height 0.3s ease, opacity 0.2s ease;
	}
    /* Divi añade .et-fixed-header al hacer scroll */
    #top-header.et-fixed-header { max-height: 0; opacity: 0; pointer-events: none; }
    /* Movimiento suave del menú principal */
    #main-header { transition: top 0.3s ease; }
    /* Al quedar fijo, eliminar el espacio que ocupaba la barra secundaria */
    #main-header.et-fixed-header { top: 0 !important; }
    /* Si estás logueado en WordPress,  respetar la barra de administración */
    .admin-bar #main-header.et-fixed-header { top: 32px !important; }
}



/* =====================================================
   DIVI - Barra secundaria en tablet/móvil 
   Mostrar teléfono, email y redes sociales
   ===================================================== */
@media (max-width: 980px) {

    #top-header .container {text-align: right;}
    #et-info { float: none; display: inline-block; }

    #et-secondary-menu {
        float: none; 
        display: inline-block !important; 
        margin-top: 0 !important;
    }

    #et-secondary-menu .et_duplicate_social_icons {
        display: inline-block !important;
        float: none;
        vertical-align: middle;
        margin-left: 10px;
    }
}



/* ==========================================================================
   Footer
   Footer widgets, footer menu, bottom bar, copyright area.
   ========================================================================== */
/* Add your footer styles below */


/* ==========================================================================
   Blog & Archive
   Blog listing, archive pages, category pages, search results, pagination.
   ========================================================================== */
/* Add your blog styles below */


/* ==========================================================================
   Single Post
   Post title, meta, featured image, content area, author box, related posts.
   ========================================================================== */
/* Add your single post styles below */


/* ==========================================================================
   Single Page
   Default page template, full-width page, landing pages.
   ========================================================================== */
/* Add your single page styles below */


/* ==========================================================================
   Sidebar & Widgets
   Widget areas, widget titles, default WordPress widgets, custom widgets.
   ========================================================================== */
/* Add your sidebar styles below */


/* ==========================================================================
   Forms & Inputs
   Contact forms, input fields, textareas, selects, validation states.
   ========================================================================== */
/* Add your form styles below */


/* ==========================================================================
   Buttons & CTAs
   Default buttons, Divi buttons, call-to-action elements, hover states.
   ========================================================================== */
/* Add your button styles below */


/* ==========================================================================
   Responsive / Media Queries
   Breakpoint-specific overrides for tablet and mobile.
   ========================================================================== */

/* Tablet (max-width: 980px) */
@media only screen and (max-width: 980px) {

}

/* Mobile (max-width: 767px) */
@media only screen and (max-width: 767px) {

}

