:root {
    --primary-green: #4a7c6f;
    --header-green: #5a8f7d;
    --light-green: #6a9d8a;
    --services-green: #7aab98;
    --footer-dark: #3d5c52;
    --white: #ffffff;
    --yellow-accent: #c9a857;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Open Sans', 'Roboto', Arial, sans-serif;
    background-color: var(--primary-green);
    color: var(--white);
    line-height: 1.5;
}

/* ===================== NAVBAR ===================== */
.navbar-section {
    background-color: var(--header-green);
    padding: 15px 0 10px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.brand-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 0px;
    color: var(--white);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 8px;
}

    .brand-title a {
        color: var(--white);
        text-decoration: none;
    }

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 60px;
}

    .nav-menu a {
        color: var(--white);
        text-decoration: none;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.85;
        transition: opacity 0.3s;
        font-weight: 400;
    }

        .nav-menu a:hover, .nav-menu a.active {
            opacity: 1;
        }

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-accedi {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 0.7rem;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-decoration: none;
}

    .btn-accedi:hover {
        color: #e0e0e0;
    }

.btn-registrati {
    background-color: var(--white);
    color: var(--header-green);
    border: none;
    padding: 6px 18px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 0;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-decoration: none;
}

    .btn-registrati:hover {
        background-color: #f0f0f0;
        color: var(--header-green);
    }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}

    .user-info .username-link {
        color: var(--white);
        text-decoration: none;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .user-info .btn-esci {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.4);
        color: var(--white);
        font-size: 0.6rem;
        text-transform: uppercase;
        padding: 4px 12px;
        text-decoration: none;
        letter-spacing: 0.5px;
        transition: border-color 0.3s;
    }

        .user-info .btn-esci:hover {
            border-color: var(--white);
            color: var(--white);
        }

/* Hamburger per mobile */
.navbar-toggler-custom {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.4rem;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* ===================== FOOTER ===================== */
.site-footer {
    background-color: var(--footer-dark);
    padding: 25px 0;
    text-align: center;
}

    .site-footer span {
        font-size: 0.75rem;
        opacity: 0.7;
    }

    .site-footer a {
        color: var(--white);
        text-decoration: none;
    }

/* ===================== MODALI ===================== */
.modal-content {
    border-radius: 0;
}

.modal-header {
    background-color: var(--header-green);
    color: var(--white);
    border-radius: 0;
}

    .modal-header .btn-close {
        filter: invert(1);
    }

.modal-body {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.7;
}

    .modal-body a {
        color: var(--header-green);
    }

    .modal-body ul {
        padding-left: 20px;
        margin: 10px 0;
    }

        .modal-body ul li {
            margin-bottom: 5px;
        }

/* Tab area riservata */
.nav-tabs .nav-link {
    color: var(--header-green);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .nav-tabs .nav-link.active {
        font-weight: 600;
    }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .navbar-toggler-custom {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
        gap: 10px;
    }

        .nav-menu.show {
            display: flex;
        }

    .auth-buttons, .user-info {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        justify-content: center;
        margin-top: 12px;
    }
}


/* ===================== HERO SECTION ===================== */
.hero-section {
    background-color: var(--header-green);
    text-align: center;
    padding: 25px 0 0 0;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 80px;
    line-height: 1.35;
    letter-spacing: 1.5px;
    margin-top: 80px;
}

.hero-image-wrapper,
.hero-slideshow {
    width: 100%;
    overflow: hidden;
    max-height: 750px;
    height: 750px;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 750px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ===================== SERVICES SECTION ===================== */
.services-section {
    background-color: var(--services-green);
    padding: 45px 0 30px;
}

.service-item {
    text-align: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .service-item:hover {
        transform: translateY(-4px);
    }

.service-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .service-icon svg {
        width: 55px;
        height: 55px;
        stroke: var(--white);
        fill: none;
        stroke-width: 1.2;
    }

.service-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.5px;
    line-height: 1.5;
    color: var(--white);
    text-decoration: none;
}

    .service-title:hover {
        color: var(--yellow-accent);
    }

.divider {
    border: none;
    border-top: 1px solid rgb(255 255 255);
    margin: 25px auto 0;
    width: 92%;
}

/* ===================== TESTS SECTION ===================== */
.tests-section {
    background-color: var(--services-green);
    padding: 40px 0 60px;
}

.section-title-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    margin: 0 auto 20px;
    width: 92%;
}

.section-title {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    position: relative;
}

.title-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    margin: 15px auto 35px;
    width: 92%;
}

/* Grid Layout per Card */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Test Card */
.test-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
}

    .test-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.6);
    }

/* Card Image */
.test-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

    .test-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

.test-card:hover .test-card-image img {
    transform: scale(1.1);
}

/* Overlay sul Card */
.test-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.test-card:hover .test-card-overlay {
    opacity: 1;
}

.test-card-btn {
    background-color: var(--white);
    color: var(--header-green);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 12px 28px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

    .test-card-btn:hover {
        background-color: var(--yellow-accent);
        color: #1a1a1a;
        transform: scale(1.05);
    }

/* Card Body */
.test-card-body {
    padding: 20px;
    text-align: center;
}

.test-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
    color: var(--white);
    line-height: 1.3;
}

.test-card-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
}

/* ===================== CONTACT SECTION ===================== */
.contact-section {
    background-color: var(--services-green);
    padding: 35px 0 45px;
}

.contact-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    margin: 0 auto 30px;
    width: 92%;
}

.contact-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 25px;
    color: var(--yellow-accent);
    text-align: center;
}

.contact-text {
    font-size: 0.82rem;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 30px;
    opacity: 0.95;
    font-weight: 400;
    padding: 0 20px;
    text-align: center;
}

/* Contact Form */
.contact-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    border-radius: 0;
    font-size: 0.85rem;
}

    .contact-form .form-control::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    .contact-form .form-control:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--yellow-accent);
        color: var(--white);
        box-shadow: 0 0 0 0.2rem rgba(201, 168, 87, 0.25);
    }

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-send {
    background-color: var(--yellow-accent);
    color: #1a1a1a;
    border: none;
    padding: 10px 35px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.5px;
    border-radius: 0;
    transition: background 0.3s;
}

    .btn-send:hover {
        background-color: #b39441;
        color: #1a1a1a;
    }

.contact-info-item {
    font-size: 0.8rem;
    opacity: 0.85;
}

    .contact-info-item i {
        color: var(--yellow-accent);
        margin-right: 8px;
    }

    .contact-info-item a {
        color: var(--white);
        text-decoration: none;
    }

        .contact-info-item a:hover {
            color: var(--yellow-accent);
        }

/* ===================== MAP SECTION ===================== */
.map-section {
    background-color: var(--footer-dark);
    padding: 0;
}

    .map-section iframe {
        width: 100%;
        height: 350px;
        border: none;
        display: block;
    }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.4rem;
        padding: 0 15px;
    }

    .tests-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .test-card-image {
        height: 200px;
    }

    .service-item {
        margin-bottom: 15px;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .tests-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 2rem;
    }

    .tests-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* ===================== RICHIESTE UTENTE (modale) ===================== */
.richiesta-card {
    background: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-left: 4px solid #5a8f7d;
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s;
}

    .richiesta-card:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .richiesta-card .rc-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 8px;
    }

    .richiesta-card .rc-cod {
        font-weight: 700;
        font-size: 0.92rem;
        color: #3d5c52;
    }

    .richiesta-card .rc-tipo {
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 2px 8px;
        border-radius: 3px;
        background: #5a8f7d;
        color: #fff;
    }

    .richiesta-card .rc-body {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        font-size: 0.82rem;
        color: #555;
        margin-bottom: 10px;
    }

        .richiesta-card .rc-body .rc-field label {
            display: block;
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            color: #999;
            margin-bottom: 1px;
            font-weight: 600;
        }

        .richiesta-card .rc-body .rc-field span {
            font-weight: 500;
            color: #333;
        }

    .richiesta-card .rc-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
    }

    .richiesta-card .badge-stato {
        font-size: 0.72rem;
        padding: 3px 10px;
        border-radius: 3px;
        font-weight: 600;
    }

.badge-elaborazione {
    background: #ffeeba;
    color: #856404;
}

.badge-attesa {
    background: #bee5eb;
    color: #0c5460;
}

.badge-lavorazione {
    background: #cce5ff;
    color: #004085;
}

.badge-completato {
    background: #c3e6cb;
    color: #155724;
}

.badge-default {
    background: #e2e3e5;
    color: #383d41;
}

.richieste-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

    .richieste-empty i {
        font-size: 2.5rem;
        display: block;
        margin-bottom: 10px;
        opacity: 0.4;
    }

.bg-primary {
    background-color: var(--header-green) !important;
}

/* Button styles for modal */
.btn-primary {
    background-color: var(--header-green) !important;
    border-color: var(--header-green) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    color: #fff !important;
}

.btn-outline-primary {
    color: var(--header-green) !important;
    border-color: var(--header-green) !important;
}

.btn-outline-primary:hover {
    background-color: var(--header-green) !important;
    border-color: var(--header-green) !important;
    color: #fff !important;
}

/* ===============================================
   HERO SLIDESHOW STYLES
   =============================================== */

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Arrows */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.hero-nav:focus {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

/* Indicators (Dots) */
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.hero-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.hero-dot:focus {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.hero-dot.active {
    background: white;
    transform: scale(1.3);
}

/* Play/Pause Button */
.hero-play-pause {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.hero-play-pause:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.hero-play-pause:focus {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .hero-prev {
        left: 10px;
    }

    .hero-next {
        right: 10px;
    }

    .hero-indicators {
        bottom: 10px;
        gap: 8px;
    }

    .hero-dot {
        width: 12px;
        height: 12px;
    }

    .hero-play-pause {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
}
