/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, sans-serif;
}

body {
  background: #f6f6f6;
  color: #111;
}


/*Nav Logo*/
.nav-logo {
  display: flex;
  align-items: center;
  margin-left: clamp(17rem, 5vw, 20rem); /* smoothly scales margin-left */
  padding-top: clamp(10px, 1.5vw, 20px); /* smoothly scales padding-top */
}

.logo-img {
  height: clamp(100px, 20vw, 250px);  /* fluid height */
  width: auto;
  object-fit: contain;
}


/* Navbar */
.navbar {
  height: clamp(60px, 6vw, 95px);   /* fluid height */
  padding: 0;
  display: flex;
  align-items: center;
  background: #052962;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  flex-wrap: wrap; /* allow wrap on smaller screens */
}

.nav-logo {
  font-size: clamp(1rem, 2vw, 1.5rem); /* fluid font size */
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1.5rem); /* fluid gap */
  flex-wrap: wrap; /* wrap menu on smaller screens */
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: clamp(0.3rem, 0.5vw, 0.5rem) clamp(0.5rem, 1vw, 0.75rem);
  border-radius: 4px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  user-select: none;
  font-size: clamp(0.8rem, 1.2vw, 1rem); /* fluid font size */
}

.nav-link:hover,
.nav-link:focus {
  background-color: #ffca28;
  color: #052962;
  outline: none;
}

/* Dropdown container */
.nav-item.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  user-select: none;
  font-size: clamp(0.8rem, 1vw, 1rem); /* fluid font size */
}

/* Dropdown menu */
.dropdown-menu {
  display: none;
  position: absolute;
  background: #052962;
  top: 100%;
  left: 0;
  border-radius: 4px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
  list-style: none;
  min-width: 150px;
  z-index: 200;
  font-size: clamp(0.75rem, 1vw, 0.9rem); /* fluid font size */
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-link {
  display: block;
  padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.8rem, 1vw, 1rem);
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-link:hover,
.dropdown-link:focus {
  background-color: #ffca28;
  color: #052962;
  outline: none;
}

/* Show dropdown on hover */
.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu {
  display: block;
}

/* Search bar */
.nav-search {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 1vw, 0.5rem);
  flex-wrap: wrap;
  width: auto;
}

#search-input {
  padding: clamp(0.25rem, 0.5vw, 0.35rem) clamp(0.5rem, 1vw, 0.75rem);
  border-radius: 20px;
  border: none;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  outline: none;
  width: clamp(120px, 20vw, 300px);
  max-width: 100%;
  transition: width 0.3s ease;
}

#search-input:focus {
  width: clamp(160px, 25vw, 280px);
}

.nav-search button {
  background: transparent;
  border: none;
  color: white;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  cursor: pointer;
  padding: 0 clamp(0.1rem, 0.3vw, 0.25rem);
  user-select: none;
}

.nav-search button:hover,
.nav-search button:focus {
  color: #ffca28;
  outline: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-menu {
    gap: clamp(0.5rem, 1vw, 1rem);
  }
  #search-input {
    width: 140px;
  }
  #search-input:focus {
    width: 180px;
  }
}

@media (max-width: 480px) {
  .navbar-container {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .nav-menu {
    width: 100%;
    justify-content: space-around;
    order: 2;
  }
  .nav-search {
    width: 100%;
    order: 3;
    justify-content: center;
  }
  #search-input {
    width: 100%;
  }
}






/* CONTAINER */
.container {
  max-width: 1200px;
  margin: clamp(0.5rem, 1vw, 1rem) auto;
  padding: clamp(1rem, 2vw, 5rem);
}

/* HERO SECTION */
.hero {
  background: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1350&q=80') no-repeat center/cover;
  color: white;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
  border-radius: 6px;
  max-width: none;
  margin: clamp(1rem, 3vw, 2rem) auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.hero-content h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.hero-content p {
  font-size: clamp(1rem, 3vw, 1.2rem);
  margin-bottom: clamp(1rem, 4vw, 2rem);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-hero {
  background-color: #ffca28;
  color: #052962;
  padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 3vw, 1.8rem);
  font-weight: 700;
  border-radius: 30px;
  text-decoration: none;
  font-size: clamp(0.9rem, 2vw, 1rem);
  transition: background-color 0.3s ease;
}

.btn-hero:hover,
.btn-hero:focus {
  background-color: #e6b922;
  outline: none;
}

/* NEWS CATEGORY SECTIONS */
.news-category {
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.news-category h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  margin-bottom: clamp(0.75rem, 3vw, 1.5rem);
  color: #052962;
  font-weight: 700;
}

/* GRID CONTAINERS */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(220px, 30vw, 280px), 1fr));
  gap: clamp(1rem, 2vw, 1.8rem);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

/* ARTICLE CARD */
.article-card {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* ARTICLE IMAGE */
.article-card img {
  width: 100%;
  height: clamp(140px, 20vw, 180px);
  object-fit: cover;
  border-bottom: 1px solid #ddd;
}

/* ARTICLE CONTENT */
.article-card .content {
  padding: clamp(0.75rem, 2vw, 1rem);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* TITLE */
.article-card h3 {
  font-size: clamp(1rem, 2vw, 1.1rem);
  margin-bottom: clamp(0.5rem, 1.5vw, 0.7rem);
  color: #052962;
}

/* SNIPPET / TRAIL TEXT */
.article-card p {
  color: #555;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  flex-grow: 1;
  margin-bottom: clamp(0.5rem, 1.5vw, 0.8rem);
  line-height: 1.3;
}

/* ARTICLE PAGE STYLES (for article.html) */
.article-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  margin-bottom: clamp(0.5rem, 1.5vw, 0.8rem);
}

.meta {
  color: #777;
  margin-bottom: clamp(1rem, 3vw, 1.2rem);
}

#article-image {
  width: 100%;
  margin: clamp(1rem, 3vw, 1.5rem) 0;
  border-radius: 6px;
}

#article-body {
  font-size: clamp(1rem, 3vw, 1.05rem);
  line-height: 1.7;
}

.guardian-btn {
  display: inline-block;
  margin-top: clamp(1rem, 3vw, 2rem);
  color: white;
  background: #052962;
  padding: clamp(0.5rem, 1.5vw, 0.7rem) clamp(0.8rem, 2vw, 1.2rem);
  text-decoration: none;
  border-radius: 4px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(clamp(180px, 30vw, 220px), 1fr));
  }

  .article-card img {
    height: 140px;
  }

  .hero-content h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .article-card img {
    height: 160px;
  }
}






/* Show more show less */
.toggle-buttons {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-bottom: clamp(1rem, 3vw, 2rem);
}

.toggle-buttons button {
  padding: clamp(0.4rem, 1vw, 0.6rem) clamp(0.8rem, 2vw, 1.2rem);
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background-color: #052962;
  color: white;
  transition: background-color 0.3s ease;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.toggle-buttons button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.toggle-buttons button:hover:not(:disabled) {
  background-color: #ffca28;
  color: #052962;
}

/* Hero slider */
.hero-slider {
  position: relative;
  max-width: 100%;
  max-width: 1850px;
  min-height: 57vh;
  margin: clamp(1rem, 3vw, 2rem) auto;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  height: clamp(250px, 35vh, 350px); /* fluid height */
  background: #000;
  color: white;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.slider-wrapper {
  position: relative;
  height: 100%;
}

.slide {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  transition: opacity 1s ease-in-out;
  opacity: 0;
  background: transparent;
}

.slide.active {
  display: flex;  /* flexbox for image + text */
  opacity: 1;
  position: relative;
  background: transparent;
}

.slide-img {
  width: 50%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.slide-content {
  width: 50%;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(0,0,0,0.6);
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-content h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.slide-content p {
  font-size: clamp(1rem, 3vw, 1.1rem);
  line-height: 1.4;
}

/* Buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(5, 41, 98, 0.7);
  border: none;
  color: white;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  padding: clamp(0.1rem, 1vw, 0.2rem) clamp(0.8rem, 2vw, 1rem);
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.slider-btn:hover,
.slider-btn:focus {
  background: #ffca28;
  color: #052962;
  outline: none;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .slide {
    flex-direction: column;
  }
  .slide-img, .slide-content {
    width: 100%;
    height: 50%;
    border-radius: 0;
  }
  .slide-content {
    padding: 1rem;
    background: rgba(0,0,0,0.7);
  }
}

@media (max-width: 480px) {
  .slide-content h2 {
    font-size: 1.4rem;
  }
  .slide-content p {
    font-size: 1rem;
  }
}






/* Interesting news section */
.interesting-news-section > h2 {
  text-align: center;
  width: 100%;
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.interesting-news-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.interesting-news-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: clamp(0.5rem, 2vw, 1rem);
  padding: clamp(0.5rem, 2vw, 1rem) 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.interesting-news-container::-webkit-scrollbar {
  display: none;
}

/* Scroll buttons */
.scroll-btn {
  background-color: #052962;
  border: none;
  color: #ffca28;
  font-size: clamp(1.2rem, 3vw, 2rem);
  cursor: pointer;
  padding: 0 clamp(0.25rem, 1vw, 0.5rem);
  user-select: none;
  transition: background-color 0.3s ease;
  border-radius: 6px;
}

.scroll-btn:hover {
  background-color: #0342a1;
}

/* Card style */
.interesting-news-card {
  flex: 0 0 clamp(180px, 20vw, 220px);
  background: #052962;
  border-radius: 12px;
  color: #d6d6d6;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  /* 🔥 Hover animation */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interesting-news-card:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

/* Image */
.interesting-news-card img {
  width: 100%;
  height: clamp(120px, 12vw, 140px);
  object-fit: cover;

  /* 🔥 Image zoom */
  transition: transform 0.3s ease;
}

.interesting-news-card:hover img {
  transform: scale(1.08);
}

/* Content */
.interesting-news-card .content {
  padding: clamp(0.5rem, 1vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
  flex-grow: 1;
}

.interesting-news-card h3 {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  margin-bottom: clamp(0.3rem, 1vw, 0.5rem);

  /* 🔥 Text color transition */
  transition: color 0.3s ease;
}

.interesting-news-card:hover h3 {
  color: #ffca28;
}

.interesting-news-card p {
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  line-height: 1.2;
  color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
  .interesting-news-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .interesting-news-container {
    gap: clamp(0.3rem, 1.5vw, 0.75rem);
    padding: clamp(0.25rem, 1vw, 0.5rem) 0;
  }
  .interesting-news-card {
    flex: 0 0 80vw;
    border-radius: 10px;
  }
  .interesting-news-card img {
    height: clamp(140px, 18vw, 180px);
  }
  .scroll-btn {
    font-size: clamp(1rem, 3vw, 1.5rem);
    padding: clamp(0.15rem, 0.8vw, 0.25rem) clamp(0.25rem, 1vw, 0.5rem);
    margin: clamp(0.15rem, 1vw, 0.25rem) 0;
  }
}

@media (max-width: 480px) {
  .interesting-news-card {
    flex: 0 0 90vw;
  }
  .interesting-news-card img {
    height: clamp(120px, 15vw, 150px);
  }
}





/* ===== FOOTER ===== */
.site-footer {
  background: #052962;
  color: #d6d6d6;
  padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 4vw, 2rem) clamp(1rem, 2vw, 1.5rem);
  font-family: "Segoe UI", system-ui, sans-serif;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  /* Removed fixed height for scalability */
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
}

/* Brand */
.footer-brand h3 {
  color: #ffca28;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
}

.footer-brand p {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  line-height: 1.5;
  color: #cfcfcf;
}

/* Links */
.footer-links h4,
.footer-newsletter h4 {
  margin-bottom: clamp(0.5rem, 1vw, 0.75rem);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: #ffffff;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
}

.footer-links a {
  text-decoration: none;
  color: #d6d6d6;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffca28;
}

/* Bottom */
.footer-bottom {
  margin-top: clamp(1rem, 3vw, 2rem);
  padding-top: clamp(0.5rem, 1vw, 1rem);
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: clamp(0.6rem, 0.8vw, 0.8rem);
  color: #bdbdbd;
}

/* Footer brand layout */
.footer-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.15rem, 0.5vw, 0.25rem);
  margin-left: 20px;
  height: 100%;
  justify-content: center;
}

/* Footer logo */
.footer-logo {
  position: absolute;
  top: -50px;
  left: 1.5rem;
  height: clamp(150px, 18vw, 250px);
  width: auto;
  object-fit: contain;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: clamp(1rem, 2vw, 1.5rem);
  }

  .footer-brand {
    margin-left: 0;
    align-items: center;
    text-align: center;
    height: auto;
    justify-content: flex-start;
  }

  .footer-logo {
    position: static;
    height: clamp(100px, 25vw, 150px);
    opacity: 0.1;
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
  }

  .footer-links, .footer-newsletter {
    text-align: center;
  }

  .site-footer {
    padding: clamp(1rem, 4vw, 2rem) clamp(0.5rem, 3vw, 1rem);
    height: auto; /* allow flexible height */
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: clamp(0.5rem, 1.5vw, 1rem);
  }

  .footer-brand h3 {
    font-size: clamp(1rem, 3vw, 1.3rem);
  }

  .footer-links h4,
  .footer-newsletter h4 {
    font-size: clamp(0.85rem, 2vw, 1rem);
  }

  .footer-links a {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  }

  .footer-bottom {
    font-size: clamp(0.5rem, 1vw, 0.7rem);
  }
}





/* Popup overlay about navbar */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 41, 98, 0.8); /* semi-transparent dark blue */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Popup content box */
.popup-content {
  background: white;
  color: #052962;
  max-width: clamp(320px, 80vw, 600px);
  max-height: clamp(300px, 80vh, 80vh);
  overflow-y: auto;
  padding: clamp(1rem, 2vw, 2rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  position: relative;
  font-family: Arial, sans-serif;
  width: 90%;
  box-sizing: border-box;
}

/* Close button */
#close-popup {
  position: absolute;
  top: clamp(6px, 1vw, 12px);
  right: clamp(10px, 2vw, 16px);
  background: none;
  border: none;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: bold;
  color: #052962;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

/* Overlay dims background and centers popup */
.popup-overlay {
  background: rgba(0, 0, 0, 0.3); /* lighter fade */
  width: 100vw;
  height: 100vh;
}

/* Popup content typography */
.popup-content h2 {
  text-align: center;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.popup-content p {
  margin-top: 0;
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
  line-height: 1.5;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Privacy Policy */
.popup-title {
  text-align: center;
  margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
}

.popup-date {
  text-align: center;
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  color: #777;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.popup-content h3 {
  margin-top: clamp(1rem, 2vw, 1.5rem);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
}

/* Responsive */
@media (max-width: 768px) {
  .popup-content {
    max-width: 90%;
    padding: 1.5rem 2rem;
    max-height: 85vh;
  }
  #close-popup {
    font-size: 1.8rem;
    top: 8px;
    right: 12px;
  }
  .popup-content h2 {
    font-size: 1.8rem;
  }
  .popup-content p, 
  .popup-content h3 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .popup-content {
    max-width: 95%;
    padding: 1rem 1.5rem;
    max-height: 90vh;
  }
  #close-popup {
    font-size: 1.5rem;
    top: 6px;
    right: 10px;
  }
  .popup-content h2 {
    font-size: 1.5rem;
  }
  .popup-content p, 
  .popup-content h3 {
    font-size: 0.9rem;
  }
}
