/* ==========================================================================
   GRUPO GRECO ABOGADOS - ESTILOS PRINCIPALES (CORREGIDO)
   Área: Derecho de Familia
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #111;
    color: #222;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
}

p {
    line-height: 1.7;
}

/* ==========================================================================
   HEADER & TOP BAR
   ========================================================================== */

.hero {
    position: relative;
    background:
        linear-gradient(rgba(0, 0, 0, .72),
            rgba(0, 0, 0, .78)),
        url('../images/bg-legal.webp');
    background-size: cover;
    background-position: center;
    padding: 120px 0 110px;
    overflow: hidden;
}

.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    padding: 25px 0;
}

.logo-box {
    background: #fff;
    padding: 18px 30px;
    border-radius: 0 0 40px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .15);
}

.logo-box img {
    height: 70px;
}

.top-info {
    display: flex;
    gap: 25px;
    color: #fff;
}

.top-info i {
    color: #d93737;
}

/* ==========================================================================
   HERO CONTENT
   ========================================================================== */

.hero-content {
    padding-top: 140px;
}

.hero h1 {
    color: #fff;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero h1 span {
    color: #d93737;
}

.hero p {
    color: #f1f1f1;
    font-size: 1.2rem;
    margin-bottom: 35px;
    max-width: 650px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn-primary-custom {
    background: #d93737;
    color: #fff;
    padding: 18px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
}

.btn-primary-custom:hover {
    background: #bc2d2d;
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary-custom {
    border: 2px solid rgba(255, 255, 255, .8);
    color: #fff;
    padding: 18px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
}

.btn-secondary-custom:hover {
    background: #fff;
    color: #111;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 35px;
}

.badge-item {
    background: rgba(255, 255, 255, .10);
    backdrop-filter: blur(12px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50px;
    padding: 12px 22px;
    font-size: 15px;
}

.badge-item i {
    color: #d93737;
    margin-right: 8px;
}

.hero-card {
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 25px;
    padding: 40px;
    color: #fff;
}

.hero-card p,
.hero-card li {
    color: #ddd;
}

.hero-card ul {
    margin: 25px 0;
}

.hero-card li {
    margin-bottom: 12px;
}

/* ==========================================================================
   SECCIONES GENERALES & TARJETAS DE SERVICIO
   ========================================================================== */

section {
    padding: 90px 0;
    background: #f7f7f7;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 800;
    color: #111;
    margin-bottom: 18px;
}

.section-title p {
    color: #555;
    font-size: 18px;
    max-width: 700px;
    margin: auto;
}

.service-card {
    background: #fff;
    border-radius: 28px;
    padding: 45px 30px;
    text-align: center;
    height: 100%;
    transition: .35s;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .07);
    border: 1px solid rgba(0, 0, 0, .04);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .12);
}

.service-card i {
    font-size: 52px;
    color: #d93737;
    /* Adaptado al color corporativo principal */
    margin-bottom: 25px;
}

.service-card h4 {
    font-size: 30px;
    font-weight: 700;
    color: #111;
    margin-bottom: 18px;
}

.service-card p {
    color: #555;
    line-height: 1.8;
    font-size: 17px;
}

/* ==========================================================================
   SECCIÓN DE CONTACTO & FORMULARIO
   ========================================================================== */

.contact-section {
    background:
        linear-gradient(rgba(0, 0, 0, .75),
            rgba(0, 0, 0, .75)),
        url('https://images.unsplash.com/photo-1521791136064-7986c2920216?q=80&w=1600&auto=format&fit=crop') center center/cover no-repeat;
}

.form-box {
    background: #fff;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .15);
}

.form-control,
.form-select {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-family: 'Poppins', sans-serif;
}

.form-control:focus,
.form-select:focus {
    border-color: #d93737;
    box-shadow: 0 0 0 3px rgba(217, 55, 55, 0.15);
}

.recaptcha-notice {
    font-size: .8rem;
    color: #888;
}

.grecaptcha-badge {
    visibility: hidden !important;
}

/* ==========================================================================
   ESTILOS PREMIUM DEL QUIZ CALIFICADOR
   ========================================================================== */

.quiz-progress-container {
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background-color: #d93737;
    /* Color corporativo */
    transition: width 0.4s ease;
}

.quiz-step {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.quiz-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-label-quiz {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-quiz-option {
    width: 100%;
    background-color: #f9fafb;
    border: 2px solid #e5e7eb;
    padding: 18px 24px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-quiz-option:hover {
    border-color: #d93737;
    background-color: #faf5f5;
    transform: translateX(4px);
}

.btn-primary-quiz {
    background-color: #d93737;
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary-quiz:hover {
    background-color: #bc2d2d;
    color: #fff;
}

.btn-secondary-quiz {
    background-color: #f3f4f6;
    color: #4b5563;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-secondary-quiz:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* Pantallas de Resultados */
.result-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.success-icon {
    background-color: #d1fae5;
    color: #10b981;
}

.warning-icon {
    background-color: #fef3c7;
    color: #f59e0b;
}

.btn-whatsapp-success {
    display: inline-block;
    background-color: #25D366;
    color: #fff;
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.btn-whatsapp-success:hover {
    background-color: #20ba5a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    background: #0e0e0e;
    color: #fff;
    text-align: center;
    padding: 45px 20px;
}

footer p {
    margin: 0;
    color: #aaa;
}

/* ==========================================================================
   BOTONES FLOTANTES Y ADHESIVOS
   ========================================================================== */

.whatsapp-float {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    color: #fff;
    transform: scale(1.08);
}

.mobile-sticky {
    display: none;
}

/* ==========================================================================
   RESPONSIVIDAD Y MEDIA QUERIES
   ========================================================================== */

@media(max-width:992px) {
    .hero h1 {
        font-size: 3rem;
    }
}

@media(max-width:768px) {
    .top-info {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-bottom: 100px;
    }

    .hero-content {
        padding-top: 170px;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-primary-custom,
    .btn-secondary-custom {
        width: 100%;
        text-align: center;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .form-box {
        padding: 35px 25px;
    }

    /* Ajuste en Móviles para redirigir a precalificar */
    .mobile-sticky {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #25D366;
        /* Cambiado a verde WhatsApp para mayor clicabilidad móvil */
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
        text-align: center;
        z-index: 9998;
        box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    }

    .mobile-sticky a {
        color: #fff;
        text-decoration: none;
        font-weight: 700;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}