/* ==========================================================================
   ESTILOS PÁGINA REFIERE Y GANA + CONTACT FORM 7
   ========================================================================== */

.page-refiere-container,
.page-template-page-refiere {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

/* 1. HERO BANNER */
.page-refiere-container .beneficios-hero-banner {
    position: relative;
    width: 100%;
    min-height: 420px;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0 !important;
    padding-top: 70px;
    box-sizing: border-box;
}

.page-refiere-container .beneficios-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.page-refiere-container .beneficios-hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.page-refiere-container .beneficios-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    color: #ffffff;
}

.page-refiere-container .beneficios-breadcrumbs {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #e0e0e0;
}

.page-refiere-container .beneficios-breadcrumbs a {
    color: #ffffff;
    text-decoration: none;
}

/* 2. TEXTOS INTRODUCTORIOS */
.page-refiere-container .beneficios-intro-section {
    padding: 60px 20px 40px 20px;
    text-align: center;
    background: #ffffff;
}

.page-refiere-container .beneficios-intro-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.page-refiere-container .beneficios-main-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.3rem;
    color: #8C1527;
    font-weight: 700;
    margin-bottom: 20px;
}

.page-refiere-container .beneficios-intro-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* 3. SECCIÓN FORMULARIO Y TARJETA CON IMAGEN FULL WIDTH */
.refiere-form-section {
    position: relative;
    width: 100%;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.refiere-full-card-bg {
    position: relative;
    z-index: 2;
    max-width: 1150px;
    margin: 0 auto 50px auto;
    background-size: cover;
    background-position: center;
    border-radius: 0px !important; /* Esquinas totalmente rectas */
    overflow: hidden;
    min-height: 580px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.refiere-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 100%);
    z-index: 1;
}

.refiere-phrase-left {
    position: relative;
    z-index: 2;
    flex: 1;
    max-width: 480px;
    padding-right: 30px;
}

.refiere-phrase-content {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.refiere-phrase-content span {
    color: #FFFFFF;
}

.refiere-phrase-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #f0f0f0;
    margin-top: 15px;
    line-height: 1.4;
    text-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

.refiere-floating-form-wrapper {
    position: relative;
    z-index: 2;
    width: 480px;
    max-width: 100%;
}

.refiere-glass-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 35px 30px;
    border-radius: 0px !important; /* Esquinas totalmente rectas */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* 4. SECCIÓN PASOS DEL PROGRAMA (¿CÓMO FUNCIONA?) */
.refiere-steps-section {
    padding: 20px 20px 70px 20px;
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.refiere-steps-container {
    max-width: 1150px;
    margin: 0 auto;
}

/* Título de Instrucción antes de los 3 Pasos */
.refiere-steps-intro-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2C2825;
    text-align: center;
    margin: 0 0 35px 0;
    letter-spacing: 0.5px;
}

.refiere-steps-intro-title span {
    color: #8C1527; /* Palabra referir resaltada en Guinda Corporativo */
}

.refiere-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step-card-item {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0px !important;
    padding: 35px 25px 30px 25px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.step-number-badge {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 38px;
    height: 38px;
    background-color: #8C1527;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.step-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 15px 0 25px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.step-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2C2825;
    margin: 0 0 10px 0;
    line-height: 1.35;
}

.step-card-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #666666;
    margin: 0;
    line-height: 1.4;
}

.step-card-desc strong {
    color: #8C1527;
    font-weight: 700;
}

/* 5. ESTILOS INTERNOS DE CONTACT FORM 7 */
.cf7-select-center {
    margin-bottom: 20px;
}

.cf7-select-center select {
    width: 100%;
    height: 42px;
    border: 1px solid #e0e0e0;
    border-radius: 0px !important;
    padding: 0 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2b2825;
    background: #ffffff;
    cursor: pointer;
}

.cf7-refiere-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.cf7-col-title {
    font-family: 'Montserrat', sans-serif;
    color: #8C1527;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    border-bottom: 2px solid #8C1527;
    padding-bottom: 4px;
}

.cf7-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.cf7-field {
    flex: 1;
}

.cf7-field input[type="text"],
.cf7-field input[type="email"],
.cf7-field input[type="tel"],
.cf7-field select {
    width: 100%;
    height: 40px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 0px !important;
    padding: 0 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: #2C2825;
    box-sizing: border-box;
}

.cf7-field input::placeholder {
    color: #888888;
}

.cf7-bottom-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin-top: 15px;
}

.cf7-submit-wrapper {
    order: 2;
}

.cf7-submit-wrapper input[type="submit"] {
    background-color: #8C1527;
    color: #ffffff;
    border: none;
    width: 100%;
    height: 46px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 0px !important;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cf7-submit-wrapper input[type="submit"]:hover {
    background-color: #2C2825;
    transform: translateY(-2px);
}

.wpcf7-not-valid-tip {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    color: #d9534f;
    margin-top: 2px;
}

.wpcf7-response-output {
    font-family: 'Montserrat', sans-serif;
    border: 1px solid #8C1527 !important;
    color: #2C2825 !important;
    text-align: center;
    margin-top: 15px !important;
    padding: 10px !important;
    border-radius: 0px !important;
    background: rgba(255, 255, 255, 0.9);
}

/* 6. ESTILOS Y ALINEACIÓN PRECISA DE CHECKBOXES */
.cf7-terms {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    text-align: left;
    order: 1;
}

.cf7-term-item {
    width: 100%;
}

/* 1. Anular comportamientos de bloque en los envoltorios nativos de CF7 */
.cf7-term-item .wpcf7-form-control-wrap,
.cf7-term-item .wpcf7-checkbox,
.cf7-term-item .wpcf7-acceptance {
    display: inline-block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cf7-term-item .wpcf7-list-item {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* 2. Forzar que la etiqueta unifique el checkbox y el texto en la misma línea */
.cf7-term-item label,
.cf7-term-item .wpcf7-list-item-label {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.82rem !important;
    color: #333333 !important;
    line-height: 1.35 !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* 3. Fijar el checkbox a la izquierda */
.cf7-term-item input[type="checkbox"] {
    margin: 2px 0 0 0 !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
    accent-color: #8C1527;
    cursor: pointer;
    display: inline-block !important;
}

/* 4. Enlaces de políticas */
.cf7-term-item a {
    color: #8C1527 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

.cf7-term-item a:hover {
    color: #5d0f1a !important;
}

/* RESPONSIVE MÓVIL Y TABLETS */
@media screen and (max-width: 900px) {
    .refiere-steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .refiere-steps-intro-title {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }

    .refiere-full-card-bg {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }

    .refiere-phrase-left {
        max-width: 100%;
        padding-right: 0;
        text-align: center;
    }

    .refiere-phrase-content {
        font-size: 2.1rem;
    }
    
    .refiere-floating-form-wrapper {
        width: 100%;
    }

    .cf7-row {
        flex-direction: column;
        gap: 8px;
    }
}