/*
File Name: style.css
Theme Name: Sergesfin Child
Author: Grup Gestió
Version: 2.0
Author URI: https://grupgestio.net
Theme URI: https://sergesfin.com
Description: Tema corporatiu per a Sergesfin - Especialistes financers
Template: Divi
*/

/* ==========================================================================
   1. Flag icons in Secondary Menu / Top Bar (Clean Flags ONLY)
   ========================================================================== */
#et-secondary-nav {
    display: flex !important;
    align-items: center !important;
}

#et-secondary-nav .lang-item a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 4px !important;
    line-height: 1 !important;
}

#et-secondary-nav .lang-flag {
    width: 20px !important;
    height: 13px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease !important;
    opacity: 0.85;
}

#et-secondary-nav .lang-item:hover .lang-flag {
    opacity: 1 !important;
    transform: scale(1.18) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

#et-secondary-nav .lang-item.current-lang .lang-flag {
    opacity: 1 !important;
    box-shadow: 0 0 0 2px #ffffff, 0 1px 4px rgba(0, 0, 0, 0.4) !important;
    transform: scale(1.08) !important;
}

/* ==========================================================================
   2. Menú de navegación limpio y unificado (Contacto limpio)
   ========================================================================== */
#top-menu > li > a {
    font-weight: 500 !important;
    font-size: 15px !important;
    letter-spacing: 0.2px !important;
    transition: color 0.2s ease !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

#top-menu > li.current-menu-item > a,
#top-menu > li.current_page_item > a {
    border-bottom: none !important;
}

/* ==========================================================================
   3. Submenús Desplegables de Productos
   ========================================================================== */
#top-menu li.menu-item-has-children > a:after {
    font-family: 'ETmodules' !important;
    content: "3" !important;
    font-size: 11px !important;
    margin-left: 6px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    transition: transform 0.2s ease !important;
}

#top-menu li.menu-item-has-children:hover > a:after {
    transform: rotate(180deg) !important;
}

#top-menu .sub-menu {
    border-top: 3px solid #0c71c3 !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14) !important;
    border-radius: 0 0 8px 8px !important;
    padding: 8px 0 !important;
    min-width: 260px !important;
    background: #ffffff !important;
}

#top-menu .sub-menu li a {
    padding: 9px 20px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #333333 !important;
    transition: all 0.2s ease !important;
    display: block !important;
}

#top-menu .sub-menu li a:hover {
    background: #f0f7fc !important;
    color: #0c71c3 !important;
    padding-left: 25px !important;
}

/* ==========================================================================
   4. Mobile Top Bar & Flags
   ========================================================================== */
@media (max-width: 767px) {
    #top-header .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
    #et-info {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        float: none !important;
        margin-bottom: 4px !important;
    }
    #et-secondary-menu {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        float: none !important;
    }
    #et-secondary-nav {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
    }
    .et_mobile_menu .lang-item {
        display: none !important;
    }
}

/* ==========================================================================
   5. Ocultar cualquier badge o error residual de Google reCAPTCHA
   ========================================================================== */
.grecaptcha-badge,
iframe[src*="google.com/recaptcha"],
div[style*="grecaptcha"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}


/* ==========================================================================
   6. Responsividad del Header en resoluciones medianas (981px - 1250px)
   ========================================================================== */
@media (min-width: 981px) and (max-width: 1250px) {
    #logo {
        max-width: 250px !important;
        height: auto !important;
    }
    #top-menu > li > a {
        font-size: 13.5px !important;
        padding-right: 12px !important;
    }
}


/* ==========================================================================
   7. Centrado perfecto del boton de cabecera en portada
   ========================================================================== */
.et_pb_fullwidth_header .et_pb_header_button_wrapper {
    text-align: center !important;
}

.et_pb_fullwidth_header .et_pb_header_button_wrapper .et_pb_button {
    float: none !important;
    display: inline-block !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center !important;
}

/* ==========================================================================
   8. ESTILOS SIMULADOR HIPOTECARIO INTERACTIVO & FAQS (SERGESFIN)
   ========================================================================== */

/* --- Badge común --- */
.sfc-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* ==========================================================================
   SIMULADOR
   ========================================================================== */
.sfc-simulador-wrapper {
    max-width: 1140px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: inherit;
}

.sfc-simulador-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(12, 113, 195, 0.08);
    padding: 40px;
    box-sizing: border-box;
}

.sfc-simulador-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 35px auto;
}

.sfc-sim-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.3 !important;
}

.sfc-sim-subtitle {
    font-size: 16px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

.sfc-simulador-body {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.sfc-sim-controls {
    flex: 1.2;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    box-sizing: border-box;
}

.sfc-control-group {
    margin-bottom: 28px;
}

.sfc-control-group:last-child {
    margin-bottom: 0;
}

.sfc-control-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sfc-control-label-row label {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.sfc-input-number-wrap {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 6px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sfc-input-number-wrap input[type="number"] {
    border: none !important;
    background: transparent !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0c71c3 !important;
    width: 100px !important;
    text-align: right !important;
    padding: 0 6px 0 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.sfc-input-number-wrap input[type="number"]:focus {
    outline: none !important;
}

.sfc-currency {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

/* Sliders */
.sfc-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #cbd5e1;
    outline: none;
    transition: background 0.2s;
    cursor: pointer;
    margin: 10px 0;
    accent-color: #0c71c3;
}

.sfc-range-limits {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
}

/* Pills / Botones rápidos */
.sfc-btn-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sfc-pill, .sfc-pill-rate {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sfc-pill:hover, .sfc-pill-rate:hover {
    border-color: #0c71c3;
    color: #0c71c3;
}

.sfc-pill.active, .sfc-pill-rate.active {
    background: #0c71c3;
    color: #ffffff;
    border-color: #0c71c3;
    box-shadow: 0 2px 6px rgba(12, 113, 195, 0.25);
}

/* Columna Resultado */
.sfc-sim-result {
    flex: 1;
    width: 100%;
}

.sfc-result-card {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    color: #ffffff;
    border-radius: 16px;
    padding: 35px 30px;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

.sfc-result-tag {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.sfc-monthly-amount {
    font-size: 42px;
    font-weight: 800;
    color: #38bdf8;
    line-height: 1.1;
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.sfc-monthly-unit {
    font-size: 18px;
    font-weight: 500;
    color: #94a3b8;
}

.sfc-result-details {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px 0;
    margin-bottom: 22px;
}

.sfc-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.sfc-detail-row:last-child {
    margin-bottom: 0;
}

.sfc-detail-row strong {
    color: #ffffff;
    font-weight: 600;
}

/* Caja de Ahorro */
.sfc-savings-box {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sfc-savings-icon {
    font-size: 20px;
    line-height: 1;
}

.sfc-savings-text span {
    display: block;
    font-size: 12px;
    color: #a7f3d0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sfc-savings-text strong {
    display: block;
    font-size: 16px;
    color: #34d399;
    font-weight: 700;
    margin: 2px 0;
}

.sfc-savings-text small {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Botón CTA del simulador */
.sfc-sim-button {
    display: block;
    width: 100%;
    text-align: center;
    background: #0c71c3;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 15px;
    padding: 15px 20px;
    border-radius: 10px;
    transition: all 0.25s ease;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(12, 113, 195, 0.35);
}

.sfc-sim-button:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(12, 113, 195, 0.5);
}

.sfc-disclaimer {
    font-size: 11px !important;
    color: #64748b !important;
    text-align: center !important;
    margin: 14px 0 0 0 !important;
    line-height: 1.4 !important;
}

/* ==========================================================================
   FAQS (PREGUNTAS FRECUENTES)
   ========================================================================== */
.sfc-faqs-wrapper {
    max-width: 1140px;
    margin: 50px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.sfc-faqs-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 45px 40px;
    box-sizing: border-box;
}

.sfc-faqs-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.3 !important;
}

.sfc-faqs-subtitle {
    font-size: 16px !important;
    color: #64748b !important;
    margin: 0 0 30px 0 !important;
    line-height: 1.6 !important;
}

.sfc-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sfc-faq-item {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.sfc-faq-item.open {
    border-color: #0c71c3;
    box-shadow: 0 4px 15px rgba(12, 113, 195, 0.08);
}

.sfc-faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 18px 24px;
    font-size: 16.5px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-sizing: border-box;
    font-family: inherit;
    gap: 16px;
}

.sfc-faq-item.open .sfc-faq-question {
    color: #0c71c3;
}

.sfc-faq-icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.sfc-faq-icon::before, .sfc-faq-icon::after {
    content: '';
    position: absolute;
    background: #64748b;
    transition: transform 0.25s ease;
}

.sfc-faq-icon::before {
    top: 9px;
    left: 0;
    width: 20px;
    height: 2px;
}

.sfc-faq-icon::after {
    top: 0;
    left: 9px;
    width: 2px;
    height: 20px;
}

.sfc-faq-item.open .sfc-faq-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.sfc-faq-item.open .sfc-faq-icon::before {
    background: #0c71c3;
}

.sfc-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.25s ease;
    padding: 0 24px;
}

.sfc-faq-item.open .sfc-faq-answer {
    max-height: 300px;
    padding: 0 24px 22px 24px;
}

.sfc-faq-answer p {
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #475569 !important;
    margin: 0 !important;
}

.sfc-faqs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 14px;
}

.sfc-faqs-footer span {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
}

.sfc-faq-cta {
    font-size: 14px;
    font-weight: 700;
    color: #0c71c3 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   RESPONSIVE (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 900px) {
    .sfc-simulador-body {
        flex-direction: column;
    }
    .sfc-sim-controls, .sfc-sim-result {
        width: 100%;
        flex: auto;
    }
    .sfc-simulador-card, .sfc-faqs-container {
        padding: 25px 20px;
    }
    .sfc-monthly-amount {
        font-size: 34px;
    }
    .sfc-faqs-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   GOOGLE MAPS EN COLOR COMPLETO (PAGINA DE CONTACTO)
   ========================================================================== */
.et_pb_map,
.et_pb_map_container,
.et_pb_map iframe,
.gm-style,
.gm-style > div,
.gm-style canvas,
.et_pb_map .et_pb_map_container,
.et_pb_map img,
.et_pb_map div,
.et_pb_map canvas,
.et_pb_map_container img,
.et_pb_map_container .gm-style img,
.et_pb_map_container .gm-style > div > div > div > div > div > img,
.oficines .et_pb_map img,
.oficines .gm-style img,
.oficines .et_pb_map,
.oficines .gm-style {
    filter: none !important;
    -webkit-filter: none !important;
}
