@media (max-width: 1400px) {
  .fty-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .fty-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  body {
    font-size: 15px;
  }
  .nav-container {
    padding: 0 1em;
  }

  .hamburger {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 4.37em;
    left: 0;
    right: 0;
    background-color: #ffffff;
    color: #000000;
    flex-direction: column;
    gap: 1em;
    padding: 1em 2em;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
  }
  .nav-links a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--whiteShade1);
    transition: width 0.3s ease;
    z-index: -1;
  }
  .nav-links a:hover {
    background-color: var(--baseShade1);
    color: var(--whiteShade1);
  }
  .nav-links a:hover:before {
    background-color: var(--baseShade1);
    color: white;
    width: 100%;
  }
  .nav-links.active {
    display: flex;
    top: 6.3em;
  }
  .nav-links a {
    color: #000000;
  }
  .hero {
    padding: 4em;
    width: 100vw;
    height: 100vh;
    margin: 0 auto;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: slideShow 12s infinite;
  }
  .wrapper {
    width: 600px;
  }
  .about-us {
    padding: 4em;
  }
  .about-us h2 {
    font-size: 2.5em;
  }
  .about-us-left {
    text-align: justify;
  }
  .about-us-right img {
    width: 300px;
  }
  .vision-and-mission {
    padding: 2em;
  }
  .mission img,
  .vision img {
    width: 150px;
  }
  .vision .text-wrapper,
  .mission .text-wrapper {
    padding: 2em;
  }
  .fty {
    padding: 4em;
  }
  .fty h2 {
    font-size: 2.5em;
  }
  .fty-container {
    flex-direction: column;
    gap: 2.5em;
  }
  .fty-header {
    margin-bottom: 1em;
  }
  .card-container h2 {
    font-size: 2.5em;
  }
  .card-container .container .card {
    width: 200px;
  }

  .ebook h2 {
    font-size: 2.5em;
  }
  .ebook-container .image-container img {
    width: 200px;
  }
  footer {
    flex-direction: column;
    gap: 50px;
    text-align: center;
  }
  footer .col-1,
  footer .col-2,
  footer .col-3 {
    width: 100%;
    text-align: center;
  }
  footer .col-3 p {
    text-align: center;
  }
  .about-us-hero {
    padding: 4em;
  }
  .vision-mission {
    padding: 4em;
  }
  .vision-mission h2 {
    font-size: 2.2em;
  }
  .mission-vision-container img {
    width: 120px;
  }
  .see-timeline-screen h2 {
    font-size: 2.2em;
  }
  .timeline-item {
    width: 400px;
  }
  .timeline-item .content {
    display: flex;
    width: 80vw;
    flex-direction: column;
  }
  .timeline-item.left {
    left: -45px;
  }
  .timeline-item.right {
    right: -355px;
  }
  .image-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 images per row on tablets */
  }
  .slider-wrapper {
    max-width: 450px;
  }
  .gallery h3 {
    font-size: 1.5em;
  }
  .contact-us {
    flex-direction: column;
  }
  .contact-us-left {
    width: 100%;
    display: flex;
    align-items: center;
  }
  .contact-us-right {
    width: 100%;
  }
}
@media (max-width: 768px) {
  .social-icons {
    bottom: 0px; /* push closer to bottom */
    left: 10px; /* reduce spacing */
    width: 60px; /* smaller container */
    gap: 1em; /* tighter spacing */
    padding: 0.5em 0;
  }
  .social-icons i {
    font-size: 16px;
  }
  .slideshow {
    height: 50vh;
    margin-bottom: 7em;
    margin-top: 5em; /* reduce height */
  }
  .slideshow img {
    height: 100%;
    width: 100%;
    object-fit: contain; /* fit smaller screens without cropping */
  }
  .text-container {
    font-size: 0.8em;
  }
  .about-us {
    padding: 1em;
    flex-direction: column;
  }
  .about-us-right {
    justify-content: center;
  }
  .image-grid {
    grid-template-columns: 1fr; /* 1 image per row on mobile */
  }
  .gallery h2 {
    font-size: 2rem;
  }
  .gallery-set h3 {
    font-size: 1.4rem;
  }
  .hero {
    width: 100vw;
    height: 100vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: -150px;
  }
  .rotating-text {
    margin-top: -100px;
  }
  .about-us {
    padding: 0;
  }
  .about-us-left {
    width: 100%;
    padding: 2em 4em;
  }
  .about-us h2 {
    text-align: center;
    font-size: 1.8em;
  }
  .about-us-left .eyebrow-heading {
    text-align: center;
    margin: 0.5em auto;
  }
  .signature-about {
    margin: 0 auto;
  }
  .mission img,
  .vision img {
    width: 120px;
  }
  .fty h2 {
    font-size: 1.8em;
  }
  .card-container h2 {
    font-size: 1.8em;
  }
  .card-container .container {
    flex-direction: column;
  }
  .card-container .container .card {
    width: 300px;
    margin: 0 auto;
  }
  .ebook {
    padding: 2em;
  }
  .ebook-container {
    flex-direction: column;
  }
  .ebook-container .image-container img {
    width: 350px;
  }
  .ebook h2 {
    margin-bottom: 2em;
  }
  .image-container {
    display: flex;
    justify-content: center;
  }
  .about-us-hero {
    padding: 2em;
    width: 100%;
    flex-direction: column;
  }
  .about-us-hero-left {
    width: 100%;
  }
  .about-us-hero .about-us-hero-left .name {
    display: block;
    text-align: center;
    margin: 0 auto;
  }
  .about-us-hero-right {
    padding: 2em;
    width: 100%;
    text-align: center;
    margin-top: -100px;
  }
  .vision-mission {
    padding: 2em;
  }
  .mission-vision-container {
    flex-direction: column;
    gap: 100px;
  }
  .vision-container,
  .mission-container {
    width: 90%;
    margin: 0 auto;
  }
  .count-up-wrapper {
    flex-direction: column;
    padding: 2em;
    height: auto;
  }
  .political-journey h2 {
    font-size: 1.8;
  }
  .see-timeline-screen h2 {
    font-size: 1.8;
  }
  .timeline-item {
    width: 280px;
  }
  .timeline-img {
    width: 180px;
  }
  .timeline-item.right {
    right: -200px;
  }
  .timeline-item.left::before {
    right: 15px;
  }
  .timeline-item.right::before {
    left: 0px;
  }
  .news-section h2 {
    font-size: 1.8em;
  }
  .news-section h3 {
    font-size: 1.4em;
    margin-bottom: 3em;
  }
  #news-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact {
    padding: 2em;
  }
  button[type="submit"] {
    margin: 0 auto;
  }
  .count-up-container {
    width: 350px;
    height: 350px;
  }
  .timeline {
    padding: 40px 10px;
  }

  .timeline::after {
    left: 20px; /* Move line to left side */
  }

  .timeline-item {
    width: 100%;
    padding: 10px 0 10px 40px;
    left: 0 !important;
    right: 0 !important;
    transform: translateX(0) translateY(20px);
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
    right: 0;
  }

  .timeline-item::before {
    left: 10px; /* Dot aligns with line */
    right: auto;
  }

  .timeline-item .content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
  }

  .timeline-img {
    width: 100%;
    max-width: 250px;
  }

  .timeline-item h2 {
    font-size: 1.2em;
  }

  .timeline-item h3 {
    font-size: 1em;
  }
  .timeline-item p {
    font-size: 13px;
  }
  .accordion-content {
    grid-template-columns: repeat(1, 1fr);
  }
  .accordion-header {
    margin: 2em 0;
  }
  .posts {
    column-count: 1;
    padding: 20px 40px;
  }
}
@media (max-width: 480px) {
  .slideshow {
    height: 35vh; /* smaller section on phones */
  }
  .slideshow img {
    object-fit: contain; /* avoids cropping */
  }
  .popup-content {
    padding: 15px;
  }

  .popup-content img {
    max-width: 280px; /* smaller image */
  }

  .popup-content .btn-container a {
    font-size: 12px;
    padding: 0.4em 1em;
  }

  .logo img {
    width: 5em;
  }
  .hero {
    padding: 0;
    display: block;
    position: relative;
    width: 110vw;
    height: 100vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: -150px;
  }
  .rotating-text {
    margin-top: -100px;
  }
  .navbar {
    padding: 1em 2em;
  }
  .nav-links {
    bottom: 10em;
    background-color: #ffffff;
  }
  .nav-links.active {
    top: 3.8em;
    height: 20em;
  }
  .rotating-text {
    width: 100%;
  }
  .mission {
    flex-direction: column;
  }
  .vision {
    flex-direction: column-reverse;
  }
  .fty-content {
    width: 300px;
  }
  .card-container {
    padding: 1em;
  }
  .card-container h2 {
    font-size: 1.2em;
  }
  .eyebrow-heading {
    font-size: 0.8em;
  }
  .ebook {
    padding: 1em;
  }
  .ebook h2 {
    font-size: 1.2em;
  }
  .ebook-container .image-container img {
    width: 280px;
  }
  .about-us-hero-left .name {
    font-size: 1.2em;
  }
  .about-us-hero-left .designation {
    font-size: 1em;
  }
  .vision-mission h2 {
    font-size: 1.2em;
  }
  .political-journey h2 {
    font-size: 1.2em;
  }
  .see-timeline-screen h2 {
    font-size: 1.5em;
    padding: 1em;
  }

  .gallery h2 {
    font-size: 1.2em;
  }
  .gallery h3 {
    font-size: 1em;
  }
  #news-container {
    grid-template-columns: repeat(1, 1fr);
  }
  .constituency-section h2 {
    font-size: 1.2em;
    margin-top: 3em;
  }
  .constituency-section p {
    font-size: 1em;
  }
  .contact-us-left img {
    width: 300px;
  }

  .contact form {
    padding: 1em;
  }
}
