/* Main CSS - Deferred loading */

/* Cards & Grids */
.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.servizio-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.servizio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.servizio-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.servizio-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.servizio-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: 1rem;
}

.servizio-cta {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Comuni */
.comuni-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.comune-tag {
    background: var(--white);
    border: 1px solid var(--gray-200);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--gray-700);
    transition: all 0.2s;
}

.comune-tag:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.comune-tag span {
    opacity: 0.6;
    font-size: 0.8rem;
}

.comuni-note {
    text-align: center;
    margin-top: 1.5rem;
}

.comuni-note a {
    color: var(--primary);
    font-weight: 600;
}

.comuni-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.comune-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.comune-card:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.comune-card .nome {
    display: block;
    font-weight: 600;
}

.comune-card .provincia,
.comune-card .servizio {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Trust Section */
.section-trust {
    background: var(--secondary);
    color: var(--white);
    padding: 3rem 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: center;
}

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

.trust-item .number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.trust-item span:last-child {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* CTA Section */
.section-cta {
    padding: 3rem 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.cta-box h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.cta-box p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Content Grid */
.content-grid {
    display: grid;
    gap: 2rem;
}

.content-main p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.content-main .lead-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.info-box .icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.info-box h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.info-box p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.info-box ul {
    list-style: none;
}

.info-box li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.info-emergency {
    background: #FEF2F2;
    border-color: #FECACA;
}

.info-emergency h4 {
    color: #DC2626;
}

.info-local {
    background: #ECFDF5;
    border-color: #A7F3D0;
}

.info-local h4 {
    color: #059669;
}

/* Sottoservizi */
.sottoservizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.sottoservizio-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.2s;
}

.sottoservizio-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.sottoservizio-card .icon {
    color: var(--primary);
    font-weight: bold;
    margin-right: 0.5rem;
}

.sottoservizio-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: inline;
}

.sottoservizio-card p {
    margin-top: 0.5rem;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.link-arrow {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.75rem;
}

/* Guasti */
.guasti-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.guasto-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.guasto-item .icon {
    font-size: 1.2rem;
}

/* Marche */
.marche-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.marca-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--gray-700);
}

/* FAQ */
.section-faq {
    background: var(--gray-50);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.25rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
}

.faq-item[open] summary::after {
    content: '-';
}

.faq-item p {
    padding: 0 1.25rem 1.25rem;
    color: var(--gray-500);
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand img {
    margin-bottom: 1rem;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    opacity: 0.8;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.6;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.footer-legal {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-legal a {
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .trust-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .content-grid {
        grid-template-columns: 2fr 1fr;
    }

    .cta-buttons {
        flex-direction: row;
    }

    .sottoservizi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .guasti-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 4rem 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .cta-box h2 {
        font-size: 2rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.servizio-card,
.sottoservizio-card,
.comune-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* Immagini Servizi */
.servizio-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    padding: 0 1.5rem;
}

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

.servizio-card {
    overflow: hidden;
}

/* Hero con Immagine */
.hero-servizio .hero-content,
.hero-servizio-combo .hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-servizio .hero-image,
.hero-servizio-combo .hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-servizio .hero-image img,
.hero-servizio-combo .hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .hero-servizio .hero-content,
    .hero-servizio-combo .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-servizio .hero-image,
    .hero-servizio-combo .hero-image {
        display: none;
    }
}
