/* Home — miglioramenti tablet (≈768px–1199px) */

/* Tipografia e padding sezioni: Zelio riduce ds-* solo sotto 768 */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .section-hero-1 .ds-2 {
    font-size: clamp(2.35rem, 5.2vw, 3.35rem) !important;
    line-height: 1.12 !important;
  }

  .section-service-1 .ds-3,
  .section-projects-1 .ds-3,
  .bm-home-plans .ds-3,
  .section-resume-1 .ds-3,
  .section-skills-1 .ds-3,
  .section-testimonials-1 .ds-3,
  .section-blog-1 .ds-3,
  .section-contact-1 .ds-3 {
    font-size: clamp(2rem, 3.8vw, 2.75rem) !important;
    line-height: 1.15 !important;
  }

  .section-hero-1 {
    padding-top: 7.5rem !important;
    padding-bottom: 4.5rem !important;
  }

  .section-service-1.pt-120,
  .section-projects-1.pt-120,
  .section-pricing-1.pt-120,
  .section-testimonials-1.pt-120,
  .section-blog-1.pt-120,
  .section-brands-1.section-padding,
  .section-skills-1.section-padding {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }

  .section-resume-1.pt-150,
  .section-contact-1.pt-150 {
    padding-top: 5rem !important;
  }

  .section-contact-1.pb-150 {
    padding-bottom: 5rem !important;
  }
}

/* Hero centrato: testo + search a tutta larghezza; foto laterale più discreta */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .section-hero-1 > .container > .row > .bm-hero-copy {
    max-width: 100%;
  }

  .section-hero-1 .shape-1 {
    inset-inline-start: auto !important;
    left: auto !important;
    right: 0.75rem !important;
    bottom: 0 !important;
    width: min(36vw, 300px);
    max-width: 34%;
    margin-left: 0 !important;
    transform: none !important;
    opacity: .55;
    pointer-events: none;
  }

  .section-hero-1 .shape-1 > img.filter-gray {
    width: 100%;
    height: min(48vh, 420px);
    max-height: min(48vh, 420px);
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: grayscale(0.25) contrast(1.08) brightness(1.05);
  }

  .section-hero-1 .shape-1 .ribbonRotate {
    max-width: 65%;
  }

  .section-hero-1 .brand-logo {
    width: 3rem;
    height: 3rem;
  }

  .section-hero-1 .btn {
    margin-bottom: 0.5rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .section-hero-1 .shape-1 {
    width: min(32vw, 260px);
    max-width: 30%;
    right: 0.5rem !important;
  }

  .section-hero-1 .shape-1 > img.filter-gray {
    height: min(42vh, 360px);
    max-height: min(42vh, 360px);
  }
}

/* Contatori: griglia 2×2 più compatta */
@media (min-width: 768px) and (max-width: 991.98px) {
  .section-static-1.py-8 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .section-static-1 .inner > .row {
    row-gap: 1.25rem;
    column-gap: 0;
  }

  .section-static-1 .counter-item-cover .content {
    justify-content: flex-start;
    padding-inline: 0.5rem;
  }

  .section-static-1 .ds-3.count {
    font-size: clamp(2rem, 5vw, 2.75rem) !important;
  }

  .section-static-1 .odometer.ds-1 {
    font-size: clamp(2rem, 5vw, 2.75rem) !important;
  }

  .section-static-1 .fs-5 {
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .section-static-1.py-8 {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }

  .section-static-1 .ds-3.count,
  .section-static-1 .odometer.ds-1 {
    font-size: clamp(2.1rem, 3.2vw, 2.85rem) !important;
  }
}

/* Servizi: meno aria verticale, testo senza spezzature inutili */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .section-service-1 .single-service-card-1 {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
  }

  .section-service-1 .service-card-details {
    gap: 0.75rem;
  }

  .section-service-1 .service-card-title {
    font-size: clamp(1.25rem, 2.4vw, 1.65rem) !important;
  }

  .section-service-1 .service-card-text {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .section-service-1 .ps-lg-10 {
    padding-left: 1rem !important;
  }
}

/* Piani: 2 colonne su tablet portrait, 3 compatte su landscape */
@media (min-width: 768px) and (max-width: 991.98px) {
  .bm-home-plans .bm-plans-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .bm-home-plans .bm-plan-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 28rem;
    justify-self: center;
    width: 100%;
  }

  .bm-home-plans .bm-plan-card {
    padding: 1.15rem !important;
  }

  .bm-home-plans .bm-plan-card [data-plan-price] {
    font-size: clamp(1.75rem, 4vw, 2.25rem) !important;
  }

  .bm-home-plans .bm-plan-card__features {
    max-height: 12rem;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .bm-home-plans .bm-plans-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .bm-home-plans .bm-plan-card [data-plan-price] {
    font-size: clamp(1.55rem, 2vw, 2rem) !important;
  }
}

/* Progetti: card e CTA più usabili su tablet */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .bm-projects-grid > .grid-sizer,
  .bm-projects-grid > .filter-item {
    width: 50%;
  }

  .bm-projects-grid .bm-project-card {
    margin: 0.4rem 0 0.7rem;
    padding: 0.6rem;
  }

  .bm-projects-grid .project-card-content h3 {
    font-size: 0.95rem;
  }

  .fillter-project .filter-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .fillter-project .btn-filter {
    margin: 0 !important;
  }

  .button-project {
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-bottom: 5rem !important;
    overflow: hidden;
  }

  .button-project .ellipse {
    max-width: 100%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Esperienza / contact: evita spill orizzontale decorativo */
@media (max-width: 1199.98px) {
  .section-resume-1,
  .section-contact-1,
  .section-projects-1,
  .fillter-project {
    overflow-x: clip;
  }

  .section-resume-1 .resume-card {
    margin-bottom: 1.25rem;
  }
}

/* Skills: card un po' più compatte */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .bm-skills__grid {
    gap: 1rem;
  }

  .bm-skill-card {
    padding: 1.2rem 0.9rem 1.1rem;
  }

  .bm-skill-card__ring {
    width: 92px;
    height: 92px;
  }

  .bm-skill-card__pct {
    font-size: 1.35rem;
  }

  .bm-skill-card__name {
    font-size: 0.98rem;
  }
}

/* Blog: 2 colonne su tablet invece di una sola colonna lunga */
@media (min-width: 768px) and (max-width: 991.98px) {
  .section-blog-1 .row.mt-8 > .col-lg-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Testimonials / brands: spacing */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .section-testimonials-1 .pb-120 {
    padding-bottom: 5rem !important;
  }
}
