/* ==========================================================================
   DIVETIME.IT - RESPONSIVE STYLES
   Adattamento per PC, Tablet e Smartphone
   ========================================================================== */

/* --- TABLET & DISPOSITIVI MOBILI (<= 1024px) --- */
@media (max-width: 1024px) {
  /* Mostra pulsante hamburger a sinistra */
  .hamburger-btn {
    display: flex;
    left: 16px;
  }

  /* Mostra pulsante cambio tema mobile a destra */
  .mobile-theme-toggle {
    display: inline-flex;
    right: 16px;
  }

  /* Nascondi il toggle tema desktop */
  .desktop-theme-toggle {
    display: none;
  }

  /* Nascondi il menu orizzontale su tablet e mobile */
  .main-menu {
    display: none;
  }

  .nav-bar {
    min-height: 60px;
  }

  /* Griglie: 2 colonne su tablet */
  .staff-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 24px;
    padding: 0 16px;
  }

  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 16px;
  }

  .gallery-landing-grid {
    gap: 24px;
    padding: 0 16px;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px;
  }

  .carousel-slide img {
    height: 420px;
  }

  /* Homepage Portal Cards su Tablet */
  .home-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .portal-card-courses,
  .portal-card-staff,
  .portal-card-gallery,
  .portal-card-calendar {
    grid-column: span 1;
  }

  .portal-card-contact {
    grid-column: span 2;
  }

  .home-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
}

/* --- SMARTPHONE (<= 767px) --- */
@media (max-width: 767px) {
  .site-main {
    padding: 10px 16px 30px 16px;
  }

  /* Homepage Portal Cards su Smartphone */
  .home-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .portal-card-courses,
  .portal-card-staff,
  .portal-card-gallery,
  .portal-card-calendar,
  .portal-card-contact {
    grid-column: span 1;
  }

  .home-portal-section {
    padding: 30px 14px 60px 14px;
    min-height: auto;
  }

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

  .portal-card {
    padding: 24px 20px;
  }

  /* Header e Logo compatti */
  .header-top {
    padding: 12px 16px 6px 16px;
  }

  .site-logo {
    width: var(--logo-mobile-max-width);
  }

  .wave-divider {
    height: 20px;
  }

  /* Titolo pagina */
  .page-title-wrapper {
    margin: 10px 0 24px 0;
  }

  /* Carosello su mobile */
  .hero-carousel-container {
    border-radius: var(--radius-md);
    margin-bottom: 25px;
  }

  .carousel-slide img {
    height: 280px;
  }

  .carousel-btn {
    width: 38px;
    height: 38px;
  }

  .carousel-btn svg {
    width: 18px;
    height: 18px;
  }

  .carousel-btn.prev {
    left: 10px;
  }

  .carousel-btn.next {
    right: 10px;
  }

  /* Griglia Staff e 3D Flip Card su Mobile */
  .staff-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 12px;
    padding: 0;
  }

  .flip-card {
    height: 350px;
  }

  .flip-card-front {
    padding: 14px 6px 8px 6px;
  }

  .flip-card-back {
    padding: 12px 10px;
  }

  .staff-name {
    font-size: 17px;
  }

  .bio-name {
    font-size: 18px;
  }

  .bio-text {
    font-size: 12px;
    line-height: 1.45;
  }

  .bio-tag {
    font-size: 10px;
    padding: 1px 6px;
  }

  /* Griglia Certificazioni */
  .cert-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    padding: 0;
  }

  /* Gallery */
  .gallery-categories-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-nav-pills {
    gap: 8px;
    margin-bottom: 25px;
  }

  .gallery-pill {
    padding: 8px 16px;
    font-size: 14px;
  }

  .album-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .album-cover-wrapper {
    height: 200px;
  }

  .album-modal-image {
    height: 220px;
  }

  .album-modal-body {
    padding: 20px 18px;
  }

  /* Contatti */
  .map-wrapper {
    min-height: 280px;
  }

  .map-wrapper iframe {
    min-height: 280px;
  }

  .contact-card {
    padding: 24px 18px;
  }

  .contact-actions {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .site-footer {
    padding: 24px 16px 30px 16px;
    gap: 16px;
  }

  .social-icon-btn {
    width: 44px;
    height: 44px;
  }

  .social-icon-btn svg {
    width: 20px;
    height: 20px;
  }

  .footer-copyright p {
    font-size: 15px;
  }
}

/* --- SMARTPHONE PICCOLI (<= 480px) --- */
@media (max-width: 480px) {
  .staff-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
  }

  .carousel-slide img {
    height: 220px;
  }

  .site-logo {
    width: 190px;
  }
}
