/* Hero Section */
.hero {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: var(--header-height) 0 0 0;
    /* Account for fixed header without extra space */
    background-color: var(--bg-light);
}

.hero-card {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 0;
    display: flex;
    align-items: center;
}

/* immagine */
.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* overlay scuro */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.55) 40%,
            rgba(0, 0, 0, 0.1) 70%,
            rgba(0, 0, 0, 0) 100%);
}

/* fascio arancione rimosso */

/* contenuto */
.hero-container {
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero .hero-content {
    position: relative;
    color: white;
    max-width: 600px;
    padding: 80px 0;
    text-align: left;
    /* Reset text align */
}

/* titolo */
.hero .hero-content h1 {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 18px;
    text-transform: none;
    /* Reset if needed */
}

/* testo */
.hero .hero-content p {
    font-size: 17px;
    line-height: 1.5;
    opacity: .9;
    margin-bottom: 30px;
}

/* CTA */
.hero-btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.3s;
}

.hero-btn:hover {
    background: #e65100;
    /* Darker orange */
}

/* responsive */
@media (max-width: 768px) {
    .hero-card {
        height: 520px;
    }

    .hero .hero-content {
        padding: 40px 0;
    }

    .hero .hero-content h1 {
        font-size: 34px;
    }

    /* .hero-accent {
        width: 60%;
    } */
}

/* Chi Siamo */
.about-wrapper {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 20px 0;
}

.about-image-wrapper {
    flex: 1;
    position: relative;
    padding-right: 30px;
    padding-bottom: 30px;
}

.main-image {
    position: relative;
    z-index: 2;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    aspect-ratio: 1/1;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stats-card {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #fff;
    padding: 25px;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 3;
    border: 2px solid var(--secondary-color);
    max-width: 200px;
    text-align: center;
}

.stats-card h4 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

/* Circular Progress Bar */
.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

.circular-chart.orange .circle {
    stroke: var(--secondary-color);
}

.percentage {
    fill: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 0.5em;
    text-anchor: middle;
}

.circle-decoration {
    position: absolute;
    top: -30px;
    left: -30px;
    width: 200px;
    height: 200px;
    border: 20px solid rgba(245, 124, 0, 0.05);
    border-radius: 0;
    z-index: 1;
}

/* About Text Content */
.about-text-content {
    flex: 1;
}

.sub-title {
    display: block;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.about-text-content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 800;
}

.about-text-content .description {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.feature-box {
    display: flex;
    gap: 15px;
}

.feature-box .icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    /* Icona arancione */
    min-width: 50px;
}

/* Rimuovi eventuali stili precedenti per icone dentro feature-box se necessario */
.feature-box .icon i {
    color: var(--secondary-color);
}

.feature-box .text h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
}

.feature-box .text p {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.5;
    margin-bottom: 0;
}

.about-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-video {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s;
}

.btn-video i {
    font-size: 2rem;
    margin-right: 10px;
    color: #ccc;
    transition: color 0.3s;
}

.btn-video:hover {
    color: var(--secondary-color);
}

.btn-video:hover i {
    color: var(--secondary-color);
}

@media (max-width: 992px) {
    .about-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .about-image-wrapper,
    .about-text-content {
        width: 100%;
        padding-right: 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* NUOVI SERVIZI LAYOUT (SOVRASCRITTI) */
.services-section {
    padding: 100px 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    color: var(--primary-color);
    text-transform: uppercase;
}

.bg-dark .section-title {
    color: #fff;
}

.section-subtitle {
    color: #666;
    font-size: clamp(16px, 2vw, 18px);
    margin-top: 15px;
}

/* Tabs Filtraggio */
.filter-container {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    padding: 0 5px;
}

.filter-nav {
    display: flex;
    background: #eeeef0;
    padding: 4px;
    border-radius: 0;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border: 1px solid #e5e7eb;
    max-width: 100%;
}

.filter-nav::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 14px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    cursor: pointer;
    border-radius: 0;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.6);
}

.filter-btn.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Griglia Servizi Nuova */
.services-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(5, 1fr);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Card Servizio Nuova */
.service-card {
    position: relative;
    height: 420px;
    background: #0f1115;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.service-card.hidden {
    display: none;
}

.service-card:hover,
.service-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
    outline: none;
}

.card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: grayscale(10%);
}

.service-card:hover .card-bg img {
    transform: scale(1.08);
    filter: grayscale(0%);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 17, 21, 0) 0%, rgba(15, 17, 21, 0.2) 40%, rgba(15, 17, 21, 0.95) 100%);
    z-index: 1;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    color: #fff;
}

.card-category {
    display: inline-block;
    background: rgba(245, 124, 0, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 124, 0, 0.4);
    padding: 3px 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    color: var(--secondary-color);
    border-radius: 0;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.service-card:hover .card-title {
    color: var(--secondary-color);
}

.card-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-card:hover .card-link {
    opacity: 1;
    transform: translateY(0);
    color: #fff;
}

/* Responsive Breakpoints Nuovi */
@media (max-width: 1280px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .services-section {
        padding-top: 40px;
    }

    .service-card {
        height: 380px;
    }
}

/* =========================================
   FAQ SECTION (Restored & Enhanced)
   ========================================= */
.faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--secondary-color, #f29100);
    color: #fff;
    font-weight: 700;
    transition: background 0.3s ease;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-family: var(--font-title, 'Montserrat', sans-serif);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    background: #fff;
    color: #555;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 20px 25px;
}

.faq-item.active .faq-question {
    background: var(--primary-color, #e65100);
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

/* Portfolio & Lightbox */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    aspect-ratio: 4/5;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Paginazione Galleria */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s, opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--secondary-color);
}

.page-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-num {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.page-num:hover:not(.active) {
    background-color: #f5f5f5;
    border-color: var(--primary-color);
}

.page-num.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-overlay i {
    transition: transform 0.3s ease;
}

/* Effetto Hover */
.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay i {
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .portfolio-grid {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .portfolio-grid {
        column-count: 1;
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: block;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    height: 50px;
    font-size: 18px;
    font-family: 'Montserrat', sans-serif;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

/* Lightbox Navigation Buttons */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    border-radius: 4px;
    z-index: 2010;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--secondary-color);
    color: white;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* responsive lightbox */
@media only screen and (max-width: 700px){
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 10px 15px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

/* =========================================
   CONTACTS SECTION (Restored Layout)
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
    margin-top: -30px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-right: 20px;
    border-right: 1px solid #eee;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color, #f29100);
    margin-bottom: 10px;
}

.info-item h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color, #111827);
    font-size: 1.1rem;
}

.info-item p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    color: var(--primary-color, #111827);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color, #f29100);
    color: #fff;
    transform: translateY(-3px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #f9fafb;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color, #f29100);
    box-shadow: 0 0 0 3px rgba(242, 145, 0, 0.1);
    background: #fff;
}

.btn-block {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    background: var(--secondary-color, #f29100);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s;
}

.btn-block:hover {
    background: var(--primary-color, #e65100);
}

.map-container {
    margin-top: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    .contact-info {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 30px;
    }
}