/* Responsive adjustments for phones and desktops */
/* Make images scale */
img, .logo img {
  max-width: 100%;
  height: auto;
}

/* Global container tweaks for smaller viewports */
@media screen and (max-width: 990px) {
  .site-header .container {
    padding: 20px 15px;
  }
  .hero-slider .slides li {
    padding-top: 100px;
    min-height: 520px;
  }
  .hero-slider .slides .slide-title {
    font-size: 40px;
  }
  .hero-slider .slides .slide-desc {
    font-size: 1rem;
  }
  #branding .logo {
    max-width: 140px;
  }
}

@media screen and (max-width: 768px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Header / Nav */
  .site-header .container {
    padding: 15px 10px;
  }
  .menu-toggle {
    display: block;
  }
  .main-navigation .menu {
    display: none !important;
  }
  .mobile-navigation {
    display: block;
  }

  /* Hero */
  .hero-slider .slides li {
    padding-top: 80px;
    min-height: 420px;
  }
  .hero-slider .slides .slide-title {
    font-size: 28px;
    line-height: 1.1;
  }

  /* Certificates gallery */
  .gallerycert-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .gallerycert-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
  }

  /* CTA stacking */
  .cta-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin: 20px 0;
  }
  .cta-text {
    margin-right: 0;
    text-align: center;
  }
  .cta-button {
    display: flex;
    justify-content: center;
  }

  /* Photo slider: stop auto sliding on small screens and wrap */
  .photo-slide {
    display: flex;
    flex-wrap: wrap;
    animation: none;
    justify-content: center;
  }
  .photo-slide img {
    width: calc(50% - 20px);
    margin: 10px;
    height: 150px;
    object-fit: cover;
  }

  /* Subscribe form full width */
  .subscribe-form form input {
    width: 100%;
    height: 50px;
    box-sizing: border-box;
  }
  .subscribe-form form button {
    margin-left: 0;
    width: 100%;
    margin-top: 8px;
  }
}

@media screen and (max-width: 480px) {
  .gallerycert-container {
    grid-template-columns: 1fr;
  }
  .photo-slide img {
    width: 100%;
    height: auto;
    margin: 8px 0;
  }
  .hero-slider .slides .slide-title {
    font-size: 22px;
  }
  .hero-slider .slides li {
    min-height: 300px;
    padding-top: 60px;
  }
  .section-title {
    font-size: 1.5rem;
    padding-bottom: 20px;
  }
}
