* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #1a1a1a;
    --primary-white: #ffffff;
    --grey-light: #f5f5f5;
    --grey-medium: #888888;
    --grey-dark: #333333;
    --accent-color: #e07434;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--primary-black);
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    background: transparent;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--primary-white);
    text-decoration: none;
    transition: var(--transition);
}

.navbar.scrolled .logo {
    color: var(--primary-black);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary-white);
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.3px;
    position: relative;
    transition: var(--transition);
}

.navbar.scrolled .nav-menu a {
    color: var(--primary-black);
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-white);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.navbar.scrolled .mobile-menu-toggle span {
    background: var(--primary-black);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
      position: absolute;
      top: 70px;
      right: 20px;
      width: 250px;
      background: rgba(255,255,255,0.95);
      backdrop-filter: blur(15px);
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: 15px 0;
      border-radius: 12px;

      /* effetto slide-down */
      transform: translateY(-100%);
      opacity: 0;
      transition: transform 0.4s ease, opacity 0.4s ease;

      /* 🔹 blocca i click quando è chiuso */
      pointer-events: none;
    }

    .navbar.scrolled .nav-menu {
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-menu.active {
      transform: translateY(0);
      opacity: 1;

      /* 🔹 riattiva i click quando è aperto */
      pointer-events: auto;
    }

    .nav-menu li {
      text-align: left;
      padding: 12px 20px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .navbar.scrolled .nav-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-menu a {
      display: block;
      color: var(--primary-black);
      font-size: 16px;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.7) 0%, rgba(26, 26, 26, 0.3) 100%),
                url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkyMCIgaGVpZ2h0PSIxMDgwIiB2aWV3Qm94PSIwIDAgMTkyMCAxMDgwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB3aWR0aD0iMTkyMCIgaGVpZ2h0PSIxMDgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxyZWN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size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    text-align: center;
    color: var(--primary-white);
    max-width: 900px;
    padding: 0 50px;
    animation: fadeInUp 1.2s ease-out;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 100;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 30px;
}

.hero-title strong {
    font-weight: 700;
}

.hero-description {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.85;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-white);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-white);
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-indicator::before {
    content: '';
    display: block;
    width: 1px;
    height: 50px;
    background: transparent;
    margin: 0 auto 15px;
    opacity: 0.5;
}

/* About Section */
.about-section {
    padding: 120px 50px;
    background: var(--primary-white);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 100;
    letter-spacing: -1px;
    color: var(--primary-black);
    margin-bottom: 30px;
}

.section-title strong {
    font-weight: 700;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--grey-dark);
}

.about-text p {
    margin-bottom: 25px;
}

.about-features {
    display: grid;
    gap: 30px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--grey-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-black);
}

.feature-content p {
    color: var(--grey-medium);
    line-height: 1.6;
}

/* Projects Section */
.projects-section {
    padding: 120px 0;
    background: var(--grey-light);
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 100px;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 100;
    letter-spacing: -1px;
    color: var(--primary-black);
    margin-bottom: 30px;
}

.section-title strong {
    font-weight: 700;
}

/* Modern Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(4, 300px);
    gap: 20px;
    margin-bottom: 80px;
}

/* Project Cards with Different Sizes */
.project-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: var(--primary-white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

/* Large Feature Project */
.project-item:nth-child(1) {
    grid-column: 1 / 8;
    grid-row: 1 / 3;
}

/* Medium Projects */
.project-item:nth-child(2) {
    grid-column: 8 / 13;
    grid-row: 1 / 2;
}

.project-item:nth-child(3) {
    grid-column: 8 / 13;
    grid-row: 2 / 3;
}

/* Bottom Row - Different Heights */
.project-item:nth-child(4) {
    grid-column: 1 / 6;
    grid-row: 3 / 5;
}

.project-item:nth-child(5) {
    grid-column: 6 / 10;
    grid-row: 3 / 4;
}

.project-item:nth-child(6) {
    grid-column: 10 / 13;
    grid-row: 3 / 4;
}

/* Additional small items */
.project-item:nth-child(7) {
    grid-column: 6 / 8;
    grid-row: 4 / 5;
}

.project-item:nth-child(8) {
    grid-column: 8 / 13;
    grid-row: 4 / 5;
}

.project-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: var(--transition);
}

/* Overlay Effects */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.8) 0%,
        rgba(212, 165, 116, 0.6) 100%
    );
    opacity: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-item:hover .project-image {
    transform: scale(1.05);
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

/* Content Positioning */
.project-quick-info {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    color: var(--primary-white);
    opacity: 1;
    transition: var(--transition);
    z-index: 2;
}

.project-category {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.project-title {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.project-location {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

/* Detailed Info on Hover */
.project-detailed-info {
    color: var(--primary-white);
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
    transition-delay: 0.2s;
}

.project-item:hover .project-detailed-info {
    opacity: 1;
    transform: translateY(0);
}

.project-item:hover .project-quick-info {
    transform: translateY(-20px);
}

.project-description {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.project-specs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.project-area {
    font-weight: 600;
}

.project-year {
    opacity: 0.8;
}

/* CTA Button */
.portfolio-cta {
    text-align: center;
    margin-top: 60px;
}

.cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: transparent;
    color: var(--primary-black);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 14px;
    border: 2px solid var(--primary-black);
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-black);
    transition: var(--transition);
    z-index: -1;
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:hover {
    color: var(--primary-white);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(8, 1fr);
        grid-template-rows: repeat(6, 250px);
    }

    .project-item:nth-child(1) {
        grid-column: 1 / 9;
        grid-row: 1 / 3;
    }

    .project-item:nth-child(2) {
        grid-column: 1 / 5;
        grid-row: 3 / 4;
    }

    .project-item:nth-child(3) {
        grid-column: 5 / 9;
        grid-row: 3 / 4;
    }

    .project-item:nth-child(4) {
        grid-column: 1 / 5;
        grid-row: 4 / 6;
    }

    .project-item:nth-child(5) {
        grid-column: 5 / 9;
        grid-row: 4 / 5;
    }

    .project-item:nth-child(6) {
        grid-column: 5 / 9;
        grid-row: 5 / 6;
    }

    .project-item:nth-child(7) {
        grid-column: 1 / 5;
        grid-row: 6 / 7;
    }

    .project-item:nth-child(8) {
        grid-column: 5 / 9;
        grid-row: 6 / 7;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(8, 300px);
        gap: 15px;
    }

    .project-item:nth-child(n) {
        grid-column: 1;
        grid-row: auto;
    }

    .project-item:nth-child(1) {
        grid-row: span 2;
    }

    /* Mobile Click Interaction */
    .project-item.active .project-overlay {
        opacity: 1;
    }

    .project-item.active .project-detailed-info {
        opacity: 1;
        transform: translateY(0);
    }

    .project-item.active .project-quick-info {
        transform: translateY(-20px);
    }
}

/* Parallax Effect for Large Project */
.project-item:nth-child(1) .project-image {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .project-item:nth-child(1) .project-image {
        background-attachment: scroll;
    }
}

/* Staggered Animation on Load */
.project-item {
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease forwards;
}

.project-item:nth-child(1) { animation-delay: 0.1s; }
.project-item:nth-child(2) { animation-delay: 0.2s; }
.project-item:nth-child(3) { animation-delay: 0.3s; }
.project-item:nth-child(4) { animation-delay: 0.4s; }
.project-item:nth-child(5) { animation-delay: 0.5s; }
.project-item:nth-child(6) { animation-delay: 0.6s; }
.project-item:nth-child(7) { animation-delay: 0.7s; }
.project-item:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Section */
.contact-section {
    padding: 120px 50px;
    background: var(--primary-white);
    color: var(--primary-black);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-top: 60px;
}

.contact-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary-white);
}

.contact-item {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-item-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

.contact-form {
    display: grid;
    gap: 0px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-color);
}

.form-group input,
.form-group textarea {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--primary-black);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.02);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--primary-black);
    font-size: 16px;
    transition: var(--transition);
}

.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.05);
}

.submit-button {
    padding: 18px 40px;
    background: var(--accent-color);
    color: var(--primary-white);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    justify-self: start;
    margin-top: 10px;
}

.submit-button:hover {
    background: #c19660;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    padding: 40px 50px;
    background: var(--primary-black);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--grey-medium);
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .nav-menu {
        display: flex;
    }

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

    .about-section,
    .projects-section,
    .contact-section {
        padding: 80px 20px;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

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

    .section-header {
        margin-bottom: 60px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--grey-light);
}

::-webkit-scrollbar-thumb {
    background: var(--grey-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.hero-button {
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .about-section,
    .projects-section,
    .contact-section,
    .hero {
        background-attachment: scroll !important;
    }
}

/* 👇 aggiungi dopo gli altri @media (max-width: 768px) */
@media (max-width: 768px) {
  /* testi più piccoli e ariosi */
  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 10px;
  }
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  .hero-description {
    font-size: 16px;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .section-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  .section-subtitle {
    font-size: 12px;
  }
  .about-text {
    font-size: 16px;
    line-height: 1.6;
  }
  .feature-content h3 {
    font-size: 18px;
  }
  .feature-content p {
    font-size: 14px;
  }

  /* padding più equilibrato */
  .about-section,
  .projects-section,
  .contact-section {
    padding: 60px 15px;
  }

  /* immagini/lay-out più fluidi */
  .about-grid {
    gap: 30px;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
  }
  .project-item {
    height: auto;
    min-height: 250px;
  }
  .project-image {
    height: 200px;
  }

  /* pulsanti più centrati */
  .cta-button {
    padding: 14px 30px;
    font-size: 13px;
  }

  /* footer più compatto */
  .footer {
    padding: 30px 15px;
  }
}

@media (max-width: 768px) {
  /* disattiva la barra sopra */
  .scroll-indicator::before {
    content: none;
  }

  /* crea la barra sotto */
  .scroll-indicator::after {
    content: '';
    display: block;
    width: 1px;
    height: 50px;
    background: var(--primary-white);
    margin: 15px auto 0; /* margine sopra la barra */
    opacity: 0.5;
  }
}

@media (max-width: 768px) {
  /* box del progetto a piena larghezza e altezza automatica */
  .project-item {
    height: auto;
    min-height: 250px; /* altezza minima */
  }

  /* immagine come sfondo ritagliato (cover) e centrato */
  .project-image {
    width: 100%;
    height: 250px; /* altezza fissa per uniformità */
    background-size: cover !important;
    background-position: center center !important;
  }
}

.fab {
  position: fixed;
  right: 20px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  z-index: 2000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.fab svg {
  width: 24px;
  height: 24px;
}

.fab:hover {
  transform: scale(1.1);
}

/* WhatsApp (verde) */
.fab-whatsapp {
  bottom: 90px; /* sopra il telefono */
  background-color: var(--accent-color); /* dorato/beige */
  color: var(--primary-white);
}

/* Telefono (blu) */
.fab-phone {
  bottom: 20px; /* più in basso */
  background-color: var(--primary-black); /* nero */
  color: var(--primary-white);
}

.fab:hover {
  transform: scale(1.1);
  filter: brightness(1.1); /* leggero effetto hover */
}

.nav-menu a.active {
    color: var(--accent-color) !important;
}
.nav-menu a.active::after {
    width: 100%;
}

/* forza colore arancione anche dopo lo scroll */
.navbar .nav-menu a:hover,
.navbar .nav-menu a:focus {
  color: var(--accent-color) !important;
}

@media (max-width: 768px) {
  /* Testi principali */
  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .hero-title {
    font-size: 2rem; /* simile alla versione desktop in proporzione alla larghezza */
    line-height: 1.2;
  }

  .hero-description {
    font-size: 16px;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .section-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .section-subtitle {
    font-size: 12px;
  }

  .about-text {
    font-size: 16px;
    line-height: 1.6;
  }

  .feature-content h3 {
    font-size: 18px;
  }

  .feature-content p {
    font-size: 14px;
  }

  /* Padding più equilibrato */
  .about-section,
  .projects-section,
  .contact-section {
    padding: 60px 15px;
  }

  /* Portfolio Grid: a piena larghezza e altezza adattiva */
  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
  }

  .project-item {
    height: auto;
    min-height: 250px;
  }

  .project-image {
    width: 100%;
    height: 250px;
    background-size: cover !important;
    background-position: center center !important;
  }

  /* Pulsanti */
  .cta-button {
    padding: 14px 30px;
    font-size: 13px;
  }

  /* FOOTER */
  .footer {
      font-size: 13px;
  }
}
