/* View: Views/Guide/ContoTermicoMGE.cshtml */
:root {
    --ap-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ap-ink: #1d1d1f;
    --ap-grey: #6e6e73;
    --ap-line: #e4edf5;
    --ap-surface: #f5f5f7;
    --cyan: #009FDA;
    --ls-tight: -.03em;
    --ls-snug: -.015em;
    --lh-tight: 1.05;
}

#header.fixed-top {
    background-color: rgba(255,255,255,.82) !important;
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ap-line);
}
#header.fixed-top a,
#header.fixed-top .nav-link,
#header.fixed-top .navbar-nav .nav-link,
#header.fixed-top li a { color: var(--ap-ink) !important; }

/* HERO */
#ct-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #fff !important;
    background-image: none !important;
    text-align: center;
    padding: clamp(120px, 14vw, 180px) 20px clamp(72px, 10vw, 120px);
    overflow: hidden;
}
#ct-hero::before {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: -30%;
    left: 50%;
    width: 70%;
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0,159,218,.12), transparent 65%);
    filter: blur(60px);
    pointer-events: none;
}
#ct-hero .container { position: relative; z-index: 1; }
#ct-hero h1 {
    font-family: var(--ap-font);
    font-size: clamp(2.5rem, 5.8vw, 4.8rem);
    font-weight: 600;
    color: var(--ap-ink);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    margin: 0 auto 20px;
    max-width: 880px;
}
#ct-hero h1 span { color: var(--cyan); }
.ct-hero-divider {
    width: 56px;
    height: 3px;
    border: 0;
    border-radius: 3px;
    background: var(--cyan);
    margin: 0 auto 36px;
    opacity: 1;
}
.ct-hero-sub {
    font-family: var(--ap-font);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 400;
    color: var(--ap-grey);
    line-height: 1.65;
    margin: 0 auto 40px;
    max-width: 620px;
}
.ct-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}
.ct-hero-scroll {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ap-grey);
    font-family: var(--ap-font);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s;
}
.ct-hero-scroll:hover { color: var(--cyan); text-decoration: none; }

/* TIPOGRAFIA */
.ct-label {
    font-family: var(--ap-font);
    font-size: 12px;
    font-weight: 700;
    color: var(--ap-grey);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}
.ct-title {
    font-family: var(--ap-font);
    font-weight: 600;
    color: var(--ap-ink);
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    margin: 0 0 14px;
}
.ct-title--xl { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.ct-title span.hl { color: var(--cyan); }
.ct-lead {
    font-family: var(--ap-font);
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    color: var(--ap-grey);
    font-weight: 400;
    line-height: 1.75;
    margin: 0 0 18px;
}
.ct-lead strong { color: var(--ap-ink); font-weight: 600; }
.ct-lead--center { margin-left: auto; margin-right: auto; max-width: 760px; }

.ct-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ap-ink);
    color: #fff;
    font-family: var(--ap-font);
    font-size: 16px;
    font-weight: 500;
    padding: 16px 30px;
    border-radius: 980px;
    text-decoration: none;
    transition: background .2s, transform .15s;
}
.ct-cta:hover { background: #000; color: #fff; transform: translateY(-1px); text-decoration: none; }
.ct-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: var(--ap-ink);
    border: 1px solid var(--ap-line);
    font-family: var(--ap-font);
    font-size: 16px;
    font-weight: 500;
    padding: 15px 28px;
    border-radius: 980px;
    text-decoration: none;
    transition: border-color .2s, transform .15s;
}
.ct-btn-ghost:hover { border-color: #b8b8c0; color: var(--ap-ink); transform: translateY(-1px); text-decoration: none; }

.divisore-minimal {
    border: none;
    border-top: 1px solid var(--ap-line);
    margin: 0;
    opacity: 1;
}

/* INTRO */
.sez-ct-intro {
    background: #fff;
    padding: clamp(64px, 9vw, 120px) 0;
}
.ct-book-img {
    width: 100%;
    height: auto;
    max-width: 420px;
    margin: 0 auto;
    display: block;
    border-radius: 20px;
}

/* COSA TROVI, FONDO NERO */
.sez-ct-cosa {
    position: relative;
    overflow: hidden;
    background: #000;
    padding: clamp(72px, 9vw, 130px) 0;
}

.sez-ct-cosa .container { position: relative; z-index: 1; }
.sez-ct-cosa .ct-label { color: rgba(255,255,255,.52); }
.sez-ct-cosa .ct-title { color: #fff; }
.sez-ct-cosa .ct-outro {
    font-family: var(--ap-font);
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    color: rgba(255,255,255,.62);
    line-height: 1.75;
    margin: 44px auto 0;
    max-width: 760px;
    text-align: center;
}
.sez-ct-cosa .ct-outro strong { color: #fff; font-weight: 600; }
.ct-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--ap-surface) 100%);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;
    padding: 36px 32px;
    height: 100%;
    transition: transform .35s cubic-bezier(.2,.65,.3,1), box-shadow .35s, border-color .35s;
}
.ct-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0,159,218,.55);
    box-shadow: 0 34px 74px -28px rgba(0,159,218,.55);
}
.ct-card .ct-card-icon {
    width: 54px;
    height: 54px;
    background: #fff;
    border: 1px solid var(--ap-line);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--cyan);
    margin-bottom: 22px;
}
.ct-card h4 {
    font-family: var(--ap-font);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ap-ink);
    letter-spacing: var(--ls-snug);
    line-height: 1.25;
    margin: 0 0 10px;
}
.ct-card p {
    font-family: var(--ap-font);
    font-size: .95rem;
    color: var(--ap-grey);
    line-height: 1.65;
    margin: 0;
}

/* FORM */
.sez-ct-form {
    background: var(--ap-surface);
    padding: clamp(64px, 9vw, 120px) 0;
}
.ct-form-card {
    background: #fff;
    border: 1px solid var(--ap-line);
    border-radius: 28px;
    padding: clamp(30px, 4vw, 48px);
    box-shadow: 0 30px 70px -40px rgba(0,60,120,.28);
}
.ct-form-card h3 {
    font-family: var(--ap-font);
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    font-weight: 600;
    color: var(--ap-ink);
    letter-spacing: var(--ls-snug);
    text-align: center;
    margin: 0 0 10px;
}
.ct-form-intro {
    font-family: var(--ap-font);
    font-size: .95rem;
    color: var(--ap-grey);
    line-height: 1.65;
    text-align: center;
    margin: 0 0 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ap-line);
}
.ct-form-card .form-control {
    background: transparent;
    border: 1px solid #dcdce1;
    border-radius: 14px;
    padding: 14px 18px;
    font-family: var(--ap-font);
    font-size: .95rem;
    font-weight: 400;
    color: var(--ap-ink);
    height: auto;
    box-shadow: none;
    transition: border-color .2s;
}
.ct-form-card .form-control::placeholder { color: #a1a1a8; }
.ct-form-card .form-control:hover { border-color: #b8b8c0; }
.ct-form-card .form-control:focus {
    background: transparent;
    border-color: var(--ap-ink);
    box-shadow: none;
    outline: none;
}
.ct-form-card select.form-control {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='11' height='7' viewBox='0 0 11 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5.5 6L10 1' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}
.ct-form-card .form-control.error { border-color: #d94040; }
.ct-form-card label.error {
    font-family: var(--ap-font);
    font-size: .78rem;
    color: #d94040;
    margin-top: 6px;
}
.ct-form-card .form-text {
    font-family: var(--ap-font);
    font-size: .78rem;
    color: var(--ap-grey);
}
.ct-form-card .form-check-input {
    accent-color: var(--ap-ink);
    border-color: #c9c9d0;
}
.ct-form-card .form-check-input:checked {
    background-color: var(--ap-ink);
    border-color: var(--ap-ink);
}
.ct-form-card .form-check-label {
    font-family: var(--ap-font);
    font-size: .86rem;
    color: var(--ap-grey);
    line-height: 1.6;
}
.ct-form-card .form-check-label a { color: var(--ap-ink); text-decoration: underline; }
.ct-form-card .alert-danger {
    background: #fff0f0;
    color: #c0392b;
    border: none;
    border-radius: 14px;
    font-family: var(--ap-font);
    font-size: .88rem;
}
.ct-form-card .alert-success {
    background: #f0faf4;
    color: #1e7e47;
    border: none;
    border-radius: 14px;
    font-family: var(--ap-font);
    font-size: .88rem;
}
.ct-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--ap-ink);
    color: #fff;
    border: none;
    border-radius: 980px;
    padding: 17px 32px;
    font-family: var(--ap-font);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, transform .15s, opacity .2s;
}
.ct-submit:hover { background: #000; color: #fff; transform: translateY(-1px); }
.ct-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* APPROFONDISCI */
.sez-ct-approfondisci { background: #fff; padding: clamp(64px, 9vw, 120px) 0; }
.ct-band {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e7f6fd 0%, #f3fbff 55%, #ffffff 100%);
    border: 1px solid #d4ecfa;
    border-radius: 32px;
    padding: clamp(48px, 7vw, 100px) 24px;
    text-align: center;
}
.ct-band::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -45%;
    left: 50%;
    width: 70%;
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0,159,218,.20), transparent 65%);
    filter: blur(54px);
    pointer-events: none;
}
.ct-band > * { position: relative; z-index: 1; }

/* PERCHE MGE */
.sez-ct-perche { background: var(--ap-surface); padding: clamp(64px, 9vw, 120px) 0; }
.ct-perche-img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    border: 1px solid var(--ap-line);
}

@media (max-width: 767px) {
    #ct-hero { min-height: auto; padding-top: clamp(104px, 24vw, 140px); }
    #ct-hero h1 { font-size: clamp(2.1rem, 8.5vw, 2.7rem); }
    .ct-hero-actions { flex-direction: column; align-items: stretch; }
    .ct-card { padding: 28px 24px; border-radius: 20px; }
    .ct-form-card { padding: 26px 20px; border-radius: 22px; }
    .ct-band { border-radius: 24px; }
    .ct-book-img { max-width: 300px; }
}
