/* =========================================================
   CLÍNICAWEB DIAGNÓSTICO
   ========================================================= */

#cw-diagnostico {
    width: 100%;
}

#cw-diagnostico .cw-card {
    width: 100%;
}


/* =========================================================
   INFORME
   ========================================================= */

#cw-diagnostico .cw-report {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    box-sizing: border-box;
}

#cw-diagnostico .cw-report *,
#cw-diagnostico .cw-report *::before,
#cw-diagnostico .cw-report *::after {
    box-sizing: border-box;
}


/* =========================================================
   CABECERA DEL DIAGNÓSTICO
   ========================================================= */

#cw-diagnostico .cw-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, ##43962b 0%, #20A36A 100%);
    color: #fff;
    border-radius: 20px;
    padding: 42px 30px 40px;
    margin-bottom: 32px;
    text-align: center;
    box-shadow: 0 14px 32px rgba(25, 135, 84, 0.20);
}

/* Decoración sutil del fondo */
#cw-diagnostico .cw-header::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    top: -170px;
    right: -100px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    pointer-events: none;
}

#cw-diagnostico .cw-header::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    bottom: -160px;
    left: -90px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    pointer-events: none;
}

/* Título */
#cw-diagnostico .cw-header h2 {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.4px;
}

#cw-diagnostico .cw-score-global {
    position: relative;
    z-index: 2;
    margin-top: 22px;
    color: #fff;
    font-size: 64px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -2px;
}

#cw-diagnostico .cw-score-global span {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.88);
    font-size: 28px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: -0.5px;
}

/* Estado: Aceptable / Buena / Muy buena / Necesita mejoras */
#cw-diagnostico .cw-header p {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0 0 !important;
    padding: 7px 20px;
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 999px;
    background: rgba(255,255,255,.13);
    color: #fff;
    font-size: 16px !important;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

/* =========================================================
   MÓDULOS
   ========================================================= */

#cw-diagnostico .cw-module {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    padding: 25px;
    margin-bottom: 25px;
}

#cw-diagnostico .cw-module-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 5px;
}

#cw-diagnostico .cw-module-title span {
    font-size: 22px;
    font-weight: 700;
}

#cw-diagnostico .cw-module-title strong {
    font-size: 20px;
    white-space: nowrap;
}


/* =========================================================
   BARRAS DE PROGRESO
   ========================================================= */

#cw-diagnostico .cw-progress {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

#cw-diagnostico .cw-bar {
    height: 100%;
    border-radius: 10px;
    background: #0F4C81;
}


/* =========================================================
   LISTAS
   ========================================================= */

#cw-diagnostico .cw-module ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#cw-diagnostico .cw-module li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
}

#cw-diagnostico .cw-module li:last-child {
    border-bottom: 0;
}

#cw-diagnostico .cw-module small {
    color: #666;
    font-size: 13px;
}


/* =========================================================
   TABLAS
   ========================================================= */

#cw-diagnostico .cw-module table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#cw-diagnostico .cw-module th,
#cw-diagnostico .cw-module td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

#cw-diagnostico .cw-module th {
    font-weight: 700;
}


/* =========================================================
   ENLACES
   ========================================================= */

#cw-diagnostico .cw-module a {
    color: #0F4C81;
    text-decoration: none;
}

#cw-diagnostico .cw-module a:hover {
    text-decoration: underline;
}


/* =========================================================
   RECOMENDACIONES
   ========================================================= */

#cw-diagnostico .cw-recommendation {
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #f7f9fb;
}

#cw-diagnostico .cw-recommendation:last-child {
    margin-bottom: 0;
}


/* =========================================================
   IMÁGENES
   ========================================================= */

#cw-diagnostico .cw-module img {
    max-width: 100%;
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 767px) {

    #cw-diagnostico .cw-report {
        width: 100%;
        margin: 25px auto;
    }

    #cw-diagnostico .cw-header {
        padding: 25px 18px;
        border-radius: 10px;
    }

    #cw-diagnostico .cw-header h2 {
        font-size: 26px;
    }

    #cw-diagnostico .cw-score-global {
        font-size: 58px;
    }

    #cw-diagnostico .cw-score-global span {
        font-size: 22px;
    }

    #cw-diagnostico .cw-module {
        padding: 18px;
        border-radius: 10px;
    }

    #cw-diagnostico .cw-module-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    #cw-diagnostico .cw-module-title span {
        font-size: 19px;
    }

    #cw-diagnostico .cw-module-title strong {
        font-size: 18px;
    }

    #cw-diagnostico .cw-module table {
        display: block;
        overflow-x: auto;
    }

}

/* =========================================================
   CALIDAD TÉCNICA
   ========================================================= */

#cw-diagnostico .cw-quality-row {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

#cw-diagnostico .cw-quality-row:last-child {
    border-bottom: 0;
}

#cw-diagnostico .cw-quality-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

#cw-diagnostico .cw-quality-status {
    margin-bottom: 6px;
}

#cw-diagnostico .cw-quality-detail {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* =========================================================
   FORMULARIO DIAGNÓSTICO
   ========================================================= */

.cw-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 548px;
    margin: 0;
}

/* Campo URL */

.cw-url-wrap {
    position: relative;
    flex: 1 1 auto;
    height: 52px;
}

.cw-url-wrap .cw-url-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    fill: none;
    stroke: #63708a;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    z-index: 2;
}

.cw-form #cw-url {
    width: 100%;
    height: 52px;
    box-sizing: border-box;

    margin: 0;
    padding: 0 16px 0 45px;

    border: 1px solid #b9c3d4;
    border-radius: 7px;

    background: #ffffff;

    color: #26354d;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;

    outline: none;

    box-shadow: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.cw-form #cw-url::placeholder {
    color: #71809a;
    opacity: 1;
}

.cw-form #cw-url:focus {
    border-color: #43962b;
    box-shadow: 0 0 0 3px rgba(67, 150, 43, 0.10);
}

/* Botón */

.cw-form #cw-analizar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 210px;

    height: 52px;
    min-height: 52px;

    margin: 0;
    padding: 0 20px;

    border: 0;
    border-radius: 7px;

    background: #43962b;
    color: #ffffff;

    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;

    cursor: pointer;

    box-shadow: none;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.cw-form #cw-analizar:hover {
    background: #378022;
    transform: translateY(-1px);
}

.cw-form #cw-analizar:active {
    transform: translateY(0);
}

.cw-form #cw-analizar span {
    display: inline-block;
    white-space: nowrap;
}

/* Flecha */

.cw-btn-arrow {
    width: 20px;
    height: 20px;
    margin-left: 9px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    flex-shrink: 0;

    transition: transform 0.2s ease;
}

.cw-form #cw-analizar:hover .cw-btn-arrow {
    transform: translateX(3px);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

/* =========================================================
   RESPONSIVE PROGRESIVO — FORMULARIO
   ========================================================= */

/* ---------------------------------------------------------
   DESKTOP COMPACTO
   1300px → 1001px
   --------------------------------------------------------- */

@media (max-width: 1300px) {

    .cw-form {
        max-width: clamp(500px, 48vw, 548px);
        gap: clamp(7px, 0.7vw, 8px);
    }

    .cw-url-wrap {
        height: clamp(48px, 4vw, 52px);
    }

    .cw-form #cw-url {
        height: clamp(48px, 4vw, 52px);
        font-size: clamp(14px, 1.2vw, 16px);
        padding-left: clamp(40px, 3.5vw, 45px);
    }

    .cw-url-wrap .cw-url-icon {
        left: clamp(12px, 1.2vw, 15px);
        width: clamp(18px, 1.6vw, 20px);
        height: clamp(18px, 1.6vw, 20px);
    }

    .cw-form #cw-analizar {
        flex-basis: clamp(175px, 17vw, 210px);
        height: clamp(48px, 4vw, 52px);
        min-height: clamp(48px, 4vw, 52px);
        padding-left: clamp(14px, 1.5vw, 20px);
        padding-right: clamp(14px, 1.5vw, 20px);
        font-size: clamp(13px, 1.2vw, 16px);
    }

    .cw-btn-arrow {
        width: clamp(17px, 1.6vw, 20px);
        height: clamp(17px, 1.6vw, 20px);
        margin-left: clamp(7px, 0.7vw, 9px);
    }
}


/* ---------------------------------------------------------
   TABLET / DESKTOP ESTRECHO
   1000px → 768px
   --------------------------------------------------------- */

@media (max-width: 1000px) {

    .cw-form {
        max-width: 100%;
        gap: 7px;
    }

    .cw-url-wrap {
        height: 46px;
    }

    .cw-form #cw-url {
        height: 46px;
        font-size: 14px;
        padding-left: 40px;
        padding-right: 12px;
    }

    .cw-url-wrap .cw-url-icon {
        left: 12px;
        width: 18px;
        height: 18px;
    }

    .cw-form #cw-analizar {
        flex-basis: 170px;
        height: 46px;
        min-height: 46px;
        padding: 0 14px;
        font-size: 14px;
    }

    .cw-btn-arrow {
        width: 17px;
        height: 17px;
        margin-left: 7px;
    }
}


/* ---------------------------------------------------------
   TABLET COMPACTO
   767px → 601px
   --------------------------------------------------------- */

@media (max-width: 767px) {

    .cw-form {
        max-width: 100%;
        gap: 8px;
    }

    .cw-url-wrap {
        height: 44px;
    }

    .cw-form #cw-url {
        height: 44px;
        font-size: 13px;
        padding-left: 38px;
        padding-right: 10px;
    }

    .cw-url-wrap .cw-url-icon {
        left: 11px;
        width: 17px;
        height: 17px;
    }

    .cw-form #cw-analizar {
        flex-basis: 155px;
        height: 44px;
        min-height: 44px;
        padding: 0 12px;
        font-size: 13px;
    }

    .cw-btn-arrow {
        width: 16px;
        height: 16px;
        margin-left: 6px;
    }
}


/* ---------------------------------------------------------
   MÓVIL
   600px → abajo
   --------------------------------------------------------- */

@media (max-width: 600px) {

    .cw-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        max-width: 100%;
    }

    .cw-url-wrap {
        width: 100%;
        height: 48px;
    }

    .cw-form #cw-url {
        width: 100%;
        height: 48px;
        font-size: 14px;
        padding-left: 40px;
        padding-right: 12px;
    }

    .cw-url-wrap .cw-url-icon {
        left: 12px;
        width: 18px;
        height: 18px;
    }

    .cw-form #cw-analizar {
        width: 100%;
        flex: 0 0 auto;
        height: 48px;
        min-height: 48px;
        font-size: 14px;
    }

    .cw-btn-arrow {
        width: 18px;
        height: 18px;
    }
}

/* Contenedor externo del informe */
#cw-resultados {
    width: 100%;
    max-width: 1232px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

#cw-resultados .cw-report {
    width: 100%;
    max-width: 1232px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* =========================================================
   CABECERA DIAGNÓSTICO — SELECTOR CORRECTO
   ========================================================= */

#cw-resultados .cw-report .cw-header {
    position: relative !important;
    overflow: hidden !important;

    width: 100% !important;
    min-height: 300px !important;

    margin: 40px auto 35px !important;
    padding: 48px 30px 42px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    background: linear-gradient(
        135deg,
        #198754 0%,
        #20a36a 55%,
        #159968 100%
    ) !important;

    border: none !important;
    border-radius: 24px !important;

    color: #fff !important;
    text-align: center !important;

    box-shadow:
        0 18px 42px rgba(25, 135, 84, .24),
        inset 0 1px 0 rgba(255,255,255,.18) !important;
}


/* Círculos decorativos */

#cw-resultados .cw-report .cw-header::before {
    content: "" !important;

    position: absolute !important;

    width: 360px !important;
    height: 360px !important;

    top: -230px !important;
    right: -110px !important;

    background: rgba(255,255,255,.09) !important;
    border-radius: 50% !important;

    pointer-events: none !important;
}

#cw-resultados .cw-report .cw-header::after {
    content: "" !important;

    position: absolute !important;

    width: 280px !important;
    height: 280px !important;

    bottom: -190px !important;
    left: -100px !important;

    background: rgba(255,255,255,.06) !important;
    border-radius: 50% !important;

    pointer-events: none !important;
}


/* =========================================================
   TÍTULO
   ========================================================= */

#cw-resultados .cw-report .cw-header h2 {
    position: relative !important;
    z-index: 2 !important;

    margin: 0 0 22px !important;
    padding: 0 !important;

    color: #fff !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 34px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;

    letter-spacing: -.5px !important;
    text-align: center !important;
}


/* =========================================================
   PUNTUACIÓN
   ========================================================= */

#cw-resultados .cw-report .cw-score-global {
    position: relative !important;
    z-index: 2 !important;

    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #fff !important;

    font-size: 76px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    letter-spacing: -3px !important;
}


/* /100 */

#cw-resultados .cw-report .cw-score-global span {
    display: inline !important;

    margin: 0 0 0 7px !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;

    color: rgba(255,255,255,.78) !important;

    font-size: 28px !important;
    font-weight: 500 !important;
    line-height: 1 !important;

    letter-spacing: -1px !important;
}


/* =========================================================
   ESTADO — ACEPTABLE
   ========================================================= */

#cw-resultados .cw-report .cw-header > p {
    position: relative !important;
    z-index: 2 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 20px 0 0 !important;
    padding: 9px 24px !important;

    color: #fff !important;

    background: rgba(255,255,255,.14) !important;

    border: 1px solid rgba(255,255,255,.28) !important;
    border-radius: 999px !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;

    text-align: center !important;

    box-shadow: 0 4px 14px rgba(0,0,0,.08) !important;
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 767px) {

    #cw-resultados .cw-report .cw-header {
        min-height: 260px !important;
        padding: 38px 20px !important;
        border-radius: 18px !important;
    }

    #cw-resultados .cw-report .cw-header h2 {
        font-size: 27px !important;
    }

    #cw-resultados .cw-report .cw-score-global {
        font-size: 60px !important;
    }

    #cw-resultados .cw-report .cw-score-global span {
        font-size: 23px !important;
    }

    #cw-resultados .cw-report .cw-header > p {
        margin-top: 16px !important;
        padding: 7px 18px !important;
        font-size: 15px !important;
    }

	.wpcf7 form.sent .wpcf7-response-output {
		margin-top: -4vw !important;
		margin-left: -4vw !important;
		margin-right: 19vw !important;
		border-color: #46b450;
	}
	
}


/* =========================================================
   BOTONES PDF Y SUSCRIPCIÓN
   ========================================================= */

#cw-descargar-pdf,
#cw-suscribirse {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    min-height: 48px !important;
    padding: 0 26px !important;

    border: none !important;
    border-radius: 6px !important;

    background: #43962b !important;
    color: #ffffff !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    text-decoration: none !important;
    cursor: pointer !important;

    box-sizing: border-box !important;

    transition:
        background-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease !important;
}

#cw-descargar-pdf:hover,
#cw-suscribirse:hover {
    background: #357b22 !important;
    color: #ffffff !important;
    text-decoration: none !important;

    transform: translateY(-2px);

    box-shadow: 0 7px 18px rgba(67, 150, 43, 0.22) !important;
}

#cw-descargar-pdf:active,
#cw-suscribirse:active {
    transform: translateY(0);
    box-shadow: none !important;
}

#cw-descargar-pdf span,
#cw-suscribirse span {
    color: inherit !important;
}

#cw-descargar-pdf,
#cw-suscribirse {
    margin-top: 18px !important;
}