/* =======================
   Typography & Base Styles
   ======================= */
div.ccm-page .fotovoltaico-2025 h1,
div.ccm-page .fotovoltaico-2025 h2,
div.ccm-page .fotovoltaico-2025 h3,
div.ccm-page .fotovoltaico-2025 h4,
div.ccm-page .fotovoltaico-2025 h5,
div.ccm-page .fotovoltaico-2025 h6,
div.ccm-page .fotovoltaico-2025 p,
div.ccm-page .pure-g [class*=pure-u] {
    font-family: 'unitext', sans-serif;
}

div.ccm-page .fotovoltaico-2025,
div.ccm-page .fotovoltaico-2025 p,
div.ccm-page .pure-g [class*="pure-u"] {
    font-size: 17px;
}

div.ccm-page .fotovoltaico-2025 h2 {
    font-size: 30px;
    margin: 18px 0;
}

.fotovoltaico-2025 ul {
    padding-inline-start: 20px;
}

/* =======================
   Section: Main Intro
   ======================= */
.fotovoltaico-2025 .bloccoIntro {
    z-index: 0;
    padding-top: 0 !important;
    min-height: 650px;
    height: 40vh;
}

@media screen and (max-width: 48em) {
    .fotovoltaico-2025 .bloccoIntro {
        min-height: 450px;
        height: 80vh;
    }

    .fotovoltaico-2025 .caption {
        margin-top: 5vh;
    }

    .fotovoltaico-2025 .titolo-pagine {
        max-height: 100%;
    }
}

/* =======================
   Section: Page Title
   ======================= */
.fotovoltaico-2025 .titolo-pagine {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45)), var(--image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* =======================
   Section: Caption
   ======================= */
.fotovoltaico-2025 .caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    padding: 20px;
    margin-top: 5vh;
}

div.ccm-page .caption h1 {
    margin: 0;
    text-align: center;
}

div.ccm-page .caption p {
    color: white;
    font-family: 'unitext';
    font-size: 1.6em;
    line-height: 1;
    bottom: 0;
    text-align: center;
    width: 100%;
}

/* =======================
   Section: Main Content Container
   ======================= */
.fotovoltaico-2025 .fotovoltaico-main {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =======================
   Buttons: Call to Action
   ======================= */
.cta {
    color: #fff;
    transition: .2s;
    background: #E21516;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    padding: 18px 35px;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(226, 21, 22, 0.3);
    transform: translateY(0);
}

.cta:hover,
.cta:focus,
.cta:active {
    background: #B91313;
    text-decoration: none;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 21, 22, 0.4);
}

@media screen and (max-width: 768px) {
    div.ccm-page .cta {
        display: inline-block !important;
    }
}

/* =======================
   Section: CTA Area
   ======================= */
.cta-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 40px auto;
    border: 1px solid #eaeaea;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e21516, #ff4d4d);
}

div.ccm-page .cta-section p.main-text {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    margin-top: 0;
}

div.ccm-page .cta-section p.sub-text {
    color: #666;
    margin-top: 20px;
    margin-bottom: 0;
}

/* =======================
   Section: Requisiti Card
   ======================= */
.requisiti .how-it-works-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* =======================
   FAQ Section
   ======================= */
.faq {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: 'unitext', sans-serif;
}

.faq details {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.faq details[open] {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

.faq summary {
    padding: 20px 25px;
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
    user-select: none;
}

/* Hide default marker */
.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary:hover {
    background-color: #f8f9fa;
    color: #E21516;
}

/* Custom Icon */
.faq summary::after {
    content: '+';
    font-size: 28px;
    font-weight: 300;
    color: #E21516;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    line-height: 1;
    margin-left: 15px;
    flex-shrink: 0;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details[open] summary {
    border-bottom: 1px solid #f0f0f0;
    color: #E21516;
}

.faq details p,
.faq details ul {
    padding: 20px 25px;
    margin: 0;
    color: #555;
    line-height: 1.7;
    font-size: 16px;
    background-color: #fff;
    animation: fadeIn 0.4s ease-out;
}

.faq details ul {
    padding-left: 45px;
    padding-top: 10px;
    padding-bottom: 20px;
}

.faq details li {
    margin-bottom: 10px;
}

.faq strong {
    color: #333;
    font-weight: 700;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 35.5em) {
    .faq summary {
        font-size: 16px;
        padding: 15px 20px;
    }

    .faq details p,
    .faq details ul {
        padding: 15px 20px;
        font-size: 15px;
    }
}

/* =======================
   Section: Layout with Image & Text
   ======================= */
.testo_con_immagine {
    margin: 80px auto;
    align-items: center;
    gap: 0;
}

.testo_con_immagine .colonna-testo {
    padding: 40px;
    box-sizing: border-box;
}

.testo_con_immagine .colonna-testo p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.testo_con_immagine .colonna-testo strong {
    color: #e21516;
    font-weight: 700;
}

.testo_con_immagine .colonna-testo a {
    color: #e21516;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.testo_con_immagine .colonna-testo a:hover {
    border-bottom-color: #e21516;
}

.testo_con_immagine .colonna-immagine {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.testo_con_immagine .colonna-immagine:hover {
    transform: translateY(-5px);
}

.testo_con_immagine .colonna-immagine img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.testo_con_immagine .colonna-immagine:hover img {
    transform: scale(1.03);
}

/* Responsive adjustments */
@media screen and (min-width: 35.5em) {
    .testo_con_immagine {
        padding: 0 20px;
    }

    .testo_con_immagine .colonna-testo {
        padding-right: 60px;
    }
}

@media screen and (max-width: 35.5em) {
    .testo_con_immagine {
        margin: 40px auto;
    }

    .testo_con_immagine .colonna-testo {
        padding: 20px;
        text-align: center;
    }

    .testo_con_immagine .colonna-immagine {
        margin: 20px;
    }
}

/* =======================
   Section: Form Redesign
   ======================= */
#richiedi-valutazione-gratuita {
    position: absolute;
    top: -80px;
    left: 0;
}

div.ccm-page .richiedi-valutazione-gratuita {
    padding: 80px 20px;
    position: relative;
}

div.ccm-page .richiedi-valutazione-gratuita h2 {
    text-align: center;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

div.ccm-page .richiedi-valutazione-gratuita>p {
    text-align: center;
    color: #555;
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

div.ccm-page .richiedi-valutazione-gratuita a {
    color: #e21516;
}

div.ccm-page .richiedi-valutazione-gratuita form {
    background: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-wrap: wrap;
    gap: 4%;
}

div.ccm-page .richiedi-valutazione-gratuita .form-group {
    margin-bottom: 25px;
    width: 30.33333%;
}

div.ccm-page .richiedi-valutazione-gratuita label.control-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 17px;
}

div.ccm-page .richiedi-valutazione-gratuita .text-muted.small {
    color: #e21516;
    float: right;
    margin-top: -30px;
    font-weight: 500;
}

div.ccm-page .richiedi-valutazione-gratuita .form-control {
    width: 100%;
    padding: 9px 20px;
    line-height: 1.5;
    color: #495057;
    background-color: #f8f9fa;
    background-clip: padding-box;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: auto;
    font-size: 17px;
}

div.ccm-page .richiedi-valutazione-gratuita .form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #e21516;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(226, 21, 22, 0.1);
}

div.ccm-page .richiedi-valutazione-gratuita textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

div.ccm-page .richiedi-valutazione-gratuita .form-group[data-type="privacy"] label.control-label {
    order: 2;
    flex: 1;
    font-size: 15px;
    text-transform: none;
    font-weight: normal;
    margin: 0;
    margin-left: 10px;
}

div.ccm-page .richiedi-valutazione-gratuita .form-group[data-type="privacy"] {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

div.ccm-page .richiedi-valutazione-gratuita .form-group[data-type="privacy"]>span {
    width: 100%;
    margin: 0;
    margin-bottom: 5px;
}

div.ccm-page .richiedi-valutazione-gratuita .form-actions {
    text-align: center;
    width: 100%;
}

div.ccm-page .richiedi-valutazione-gratuita button {
    background: #E21516;
    color: white;
    border: none;
    padding: 12px 50px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(226, 21, 22, 0.3);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 18px;
    max-width: 33.3333%;
}

div.ccm-page .richiedi-valutazione-gratuita button:hover {
    background: #c41213;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(226, 21, 22, 0.4);
}

div.ccm-page .richiedi-valutazione-gratuita button:active {
    transform: translateY(1px);
}

/* File input styling tweak */
div.ccm-page .richiedi-valutazione-gratuita input[type="file"] {
    padding: 10px 0;
    background: transparent;
    border: none;
}

div.ccm-page .richiedi-valutazione-gratuita form>.alert {
    width: 100%;
    border-radius: 10px;
}

div.ccm-page .richiedi-valutazione-gratuita .form-group.captcha {
    display: none;
}

@media screen and (max-width: 908px) {
    div.ccm-page .richiedi-valutazione-gratuita .form-group {
        width: 48%;
    }

    div.ccm-page .richiedi-valutazione-gratuita button {
        max-width: 50%;
    }
}

@media screen and (max-width: 620px) {
    div.ccm-page .richiedi-valutazione-gratuita .form-group {
        width: 100%;
    }

    div.ccm-page .richiedi-valutazione-gratuita form {
        padding: 20px;
    }

    div.ccm-page .richiedi-valutazione-gratuita button {
        max-width: 100%;
    }
}

/* =======================
   Popup Styles
   ======================= */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    overflow: auto;
    padding: 20px 0;
}

.popup-content {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: popupSlideIn 0.3s ease-out;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.popup-close:hover {
    color: #333;
}

.popup-content h3 {
    margin-top: 0;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
}

.popup-content p {
    color: #666;
    margin-bottom: 25px;
}

div.ccm-page .richiedi-valutazione-gratuita .popup-content .form-group {
    width: 100%;
}

div.ccm-page .richiedi-valutazione-gratuita .popup-content button {
    max-width: 100%;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 48em) {
    .popup-overlay {
        align-items: flex-start;
    }
}