/* Responsive Styles - Mobile & Tablet */

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  /* Header Mobile */
  header {
    height: 60px;
  }

  nav {
    padding: 0.75rem 4%;
    min-height: 60px;
  }

  .logo {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .mobile-menu-toggle {
    display: block;
    font-size: 1.8rem;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-toggle:active {
    transform: scale(0.9);
  }

  .nav-links {
    position: fixed;
    top: 60px;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 60px);
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 0;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.05rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    display: block;
  }

  .nav-links a:hover,
  .nav-links a:focus {
    color: #8b7355;
    padding-left: 0.5rem;
    background-color: rgba(139, 115, 85, 0.05);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  /* General Mobile Adjustments */
  .hero,
  .content-section,
  .gallery,
  .services-section,
  .contact-form-section,
  .about-section,
  .info-section,
  .values-section,
  footer {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Home Page Hero Mobile */
  .hero {
    margin-top: 60px;
    min-height: 70vh;
    height: auto;
    padding: 0;
  }

  .hero-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 2rem;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    text-align: center;
  }

  .hero-content > div {
    margin-bottom: 1.5rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
  }

  .hero-content .tagline {
    font-size: 1.1rem;
    margin-left: 0;
    display: block;
    margin-top: 0.5rem;
  }

  .hero-content .btn {
    margin-top: 0;
    padding: 0.9rem 2rem;
    font-size: 0.85rem;
  }

  /* Hero with Grid (Chi Siamo, Materiali, Contatti) */
  .hero .hero-container {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .hero .hero-container > div:has(.hero-image) {
    order: 1;
  }

  .hero .hero-content {
    order: 2;
    padding: 2.5rem 1.5rem;
  }

  .hero-image {
    max-height: 40vh;
    object-fit: cover;
    border-radius: 0;
    width: 100%;
  }

  /* Hero tessuti */
  .hero-tessuti {
    margin-top: 60px;
    min-height: 41vh;
    height: auto;
    padding: 0;
  }

  .hero-tessuti .hero-container {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }
  .hero-tessuti .hero-container > div:has(.hero-image) {
      order: 1;
  }

  .hero-tessuti .hero-content {
      order: 2;
      padding: 2.5rem 1.5rem;
  }

  .hero-tessuti .hero-image {
      max-height: 40vh;
      object-fit: cover;
      border-radius: 0;
      width: 100%;
  }


    

  /* Content & Services Sections */
  .content-container,
  .services-container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .content-section {
    height: auto;
    min-height: auto;
  }

  .content-container {
    display: flex;
    flex-direction: column;
  }

  .content-text {
    padding: 2.5rem 1.5rem;
    min-height: auto;
    order: 1;
  }

  .content-text h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .content-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .content-text .btn {
    margin-top: 1rem;
  }

  .content-image-container {
    min-height: 350px;
    max-height: 50vh;
    order: 2;
  }

  .services-section {
    height: auto;
    min-height: auto;
    padding: 0;
  }

  .services-container {
    display: flex;
    flex-direction: column;
  }

  .services-container h2 {
    padding: 1.5rem;
    margin: 0;
    margin-top: 1.5rem;
  }

  .services-content {
    padding: 2.5rem 1.5rem;
    min-height: auto;
    order: 1;
  }

  .services-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .services-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .services-content .btn {
    margin-top: 1rem;
  }

  .services-image-container {
    min-height: 350px;
    max-height: 50vh;
    order: 2;
  }

  /* About Section */
  .about-section {
    height: auto;
    min-height: auto;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 0;
    display: flex;
    flex-direction: column;
  }

  .about-text {
    padding: 2.5rem 1.5rem;
    min-height: auto;
    order: 1;
  }

  .about-text h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .about-text p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .about-image-container {
    min-height: 350px;
    max-height: 50vh;
    order: 2;
  }

  /* Info Section (Contatti) */
  .info-section {
    height: auto;
    min-height: auto;
    margin-top: 60px;
  }

  .info-container {
    grid-template-columns: 1fr;
    gap: 0;
    display: flex;
    flex-direction: column-reverse;
    overflow-y: hidden;
  }

  .info-content {
    padding: 2.5rem 1.5rem;
    min-height: auto;
    order: 1;
  }

  .info-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .info-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .info-image {
    min-height: 350px;
    max-height: 50vh;
    order: 2;
    object-fit: cover;
    width: 100%;
  }

  /* Values Section (Chi Siamo) */
  .values-section {
    height: auto;
    min-height: auto;
  }

  .values-container {
    grid-template-columns: 1fr;
    gap: 0;
    display: flex;
    flex-direction: column;
  }

  .values-content {
    padding: 2.5rem 1.5rem;
    min-height: auto;
    order: 1;
  }

  .values-content h3 {
    font-size: 0.85rem;
  }

  .values-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .values-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .values-image {
    min-height: 350px;
    max-height: 50vh;
    order: 2;
    object-fit: cover;
    width: 100%;
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .service-item {
    padding: 0;
  }

  .service-item img {
    height: 250px;
    width: 100%;
    border-radius: 0;
    margin-bottom: 0;
  }

  .service-item p {
    padding: 1.5rem;
  }

  /* Contact Form */
  .contact-form-section {
    padding: 2.5rem 1.5rem;
  }

  .contact-form-container h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .contact-form-container p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .gallery-item {
    height: 280px;
  }

  /* Buttons & Forms */
  .btn {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
  }

  .btn:focus,
  button:focus,
  input:focus,
  textarea:focus {
    outline: 2px solid #8b7355;
    outline-offset: 2px;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 16px;
    padding: 0.9rem;
    border-radius: 8px;
  }

  textarea {
    min-height: 120px;
  }

  button[type="submit"] {
    width: 100%;
    padding: 1.1rem;
    font-size: 0.95rem;
    min-height: 48px;
  }

  .btn {
    min-height: 44px;
    padding: 0.85rem 1.75rem;
  }

  /* Footer */
  footer {
    padding: 2rem 4% 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .footer-section h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
  }

  .footer-section p,
  .footer-section a {
    font-size: 0.85rem;
  }

  .footer-nav {
    gap: 0.75rem;
  }
}

/* Extra Small Devices */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.9rem;
    letter-spacing: 0.5px;
  }

  .hero-content .tagline {
    font-size: 1rem;
  }

  .content-text h2,
  .services-content h2,
  .contact-form-container h2,
  .about-text h2,
  .info-content h2,
  .values-content h2 {
    font-size: 1.5rem;
  }

  .values-content h3 {
    font-size: 0.8rem;
  }

  .content-text,
  .services-content,
  .about-text,
  .info-content,
  .values-content {
    margin-top: 1rem;
    padding: 2rem 1.25rem;
  }

  .contact-form-section {
    padding: 2rem 1.25rem;
  }

  .service-item img {
    height: 220px;
  }
}
