@media screen and (min-width: 768px) {
  .hamburger,
  .header-right .theme-toggle {
    display: none;
  }

  .nav {
    display: block;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .theme-toggle-desktop {
    display: block;
  }
}

@media screen and (max-width: 767px) {
  /* Header Adjustments */
  header {
    padding: 0.8rem 1rem;
    position: relative;
  }

  .logo {
    width: 50px;
  }

  .theme-toggle-desktop {
    display: none;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
  }

  .nav {
    position: fixed;
    top: -100vh;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--header-bg);
    transition: all 0.3s ease-in-out;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
  }

  .theme-toggle {
    z-index: 1000;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1000;
  }

  .hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Removed duplicate .nav class */

  .nav.active {
    top: 0;
    visibility: visible;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
    gap: 2rem;
    margin: 0;
    list-style: none;
  }

  .nav-list a {
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 1;
  }

  .nav-list a:hover {
    color: #3052a3;
  }

  .nav-list li {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  }

  .nav.active .nav-list li {
    opacity: 1;
    transform: translateY(0);
  }

  /* Delay for each menu item */
  .nav-list li:nth-child(1) {
    transition-delay: 0.1s;
  }
  .nav-list li:nth-child(2) {
    transition-delay: 0.2s;
  }
  .nav-list li:nth-child(3) {
    transition-delay: 0.3s;
  }
  .nav-list li:nth-child(4) {
    transition-delay: 0.4s;
  }
  .nav-list li:nth-child(5) {
    transition-delay: 0.5s;
  }
  .nav-list li:nth-child(6) {
    transition-delay: 0.6s;
  }

  /* Overlay when menu is open */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

  .nav-overlay.active {
    display: block;
  }

  /* Hero Section Adjustments */
  .hero {
    height: 40rem;
  }

  .hero-video,
  .hero-overlay {
    height: 60%;
  }

  .hero-content {
    top: 20%;
  }

  .changing-text {
    font-size: 2rem;
  }

  /* Card Container Adjustments */
  .card-container {
    display: grid;
    grid-template-columns: 1fr;
    margin-inline: 1rem;
    margin-top: -20rem;
    margin-bottom: 5rem;
  }

  .card-content {
    padding: 1.5rem;
    gap: 0.8rem;
  }

  .card-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
  }

  .card-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .card-content button {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }

  .card-container .image-section {
    height: 200px;
  }

  .card-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 0 1rem 1rem;
  }
  /* Counter Section Adjustments */
  .card-counter {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 20rem 0 1rem;
  }

  .counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    padding: 1rem;
  }

  .counter-item img {
    margin-bottom: 1rem;
    background-color: #123b9b;
    padding: 1rem;
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    object-fit: contain;
  }

  .counter-item h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
  }

  .counter-item p {
    font-size: 0.9rem;
    text-align: center;
    opacity: 0.8;
  }
  /* Register Card Mobile Styles */
  .register {
    padding: 2rem 1rem;
  }

  .card-register {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .card-register .card-content {
    padding: 1.5rem;
    text-align: center;
  }

  .card-register .card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .card-register .card-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .card-register .card-content button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
  }

  .card-register .image-section {
    height: 200px;
    order: -1;
  }

  .card-register img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Footer Responsive Styles */
  .footer-container {
    padding: 2rem 1rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-logo {
    width: 100%;
  }

  .footer-logo img {
    width: 100%;
  }

  .alamat-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .alamat {
    width: 100%;
    margin-right: 0;
    font-size: 0.9rem;
  }

  .footer-links {
    width: 100%;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .social-media {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
  }

  .social-icons {
    justify-content: center;
    margin-top: 0.5rem;
  }

  .footer-text {
    margin-top: 1.5rem;
    font-size: 0.8rem;
  }
  .scroll-to-top {
    display: none !important;
  }
}
@media screen and (max-width: 1200px) {
  .news-item {
    flex: 0 0 calc(50% - 10px);
  }
}

@media screen and (max-width: 768px) {
  .news-item {
    flex: 0 0 calc(100% - 20px);
  }
}
