/* ==================== COLORES JURENTIS ==================== */
:root {
    --verde-oscuro: #1A3C34;
    --verde-medio: #2E7D68;
    --verde-aguamarina: #A3D8D0;
    --blanco: #FFFFFF;
    --gris-claro: #F5F6F5;
    --primary: var(--verde-medio);
    --dark: var(--verde-oscuro);
}

/* ==================== GENERAL ==================== */
* {
    box-sizing: border-box;
}

body {
    padding-top: 0 !important;
    font-family: 'Trebuchet MS', Arial, sans-serif;
    background-color: var(--gris-claro);
    color: var(--verde-oscuro);
    scroll-behavior: smooth;
    margin: 0;
}

/* === HIPERVÍNCULOS EN VERDE (excepto navbar) === */
a, a:link, a:visited {
    color: var(--verde-medio) !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}
a:hover, a:active {
    color: var(--verde-aguamarina) !important;
    text-decoration: underline !important;
}

/* Excepción: navbar */
.navbar .nav-link,
.navbar .nav-link:link,
.navbar .nav-link:visited {
    color: var(--blanco) !important;
}
.navbar .nav-link:hover,
.navbar .nav-link:active {
    color: var(--verde-aguamarina) !important;
}

/* Excepción: toast */
.toast-message a {
    color: inherit !important;
    text-decoration: underline !important;
}

/* ==================== BOTONES VERDES (TODOS) ==================== */
.btn,
.btn:link,
.btn:visited,
.btn-primary,
.btn-success,
.btn-outline-primary,
.btn-outline-success,
.hero .btn,
#submit-btn,
.btn-consulta,
.btn-leer-mas,
.card .btn,
.blog-card .btn,
.article-content .btn,
.btn-thank-you,
.blog-article-btn {
    background-color: var(--verde-medio) !important;
    color: var(--blanco) !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    padding: 14px 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(46, 125, 104, 0.3) !important;
    min-width: 280px;
    max-width: 380px;
    font-size: 1.1rem !important;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}

.btn i,
.btn-thank-you i,
.blog-article-btn i {
    font-size: 1.3rem !important;
}

/* HOVER: aguamarina */
.btn:hover,
.btn-primary:hover,
.btn-success:hover,
.btn-outline-primary:hover,
.btn-outline-success:hover,
.hero .btn:hover,
#submit-btn:hover,
.btn-consulta:hover,
.btn-leer-mas:hover,
.card .btn:hover,
.blog-card .btn:hover,
.article-content .btn:hover,
.btn-thank-you:hover,
.blog-article-btn:hover {
    background-color: var(--verde-aguamarina) !important;
    color: var(--blanco) !important;
    border: 2px solid var(--verde-medio) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(46, 125, 104, 0.4) !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}

/* Botones outline */
.btn-outline,
.btn-home {
    background-color: transparent !important;
    color: var(--verde-medio) !important;
    border: 2px solid var(--verde-medio) !important;
    border-radius: 50px !important;
    padding: 12px 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-width: 280px;
    max-width: 380px;
    font-size: 1.1rem !important;
}
.btn-outline:hover,
.btn-home:hover {
    background-color: var(--verde-medio) !important;
    color: var(--blanco) !important;
}

/* Texto dentro de botones */
.btn, .btn *, .btn-primary *, .btn-success *, .btn-thank-you, .btn-thank-you *, .blog-article-btn, .blog-article-btn * {
    color: inherit !important;
}

/* ==================== NAVBAR ==================== */
.navbar {
    background-color: var(--verde-oscuro) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 70px !important;
    padding: 10px 0 !important;
}
.navbar-brand {
    padding: 0 !important;
    margin: 0 !important;
    height: 55px !important;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--blanco) !important;
}
.navbar-brand img {
    height: 55px !important;
    width: auto !important;
}
.nav-link {
    color: var(--blanco) !important;
    transition: color 0.3s;
    font-size: 1rem !important;
    padding: 8px 16px !important;
}
.nav-link:hover {
    color: var(--verde-aguamarina) !important;
}

/* ==================== HERO ==================== */
.hero {
    min-height: 500px;
    background: linear-gradient(rgba(26, 60, 52, 0.8), rgba(26, 60, 52, 0.8)), url('images/madrid.png') center/cover;
    position: relative;
    padding-top: 80px !important;
    padding-bottom: 60px !important;
}

/* PARTÍCULAS */
#particles-canvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1 !important;
}
.fallback-bg {
    display: none;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    opacity: 0.9;
    z-index: 0;
}
canvas:not(:supported) + .fallback-bg { display: block; }

.hero h1 {
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 3.2rem !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
    letter-spacing: 1.2px !important;
}
.hero p {
    color: #E8F5E9 !important;
    font-size: 1.3rem !important;
    font-weight: 500 !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

/* ==================== TARJETAS (Sobre Nosotros, Servicios, Blog) ==================== */
.value-card, .service-card, .blog-card {
    transition: all 0.4s ease;
    border-radius: 12px !important;
}
.value-card:hover, .service-card:hover, .blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 30px rgba(26, 60, 52, 0.2);
}
.geo-icon {
    width: 60px; height: 60px; margin: 0 auto 1rem;
    color: var(--verde-medio);
    transition: transform 0.4s;
}
.value-card:hover .geo-icon, .service-card:hover .geo-icon {
    transform: rotate(360deg);
}

/* Blog */
.blog-card {
    background: var(--blanco);
    border: none;
    overflow: hidden;
    border-radius: 12px !important;
}
.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card:hover .card-img-top {
    transform: scale(1.05);
}
.blog-card .card-body {
    padding: 1.5rem;
}
.blog-card .card-title {
    font-size: 1.5rem;
    color: var(--verde-oscuro);
}
.blog-card .btn-leer-mas {
    min-width: 160px;
    font-size: 1rem;
    padding: 10px 24px;
    margin: 1rem auto 0 !important;
    display: block !important;
}

/* ==================== PREGUNTAS FRECUENTES ==================== */
#preguntas-frecuentes .accordion-button {
    background-color: var(--blanco);
    color: var(--verde-oscuro);
    font-weight: 500;
    border-radius: 8px !important;
}
#preguntas-frecuentes .accordion-button:not(.collapsed) {
    background-color: var(--verde-medio);
    color: var(--blanco);
}
#preguntas-frecuentes .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 104, 0.25);
}

/* ==================== FORMULARIO CONTACTO ==================== */
#contact-form .form-control {
    border: 2px solid var(--verde-oscuro);
    border-radius: 12px;
}
#contact-form .form-control:focus {
    border-color: var(--verde-medio);
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 104, 0.2);
    background: #f8fff9;
}

/* ==================== WHATSAPP FIJO ==================== */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-size: 24px;
    z-index: 1000;
    transition: transform 0.3s ease;
}
.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* ==================== TOAST ==================== */
.toast-notification {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: #fff;
    color: var(--verde-oscuro);
    padding: 14px 20px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    max-width: 420px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 1px solid rgba(46,125,104,0.2);
}
.toast-notification.show { opacity: 1; transform: translateY(0); }
.toast-notification.success { background: linear-gradient(135deg, #d4edda, #c3e6cb); color: #155724; border-color: #c3e6cb; }
.toast-notification.error { background: linear-gradient(135deg, #f8d7da, #f5c6cb); color: #721c24; border-color: #f5c6cb; }
.toast-close { background: none; border: none; font-size: 1.5rem; color: rgba(0,0,0,0.5); cursor: pointer; width: 28px; height: 28px; border-radius: 50%; transition: all 0.2s; }
.toast-close:hover { background: rgba(0,0,0,0.1); color: rgba(0,0,0,0.8); }

/* ==================== VIABILIDAD INMEDIATA ==================== */
#viabilidad {
    background-color: var(--blanco) !important;
    padding: 5rem 0 !important;
}

/* === TARJETAS DE PRODUCTO === */
.producto-card {
    background: var(--blanco) !important;
    border: 2px solid #ced4da !important;
    border-radius: 16px !important;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    padding: 1.5rem 1rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* HOVER: solo si no está seleccionada */
.producto-card:hover:not(.producto-seleccionado) {
    border-color: var(--verde-aguamarina) !important;
    background: #f8fffc !important;
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(46, 125, 104, 0.12) !important;
}

/* ESTADO SELECCIONADO = INPUT RELLENADO */
.producto-card.producto-seleccionado {
    border: 2px solid var(--verde-aguamarina) !important;
    background: #f8fffb !important;
    color: var(--verde-medio) !important;
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 104, 0.25) !important;
    transform: translateY(-6px);
    z-index: 10 !important;
}

/* Texto e icono dentro de seleccionada */
.producto-card.producto-seleccionado strong,
.producto-card.producto-seleccionado small,
.producto-card.producto-seleccionado i {
    color: var(--verde-medio) !important;
}

/* ICONOS REALES */
.producto-card .icono {
    font-size: 3.2rem !important;
    color: var(--verde-medio) !important;
    margin-bottom: 0.75rem !important;
    line-height: 1 !important;
    display: block !important;
}

.producto-card strong {
    color: var(--verde-oscuro) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}

.producto-card small {
    color: #555 !important;
    font-size: 0.85rem !important;
    display: block !important;
    margin: 0.25rem auto 0 !important;
}

/* CENTRADO PERFECTO */
.card-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
}

/* === FORMULARIO === */
#viabilidad .card {
    border: 1px solid rgba(46,125,104,0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

#viabilidad .form-control {
    border: 2px solid var(--verde-oscuro) !important;
    border-radius: 12px !important;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    color: var(--verde-oscuro) !important;
    transition: all 0.3s;
}

#viabilidad .form-control:focus {
    border-color: var(--verde-medio) !important;
    box-shadow: 0 0 0 0.2rem rgba(46,125,104,0.25) !important;
    background: #f8fff9;
    color: var(--verde-oscuro) !important;
}

/* BOTÓN WHATSAPP VIABILIDAD */
#viabilidad .btn-success {
    background: var(--verde-medio) !important;
    border: none !important;
    font-size: 1.1rem !important;
    padding: 1rem 2.5rem !important;
    min-width: 280px !important;
    border-radius: 50px !important;
    box-shadow: 0 6px 16px rgba(46,125,104,0.35) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}

#viabilidad .btn-success:hover {
    background: var(--verde-aguamarina) !important;
    border: 2px solid var(--verde-medio) !important;
    transform: translateY(-3px);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}

#viabilidad .btn-success i {
    font-size: 1.3rem !important;
}

#viabilidad small.text-muted {
    font-size: 0.9rem;
    color: #6c757d !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .producto-card .icono { font-size: 2.8rem !important; }
}

@media (max-width: 768px) {
    #viabilidad { padding: 3rem 0 !important; }
    .btn, .btn-consulta, .btn-leer-mas, #viabilidad .btn-success {
        min-width: 100% !important;
        margin: 0 auto !important;
        display: block !important;
    }
    .producto-card {
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 576px) {
    .hero h1 { font-size: 2.5rem !important; }
    .hero p { font-size: 1.1rem !important; }
}

/* ==================== FOOTER REDES ==================== */
footer a.text-white:hover {
    color: var(--verde-aguamarina) !important;
}

/* ==================== FIX DEFINITIVO: CONTRASTE EN BOTONES ==================== */
.btn a,
.btn-consulta,
.btn-leer-mas,
#viabilidad .btn-success,
.btn-thank-you,
.blog-article-btn,
.btn a:link,
.btn a:visited,
.btn-consulta:link,
.btn-consulta:visited,
.btn-leer-mas:link,
.btn-leer-mas:visited {
    color: #FFFFFF !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important;
}

.btn a:hover,
.btn-consulta:hover,
.btn-leer-mas:hover,
#viabilidad .btn-success:hover {
    color: #FFFFFF !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7) !important;
}

.btn *,
.btn-consulta *,
.btn-leer-mas *,
#viabilidad .btn-success * {
    color: inherit !important;
}

/* ==================== PÁGINA GRACIAS ==================== */
.thank-you-card {
    background: var(--blanco);
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(26, 60, 52, 0.15);
    text-align: center;
}

.check-icon {
    width: 90px;
    height: 90px;
    background-color: var(--verde-medio) !important;
    color: var(--blanco) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 6px 15px rgba(46, 125, 104, 0.3);
}

.check-icon i {
    font-size: 2.5rem !important;
    color: var(--blanco) !important;
}

.thank-you-card h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--verde-medio);
    margin-bottom: 1rem;
}

.thank-you-card .lead {
    font-size: 1.2rem;
    color: var(--verde-oscuro);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.thank-you-card .lead strong {
    color: var(--verde-medio);
}

.divider {
    background-color: #ddd;
    height: 1px;
    margin: 2.5rem 0;
}

@media (max-width: 576px) {
    .thank-you-card {
        padding: 2rem;
        margin: 1rem;
    }
    .thank-you-card h1 {
        font-size: 2.2rem;
    }
}

/* ==================== ÓVALOS MODERNOS 2025 - LIMPIO & PROFESIONAL ==================== */
.title-wrapper {
    position: relative;
    display: inline-block;
    padding: 0 80px;
    margin: 0 auto 2.5rem;
    line-height: 1.2;
    text-align: center;
    overflow: visible !important;
}

.title-oval {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% + 100px);
    height: 110px;
    min-width: 280px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: transform 0.4s ease;
    overflow: visible !important;
}

.title-oval svg {
    width: 100%;
    height: 100%;
    display: block;
}

.title-oval .oval-path {
    fill: none;
    stroke: #64ccc5;
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(100, 204, 197, 0.25));
    transition: stroke-width 0.3s ease;
}

/* HOVER: micro-interacción moderna */
.title-oval:hover .oval-path {
    stroke-width: 6;
    filter: drop-shadow(0 0 12px rgba(100, 204, 197, 0.35));
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .title-wrapper { padding: 0 60px; }
    .title-oval { width: calc(100% + 80px); height: 95px; }
}
@media (max-width: 576px) {
    .title-wrapper { padding: 0 50px; }
    .title-oval { width: calc(100% + 70px); height: 85px; min-width: 240px; }
}

/* BANNER DE COOKIES - VERSIÓN 100% FUNCIONAL */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 0;
    z-index: 9999;
    font-size: 0.95rem;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 280px;
}

.cookie-content a {
    color: #64ccc5;
    text-decoration: underline;
}

.cookie-buttons button {
    background: transparent;
    color: white;
    border: 1.5px solid white;
    padding: 0.6rem 1.2rem;
    margin-left: 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-config:hover { background: rgba(255,255,255,0.1); }
.btn-aceptar {
    background: #64ccc5;
    border-color: #64ccc5;
}
.btn-aceptar:hover {
    background: #56b8ae;
    border-color: #56b8ae;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        margin-top: 0.5rem;
    }
}
