/* General Styles */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #212529;
}

section {
    scroll-margin-top: 70px;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

.navbar-light .navbar-nav .nav-link {
    color: #212529;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: #338a13;
}

/* Carousel */
.carousel-item {
    height: 65vh;
    min-height: 400px;
    background-color: #dee2e6;
}

.carousel-item img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    filter: brightness(0.8);
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: 1s;
    transition-property: opacity;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.carousel-caption {
    background: rgba(13, 43, 53, 0.85);
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    bottom: 3rem;
}

.carousel-caption h5 {
    color: #fff;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.carousel-caption p {
    color: #f8f9fa;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Hero Section */
.hero-home {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.hero-home h1 {
    color: #0d2b35;
}

.hero-home .lead {
    color: #6c757d;
    font-size: 1.25rem;
}

/* Feature Boxes */
.feature-box {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #338a13 0%, #4CAF50 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 2.5rem;
    color: white;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #0d2b35;
    font-weight: 700;
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #338a13 0%, #4CAF50 100%);
    border-radius: 2px;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.service-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .card-img-top {
    transform: scale(1.1);
}

.service-card .card-title {
    color: #0d2b35;
    font-weight: 600;
    font-size: 1.25rem;
}

.service-card .card-text {
    color: #6c757d;
    text-align: justify;
}

/* Portfolio Cards */
.portfolio-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.2) !important;
}

.portfolio-card .card-img-top {
    height: 280px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .card-img-top {
    transform: scale(1.05);
}

.portfolio-card .badge {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #338a13 0%, #4CAF50 100%);
    padding: 5rem 0;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #338a13 0%, #4CAF50 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(51, 138, 19, 0.3);
    background: linear-gradient(135deg, #2d7510 0%, #45a047 100%);
}

.btn-outline-primary {
    color: #338a13;
    border-color: #338a13;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #338a13;
    border-color: #338a13;
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(51, 138, 19, 0.2);
}

/* Profile Section */
.profile-image {
    border: 5px solid #338a13;
    transition: all 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 1rem 3rem rgba(51, 138, 19, 0.3);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #338a13 0%, #4CAF50 100%);
}

.timeline-item {
    position: relative;
    padding: 2rem 0;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
}

.contact-form .form-control,
.contact-form .form-select {
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: #338a13;
    box-shadow: 0 0 0 0.2rem rgba(51, 138, 19, 0.25);
}

/* Info Cards */
.info-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.info-card i {
    font-size: 3rem;
    color: #338a13;
    margin-bottom: 1rem;
}

.info-card h5 {
    color: #0d2b35;
    font-weight: 600;
    margin-bottom: 1rem;
}

.info-card p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Service Detail Page */
.service-detail-header {
    background: linear-gradient(135deg, #338a13 0%, #4CAF50 100%);
    color: white;
    padding: 5rem 0 3rem;
    margin-top: 56px;
}

.service-detail-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.service-detail-icon i {
    font-size: 3rem;
    color: white;
}

/* Modal Styles */
.modal-content {
    border-radius: 1rem;
}

.modal-header {
    background: linear-gradient(135deg, #338a13 0%, #4CAF50 100%);
    color: white;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body img {
    display: block;
    margin: 0 auto 1.5rem;
    max-width: 90%;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Footer */
footer,
footer.py-5,
footer.bg-dark {
    background-color: #00646a !important;
    color: #ffffff !important;
}

footer *,
footer p,
footer h5,
footer li,
footer span,
footer .text-muted,
footer .text-light,
footer .text-secondary {
    color: #ffffff !important;
}

footer a,
footer a:link,
footer a:visited,
footer a:hover,
footer a:active,
footer .social-links a {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .carousel-item {
        height: 50vh;
        min-height: 300px;
    }

    .carousel-caption h5 {
        font-size: 1.3rem;
    }

    .hero-home {
        padding: 3rem 0;
    }

    .hero-home h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::before {
        left: 0;
    }
}

/* Utility Classes */
.bg-gradient-primary {
    background: linear-gradient(135deg, #338a13 0%, #4CAF50 100%);
}

.text-gradient-primary {
    background: linear-gradient(135deg, #338a13 0%, #4CAF50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #338a13;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Header con immagine GIS - pagine interne */
.page-header {
  margin-top: 50px; /* altezza navbar fixed */
  padding: 4rem 1rem;
  background:
    linear-gradient(
      rgba(9, 95, 122, 0.35),
      rgba(9, 95, 122, 0.35)
    ),
    url("../img/header.png");
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 600;
}

.page-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}