/* ===== VARIABLES Y ESTILOS GLOBALES ===== */
:root {
    --azul-marino: #0A2240;
    --dorado-ocre: #C0A062;
    --blanco-roto: #F7F7F7;
    --gris-oscuro: #333333;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
    text-decoration: none;
    list-style: none;
    color: var(--gris-oscuro);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    background-color: #fff;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    color: var(--azul-marino);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.logo, .logo-footer {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo .logo-main, .logo-footer .logo-main {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--azul-marino);
}

.logo .logo-sub, .logo-footer .logo-sub {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 700;
    color: #777;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

.navbar {
    display: flex;
    align-items: center;
}

.navbar a {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--azul-marino);
    position: relative;
    transition: color 0.3s;
}

.header-right {
    display: flex;
    align-items: center;
}

.call-button {
    background-color: var(--dorado-ocre);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s ease;
    margin-right: 1.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.call-button:hover {
    background-color: #a5884e;
}

#menu-btn {
    font-size: 1.8rem;
    color: var(--azul-marino);
    cursor: pointer;
    display: none;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--azul-marino);
    font-family: var(--font-sans);
    padding: 1rem 0;
}
.dropbtn i {
    font-size: 0.8rem;
    margin-left: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 240px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #eee;
}

.dropdown-content a {
    color: var(--azul-marino);
    padding: 12px 16px;
    display: block;
    margin: 0;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--blanco-roto);
    color: var(--dorado-ocre);
}

.dropdown:hover .dropdown-content {
    display: block;
}


/* ===== SECCIÓN HERO (HOME) ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 7%;
    position: relative;
    background: var(--azul-marino);
    overflow: hidden;
}

.hero-content { z-index: 2; max-width: 800px; }
.hero h1 { font-family: var(--font-serif); font-size: 3.5rem; color: #fff; line-height: 1.2; }
.hero p { font-size: 1.2rem; color: rgba(255, 255, 255, 0.9); margin: 1.5rem 0 2.5rem; }
.chat-starter-wrapper { margin-top: 3rem; }
.chat-starter-label { font-size: 1.3rem; color: #fff; font-weight: 700; margin-bottom: 1rem; }
.chat-starter { display: flex; max-width: 700px; margin: 0 auto; background: #fff; border-radius: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); border: 3px solid transparent; transition: border-color 0.3s ease; padding: 5px; align-items: center; }
.chat-starter:focus-within { border-color: var(--dorado-ocre); }
#chat-input-hero { flex-grow: 1; border: none; outline: none; background: transparent; font-size: 1.1rem; padding: 0.8rem 1.5rem; border-right: 2px solid #ccc; animation: blink-cursor 1.2s step-end infinite; }
#chat-input-hero:focus { animation: none; border-right-color: transparent; }
@keyframes blink-cursor { from, to { border-color: transparent; } 50% { border-color: #ccc; } }
#start-chat-btn { background: var(--dorado-ocre); color: #fff; border: none; border-radius: 50px; cursor: pointer; transition: all 0.3s; flex-shrink: 0; font-size: 1.1rem; font-weight: 700; padding: 0.8rem 1.8rem; margin-left: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
#start-chat-btn:hover { background-color: #a5884e; transform: scale(1.05); }
#start-chat-btn i { color: #fff; font-size: 1.2rem; }

/* ===== CHAT VIRTUAL (DISEÑO TIPO WHATSAPP) ===== */
.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 80vh;
    max-height: 600px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(110%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1001;
}
.chat-container.open { transform: translateY(0); }
.chat-header {
    background: var(--azul-marino);
    color: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.chat-header h3 {
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.2rem;
}
#close-chat-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s;
}
#close-chat-btn:hover {
    color: #fff;
}
.chat-body {
    flex-grow: 1;
    padding: 0rem;
    overflow-y: auto;
    background-color: #e5ddd5;
    display: flex;
    flex-direction: column;
}
.message-wrapper {
    display: flex;
    margin-bottom: 0.75rem;
}
.chat-message {
    padding: 0.6rem 1rem;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
    white-space: pre-wrap;
    position: relative;
}
.chat-message .timestamp {
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.4);
    display: block;
    text-align: right;
    margin-top: 5px;
    margin-left: 15px;
}
.message-wrapper.bot {
    justify-content: flex-start;
}
.chat-message.bot, .chat-message.bot-typing {
    background: #fff;
    color: var(--gris-oscuro);
    border-top-left-radius: 5px;
}
.chat-message.bot .timestamp {
    color: rgba(0, 0, 0, 0.4);
}
.message-wrapper.user {
    justify-content: flex-end;
}
.chat-message.user {
    background: #dcf8c6;
    color: var(--gris-oscuro);
    border-top-right-radius: 5px;
}
.chat-message.user .timestamp {
    color: rgba(0, 0, 0, 0.4);
}
.chat-input-area {
    display: flex;
    padding: 0.75rem 1rem;
    border-top: 1px solid #ddd;
    background: #f0f0f0;
    align-items: center;
    flex-shrink: 0;
}
/* Define la animación de fadeIn */
@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Clase que aplicaremos a cada palabra */
#wpcgb-messages .word-fade-in {
    opacity: 0; /* Empieza invisible */
    animation: chatFadeIn 0.5s forwards; /* Aplica la animación */
}
#chat-message-input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0.7rem 1rem;
    outline: none;
    font-size: 1rem;
    resize: none;
}
#send-message-btn {
    background: var(--dorado-ocre);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 0.75rem;
    transition: background-color 0.3s;
    flex-shrink: 0;
}
#send-message-btn:hover {
    background-color: #a5884e;
}
.chat-disclaimer {
    background-color: #f0f4f8;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #555;
    border-left: 4px solid var(--dorado-ocre);
}

/* ===== SECCIONES GENERALES (PARA HOME Y SUBPAGINAS) ===== */
.servicios, .nosotros, .cita, .testimonios, .oficinas, .faq {
    padding: 6rem 7%;
}

/* ===== ESTILOS PARA LA HOME ===== */
.servicios-home-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
@media (min-width: 1200px) {
    .servicios-home-container {
        grid-template-columns: repeat(4, 1fr);
    }
}
.servicio-home-card {
    background: #fff;
    padding: 2.5rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
}
.servicio-home-card i { font-size: 3rem; color: var(--dorado-ocre); margin-bottom: 1.5rem; }
.servicio-home-card h3 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--azul-marino); margin-bottom: 1rem; }
.servicio-home-card .btn-secondary { margin-top: auto; }

/* ===== ESTILOS PARA SUBPÁGINAS ===== */
.page-hero {
    background: var(--azul-marino);
    color: #fff;
    text-align: center;
    padding: 8rem 7% 5rem;
}
.page-hero-content h1 { font-family: var(--font-serif); font-size: 3.5rem; margin-bottom: 1rem; color: #fff; }
.page-hero-content p { font-size: 1.2rem; max-width: 800px; margin: 0 auto 2rem auto; color: rgba(255, 255, 255, 0.9); }
.call-to-action-button { background-color: var(--dorado-ocre); color: #fff; padding: 1rem 2.5rem; border-radius: 50px; font-weight: 700; transition: all 0.3s ease; display: inline-block; font-size: 1.2rem; }
.call-to-action-button:hover { background-color: #a5884e; transform: scale(1.05); }
.page-container { display: flex; flex-wrap: wrap; gap: 3rem; padding: 4rem 7%; max-width: 1400px; margin: 0 auto; }
.page-content { flex: 3; min-width: 60%; }
.page-content h2 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--azul-marino); margin-bottom: 1.5rem; }
.page-content h3 { font-family: var(--font-serif); font-size: 1.8rem; color: var(--azul-marino); margin-top: 2.5rem; margin-bottom: 1rem; }
.page-content p, .page-content li { line-height: 1.8; margin-bottom: 1rem; }
.page-content ul, .page-content ol { padding-left: 20px; }
.sidebar { flex: 1; min-width: 300px; }
.sidebar-widget { background-color: #F7F7F7; padding: 2rem; border-radius: 10px; position: sticky; top: 8rem; }
.sidebar-widget h3 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--azul-marino); margin-bottom: 1.5rem; }
.sidebar-widget ul { list-style: none; padding: 0; }
.sidebar-widget ul li { margin-bottom: 1rem; display: flex; align-items: center; }
.sidebar-widget ul li i { color: var(--dorado-ocre); margin-right: 10px; }
.sidebar-widget .call-to-action-button { width: 100%; text-align: center; margin-top: 1.5rem; }
.highlight-box { background-color: #fff8e1; border-left: 5px solid var(--dorado-ocre); border-radius: 5px; padding: 1.5rem; margin: 2rem 0; }
.highlight-box h3 { margin-top: 0; color: var(--azul-marino); display: flex; align-items: center; }
.highlight-box h3 i { margin-right: 10px; color: var(--dorado-ocre); }
.process-steps { list-style: none; padding-left: 0; margin-top: 1.5rem; }
.process-steps li { position: relative; padding-left: 25px; padding-bottom: 1.5rem; border-left: 2px solid var(--dorado-ocre); font-weight: 700; color: var(--azul-marino); }
.process-steps li::before { content: ''; position: absolute; left: -9px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background-color: var(--dorado-ocre); border: 2px solid #fff; }
.process-steps li p { font-weight: normal; color: var(--gris-oscuro); font-size: 0.9rem; margin-top: 0.25rem; margin-bottom: 0; }
.process-steps li:last-child { border-left: 2px solid transparent; }
.widget-separator { border: none; height: 1px; background-color: #ddd; margin: 2rem 0; }
#sticky-toc { position: sticky; top: 8rem; }
.toc-list { list-style: none; padding-left: 0; }
.toc-list li a { display: block; padding: 0.5rem 0; color: var(--gris-oscuro); text-decoration: none; font-weight: 700; border-left: 3px solid #eee; padding-left: 1rem; transition: all 0.2s ease; }
.toc-list li a:hover { color: var(--azul-marino); border-left: 3px solid var(--azul-marino); background-color: #f0f4f8; }
.toc-list li a.active { color: var(--dorado-ocre); border-left: 3px solid var(--dorado-ocre); transform: scale(1.05); }
.content-box { border: 1px solid #eee; border-radius: 5px; padding: 1.5rem; margin-bottom: 1.5rem; }
.content-box h3 { margin-top: 0; }
.alert-box { background-color: #ffebee; border-left-color: #c62828; }
.alert-box h3 i { color: #c62828; }
.glossary-list dt { font-weight: 700; color: var(--azul-marino); font-size: 1.1rem; }
.glossary-list dd { margin-left: 0; margin-bottom: 1rem; padding-left: 1.5rem; border-left: 2px solid var(--blanco-roto); }
.breadcrumb { width: 100%; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.breadcrumb li { font-size: 0.9rem; }
.breadcrumb li a { color: var(--dorado-ocre); text-decoration: none; transition: color 0.3s; }
.breadcrumb li a:hover { color: var(--azul-marino); }
.breadcrumb li+li::before { content: '>'; margin: 0 0.75rem; color: #999; }
.breadcrumb li.active { color: var(--gris-oscuro); font-weight: 700; }
.calculadora-section { background-color: var(--blanco-roto); border-radius: 10px; padding: 2rem; margin: 3rem 0; border: 1px solid #eee; }
.calculadora-section h3 { margin-top: 0; text-align: center; }
.calculadora-section p { text-align: center; margin-bottom: 2rem; }
.calculadora-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.calculadora-form .form-group { display: flex; flex-direction: column; }
.calculadora-form label { font-weight: 700; margin-bottom: 0.5rem; font-size: 0.9rem; }
.calculadora-form input, .calculadora-form select { position: relative; z-index: 2; padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; width: 100%; }
.calculadora-form button { grid-column: 1 / -1; width: 100%; margin-top: 1rem; }
.calculadora-resultado { margin-top: 2rem; padding: 1.5rem; background-color: #fff; border-radius: 10px; border: 2px solid var(--dorado-ocre); text-align: center; display: none; }
.calculadora-resultado h4 { margin-top: 0; font-family: var(--font-serif); font-size: 1.5rem; color: var(--azul-marino); }
.calculadora-resultado .resultado-final { font-size: 2.5rem; font-weight: 700; color: var(--dorado-ocre); margin: 0.5rem 0 1rem 0; }
.calculadora-resultado .resultado-detalle { font-size: 0.9rem; color: #666; margin-bottom: 1.5rem; }
.calculadora-resultado .disclaimer { font-size: 0.8rem; font-style: italic; color: #888; }
.calculadora-error { margin-top: 1rem; padding: 0.8rem; background-color: #ffebee; color: #c62828; border: 1px solid #c62828; border-radius: 5px; text-align: center; display: none; }
.oficinas, .nosotros, .testimonios, .cita { padding: 6rem 7%; }
.oficinas-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.oficina-card { background: #fff; border: 1px solid #eee; padding: 2rem; border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.oficina-card h3 { font-family: var(--font-serif); color: var(--azul-marino); font-size: 1.6rem; margin-bottom: 1.5rem; }
.oficina-card p { margin-bottom: 0.8rem; line-height: 1.6; display: flex; align-items: center; }
.oficina-card p i { color: var(--dorado-ocre); margin-right: 10px; width: 20px; text-align: center; }
.btn-mapa { background: var(--azul-marino); color: #fff; padding: 0.8rem 1.5rem; border-radius: 50px; text-align: center; font-weight: 700; margin-top: auto; transition: background-color 0.3s; }
.btn-mapa:hover { background-color: var(--dorado-ocre); }
.nosotros { background: var(--blanco-roto); }
.nosotros-container { display: flex; align-items: center; gap: 4rem; flex-wrap: wrap; }
.nosotros-img { flex: 1; min-width: 300px; }
.nosotros-text { flex: 2; min-width: 300px; }
.nosotros-img img { width: 100%; max-width: 450px; border-radius: 10px; }
.nosotros-text h2 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--azul-marino); margin-bottom: 1.5rem; }
.nosotros-text p { line-height: 1.7; margin-bottom: 1rem; }
.nosotros-text p:last-of-type { margin-bottom: 2rem; }
.btn-secondary { border: 2px solid var(--dorado-ocre); color: var(--dorado-ocre); padding: 0.8rem 2rem; font-weight: 700; border-radius: 50px; transition: all 0.3s; display: inline-block; }
.btn-secondary:hover { background: var(--dorado-ocre); color: #fff; }
.testimonios { background-color: #fff; }
.testimonial-slider { max-width: 800px; margin: 0 auto; text-align: center; position: relative; overflow: hidden; min-height: 250px; }
.testimonial-slide p { font-size: 1.2rem; font-style: italic; line-height: 1.6; margin-bottom: 1.5rem; }
.testimonial-slide .author { font-weight: 700; color: var(--azul-marino); }
.testimonial-cta { text-align: center; margin-top: 3rem; }
.cita { background-color: var(--blanco-roto); }
.cita-container { max-width: 900px; margin: 0 auto; }
.calendly-placeholder { background: #fff; border: 2px dashed var(--dorado-ocre); height: 650px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; text-align: center; padding: 2rem; }
.oficinas-subpage-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.mapa-container { position: relative; width: 100%; overflow: hidden; padding-top: 56.25%; margin-top: 2rem; border-radius: 10px; }
.mapa-container iframe { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: 100%; border: none; }
.nap-box { margin-bottom: 1.5rem; }
.nap-box p { font-weight: 700; color: var(--azul-marino); margin-bottom: 0.5rem; display: flex; align-items: center; }
.nap-box p i { color: var(--dorado-ocre); margin-right: 10px; }
.nap-box span, .nap-box a { display: block; padding-left: 25px; line-height: 1.6; }
.nap-box a { font-weight: 700; color: var(--dorado-ocre); }
.footer { background-color: var(--azul-marino); color: #fff; padding: 4rem 7% 2rem; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; }
.footer-box .logo-footer { font-family: var(--font-serif); font-size: 1.8rem; color: #fff; font-weight: 700; display: inline-block; margin-bottom: 1rem; }
.footer-box p { color: rgba(255, 255, 255, 0.7); line-height: 1.7; margin-bottom: 1.5rem; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.4); border-radius: 50%; margin-right: 0.5rem; color: rgba(255, 255, 255, 0.7); transition: all 0.3s ease; }
.social-links a:hover { background-color: var(--dorado-ocre); border-color: var(--dorado-ocre); color: #fff; }
.footer-box h3 { font-family: var(--font-serif); color: #fff; margin-bottom: 1.5rem; font-size: 1.4rem; }
.footer-box ul { list-style: none; padding: 0; }
.footer-box ul li a { color: rgba(255, 255, 255, 0.7); display: block; margin-bottom: 0.8rem; transition: all 0.3s ease; position: relative; padding-left: 15px; }
.footer-box ul li a::before { content: '\f105'; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; opacity: 0; transition: all 0.3s ease; }
.footer-box ul li a:hover { color: var(--dorado-ocre); padding-left: 20px; }
.footer-box ul li a:hover::before { opacity: 1; }
.sub-footer { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.2); font-size: 0.9rem; }
.sub-footer p { margin: 0; color: rgba(255, 255, 255, 0.6); }
.sub-footer .disclaimer { margin-top: 0.5rem; font-size: 0.8rem; font-style: italic; color: rgba(255, 255, 255, 0.5); }
.page-madrid .page-content > section { margin-bottom: 4rem; padding-bottom: 2rem; border-bottom: 1px solid #eee; }
.page-madrid .page-content > section:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.secondary-floating-buttons { position: fixed; bottom: 20px; left: 20px; z-index: 998; display: flex; flex-direction: column; gap: 10px; }
.fab-button { width: 60px; height: 60px; border-radius: 50%; background-color: var(--dorado-ocre); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2); transition: transform 0.3s ease; border: none; cursor: pointer; }
.fab-button:hover { transform: scale(1.1); }
.fab-button.whatsapp { background-color: #25D366; }
.fab-button.phone { background-color: var(--dorado-ocre); }
.floating-chat-button { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 999; background-color: var(--dorado-ocre); color: #fff; font-weight: 700; font-size: 1rem; padding: 1rem 2rem; border-radius: 50px; border: none; cursor: pointer; display: flex; align-items: center; gap: 10px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); transition: all 0.3s ease; }
.floating-chat-button:hover { transform: translateX(-50%) scale(1.05); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); background-color: #a5884e; }
.floating-chat-button i { font-size: 1.2rem; }
.form-selector-wrapper { margin-bottom: 1rem; text-align: center; }
.form-selector-wrapper label { display: block; margin-bottom: 0.75rem; font-weight: 700; font-size: 1.1rem; color: var(--azul-marino); }
#office-selector { padding: 0.8rem; font-size: 1rem; border-radius: 5px; border: 2px solid var(--azul-marino); min-width: 300px; cursor: pointer; }
.contact-form { max-width: 700px; margin: 0 auto; background: #fff; padding: 2rem; border-radius: 10px; box-shadow: 0 5px 25px rgba(0,0,0,0.1); }
.form-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.contact-form .form-group { margin-bottom: 1.5rem; }
.contact-form label { display: block; margin-bottom: 0.5rem; font-weight: 700; color: var(--azul-marino); }
.contact-form input[type="text"], .contact-form input[type="tel"], .contact-form input[type="email"], .contact-form textarea { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; font-family: var(--font-sans); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--dorado-ocre); box-shadow: 0 0 5px rgba(192, 160, 98, 0.5); }
.contact-form .checkbox-group { display: flex; align-items: center; margin-bottom: 2rem; }
.contact-form .checkbox-group input { margin-right: 10px; width: auto; }
.contact-form .checkbox-group label { margin-bottom: 0; font-weight: normal; font-size: 0.9rem; }
.contact-form .checkbox-group a { color: var(--dorado-ocre); text-decoration: underline; }
.contact-form button { width: 100%; }

@media (max-width: 1200px) {
    .navbar a { margin-left: 1.2rem; }
}
@media (max-width: 991px) {
    #menu-btn { display: block; z-index: 1001; }
    .navbar { position: absolute; top: 0; left: -100%; width: 100%; height: 100vh; background: #fff; padding: 8rem 5% 2rem 5%; transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1); flex-direction: column; align-items: flex-start; justify-content: flex-start; }
    .navbar.active { left: 0; }
    .navbar a, .navbar .dropdown { width: 100%; margin-left: 0; }
    .navbar a { padding: 1rem 0; font-size: 1.5rem; border-bottom: 1px solid #eee; }
    .dropbtn { text-align: left; width: 100%; padding: 1rem 0; font-size: 1.5rem; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
    .dropdown-content { display: none; position: static; box-shadow: none; border-top: none; padding-left: 1.5rem; background-color: var(--blanco-roto); }
    .dropdown-content.show { display: block; }
    .dropdown-content a { font-size: 1.2rem; border-bottom: none; padding: 0.8rem 0; }
    .page-container { flex-direction: column; }
    .sidebar-widget { position: static; }
}
@media (max-width: 768px) {
    .header-right .call-button { display: none; }
    .chat-container { width: 100%; height: 100%; bottom: 0; right: 0; border-radius: 0; max-height: 100vh; transform: translateY(100%); }
    .calculadora-form { grid-template-columns: 1fr; }
    .floating-chat-button { padding: 0.8rem 1.2rem; font-size: 0.9rem; }
    .secondary-floating-buttons { bottom: 15px; left: 15px; }
    .fab-button { width: 50px; height: 50px; font-size: 24px; }
    .form-group-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .hero h1, .page-hero-content h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
    .chat-starter { flex-direction: column; background: transparent; box-shadow: none; padding: 0; }
    #chat-input-hero { border-radius: 50px; padding: 1rem 1.5rem; text-align: center; margin-bottom: 1rem; border-right: none; animation: none; background: #fff; }
    #start-chat-btn { width: 100%; border-radius: 50px; justify-content: center; padding: 1rem; margin-left: 0; }
}

/* ---------- botón píldora ---------- */
#wpcgb-btn.wpcgb-pill{
    height: 50px;
    position:fixed;
    bottom:1.5rem;
    right: 1rem;
    display:flex;
    align-items: center;
    gap:.6rem;
    background: #f7f7f7;
    border: var(--wpcgb-color,#b6bf00), solid,4px;
    color:#000;
    border-radius: 14px;
    padding: .45rem 0px .45rem .9rem;
    font-size:14px;
    font-weight:600;
    box-shadow:0 4px 12px rgba(0,0,0,.25);
    cursor:pointer;
    z-index:9999;
}
#wpcgb-btn .wpcgb-icon{
    width: 60px;
    height: 60px;
    border-radius:50%;
    background:var(--wpcgb-color,#b6bf00);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    margin-right: -16px;

    img{
        width: 36px;
        height: 36px;
    }
}

/* ---------- ventana chat (idéntica a versión anterior) ---------- */
#wpcgb-pane{box-shadow:0 8px 24px rgba(0,0,0,.25);z-index: 999999;}

#wpcgb-header{display:flex;align-items:center;gap: 0.5rem;background:var(--wpcgb-color,#b6bf00);color:#fff;padding: 0.55rem 0.8rem;font-size: 18px;font-weight: bold;}
#wpcgb-header img{width: 50px;height: 50px;border-radius:50%;}
#wpcgb-header #wpcgb-bot-name{color:#FFF;}
#wpcgb-header button{margin-left:auto;background:none;border:none;color:#fff;font-size:20px;cursor:pointer;}

#wpcgb-messages{flex:1;padding:.75rem;overflow-y:auto;font-size:14px;}

.bubble{max-width:80%;padding:.5rem .75rem;border-radius:12px;margin:.25rem 0;display: table;box-shadow: 0 4px 12px rgba(0, 0, 0, .25);}
.bubble.me{background:#dcf8c6;color:#000;margin-left:auto;border-bottom-right-radius:0;}
.bubble.bot{background:#eef1f4;color:#000;border-bottom-left-radius:0;}
.bubble .time{ display:block;font-size:10px;opacity:.7;margin-top:2px;text-align:right;}
.bubble.me .txt{color:#000;}
.bubble.me .time{color:#000;text-align:left;}


.wpcgb-hp{display:none !important;}/* honeypot */
.cf-turnstile{margin:.5rem auto;}

#wpcgb-pane .typing {
    position: relative;
    margin-left: 17px;
    padding: 15px;
    width: 70px;

    span {
        margin-top: 10px;
        margin-left: 45px;
        content: '';
        animation: blink 1.5s infinite;
        animation-fill-mode: both;
        height: 10px;
        width: 10px;
        background: #5d6981;
        position: absolute;
        left:0;
        top:0;
        border-radius: 50%;

        &:nth-child(2) {
            animation-delay: .2s;
            margin-left: 15px;
        }

        &:nth-child(3) {
            animation-delay: .4s;
            margin-left: 30px;
        }
    }
}
.hidden{
    display: none;
}
@media (min-width: 1200px) {
    .chat-container {
        right: 20%;
        width: 60%;
    }
}
@keyframes blink {
    0% {
        opacity: .1;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: .1;
    }
}
