/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Oswald:wght@500;700&display=swap");

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Merriweather", serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #ffffff;
}

.dark-mode a {
  color: #e63946;
}

/* Container for Main Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* UTILITY CLASSES - Professional Foundation */
.btn-base {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.input-base {
  padding: 8px 12px;
  border: 2px solid #e0e6ed;
  border-radius: 6px;
  font-family: "Merriweather", serif;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.input-base:focus {
  border-color: #003087;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.1);
}

.dark-mode .input-base {
  border-color: #555;
  background: #333;
  color: #fff;
}

.dark-mode .input-base:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.15);
}

/* LOGO Styles - Consistent Across All Pages */
.logo-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
  height: 45px;
  width: auto;
  max-height: 55px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.logo-fallback {
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: 1px;
  margin: 0;
  color: white;
}

/* Header Styles - CONSISTENT WITH ICONS ACROSS ALL PAGES */
header {
  background-color: #003087;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 15px;
  font-family: "Oswald", sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

nav a:hover {
  color: #e63946;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Navigation Icons - CONSISTENT ACROSS ALL PAGES */
.nav-home::before {
  content: "🏠";
}
.nav-articles::before {
  content: "📝";
}
.nav-news::before {
  content: "📰";
}
.nav-quotes::before {
  content: "💭";
}
.nav-weather::before {
  content: "🌤️";
}
.nav-contact::before {
  content: "📞";
}
.nav-admin::before {
  content: "🔧";
}

/* Dark Mode Toggle - Refined */
#dark-mode-toggle {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: clamp(0.9rem, 2vw, 1rem);
  min-height: 36px;
}

#dark-mode-toggle:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

/* QUOTE PAGE SPECIFIC BUTTONS - Perfectly Sized */
.quote-category-btn,
.random-quote-btn {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  padding: 6px 12px;
  font-size: 0.8rem;
  margin: 3px;
  border-radius: 4px;
  min-width: 70px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(230, 57, 70, 0.15);
}

.quote-category-btn:hover,
.random-quote-btn:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.random-quote-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 6px;
  margin: 10px 0;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
}

/* GENERAL BUTTON STYLES - Professional & Consistent */
button,
.search-btn,
.tab-button,
.form-submit-btn,
.weather-tab-btn {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  padding: 8px 16px;
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
  border-radius: 6px;
  min-height: 36px;
}

button:hover,
.search-btn:hover,
.tab-button:hover,
.form-submit-btn:hover,
.weather-tab-btn:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

/* Pagination Buttons - Completed and Enhanced */
.page-btn {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
}

.page-btn:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.page-btn.active {
  background: linear-gradient(135deg, #003087, #74b9ff);
  box-shadow: 0 2px 6px rgba(0, 48, 135, 0.2);
  cursor: default;
  transform: none;
}

.page-btn:disabled {
  background: linear-gradient(135deg, #ccc, #aaa);
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

/* Share Buttons - Added for Social Sharing */
.share-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0;
}

.share-btn {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.share-btn.twitter {
  background: linear-gradient(135deg, #1da1f2, #0b79d0);
}

.share-btn.facebook {
  background: linear-gradient(135deg, #3b5998, #2a4373);
}

.share-btn.linkedin {
  background: linear-gradient(135deg, #0077b5, #005983);
}

.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .share-btn.twitter {
  background: linear-gradient(135deg, #55acee, #1da1f2);
}

.dark-mode .share-btn.facebook {
  background: linear-gradient(135deg, #4c70ba, #3b5998);
}

.dark-mode .share-btn.linkedin {
  background: linear-gradient(135deg, #0091ca, #0077b5);
}

/* Modal Styles - Added for Dynamic Interactions */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideUp 0.4s ease-out;
}

.dark-mode .modal-content {
  background: #2d2d2d;
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #333;
}

.dark-mode .modal-close {
  color: #e63946;
}

.modal-close:hover {
  color: #e63946;
}

/* WEATHER GLANCE SPECIFIC - Perfect Integration */
#quick-weather {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
  color: white;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#quick-weather::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    #ffffff,
    rgba(255, 255, 255, 0.5),
    #ffffff
  );
}

#quick-weather h2 {
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dark-mode #quick-weather {
  background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
}

.dark-mode #quick-weather h2 {
  color: #e63946;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Quick Weather Search - Perfectly Styled */
.quick-weather-search {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

#quick-weather-input {
  padding: 8px 12px;
  border: 2px solid #e0e6ed;
  border-radius: 6px;
  font-family: "Merriweather", serif;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  width: 180px;
  max-width: 100%;
  flex: 1;
  min-width: 120px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
}

#quick-weather-input:focus {
  border-color: #003087;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.1);
  background: white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

#quick-weather-input::placeholder {
  color: #666;
  font-style: italic;
}

.dark-mode #quick-weather-input {
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  border-color: #555;
  background: #333;
}

.dark-mode #quick-weather-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.dark-mode #quick-weather-input:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.15);
}

.quick-weather-search button {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 4px;
  flex-shrink: 0;
  min-width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-weather-search button:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

/* Quick Weather Result */
#quick-weather-result {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quick-weather-placeholder {
  text-align: center;
  opacity: 0.8;
}

.quick-weather-placeholder div {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.quick-weather-placeholder p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* Search Container - ENHANCED BUT KEEPS ORIGINAL LAYOUT */
.search-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 48, 135, 0.1);
}

.dark-mode .search-container {
  background: rgba(45, 45, 45, 0.8);
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#search-bar {
  padding: 8px 12px;
  border: 2px solid #e0e6ed;
  border-radius: 6px;
  font-family: "Merriweather", serif;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  padding: 10px 16px;
  width: clamp(250px, 30vw, 300px);
  border-radius: 25px;
}

#search-bar:focus {
  border-color: #003087;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.1);
}

.search-btn {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
}

.search-btn:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.search-btn::before {
  content: "🔍";
  margin-right: 6px;
}

/* Main Content Grid - RESPONSIVE PERFECTION */
main {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

/* Extra-large screens (desktops) */
@media (min-width: 1201px) {
  main {
    grid-template-columns: 1fr 2fr 1fr;
  }
}

/* Large screens (laptops/desktops) */
@media (min-width: 1025px) and (max-width: 1200px) {
  main {
    grid-template-columns: 1fr 2fr 1fr;
  }
}

/* Medium screens (tablets/laptops) */
@media (min-width: 769px) and (max-width: 1024px) {
  main {
    grid-template-columns: 1fr 2fr;
  }
  #latest-highlights {
    display: none;
  }
}

/* Small screens (tablets/landscape phones) */
@media (min-width: 481px) and (max-width: 768px) {
  main {
    grid-template-columns: 1fr 1fr;
  }
  #latest-highlights,
  #news-articles {
    flex-basis: 100%;
  }
}

/* Extra-small screens (mobile portrait) */
@media (max-width: 480px) {
  main {
    grid-template-columns: 1fr;
  }
  header .container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  nav a {
    margin: 4px;
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  .search-container {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }
  #search-bar {
    width: 100%;
    margin-bottom: 12px;
  }
  #news-articles {
    order: -1;
  }
  .quote-categories {
    justify-content: center;
    gap: 6px;
  }
  .quote-category-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    min-width: 60px;
  }
}

/* Additional adjustments for very small devices */
@media (max-width: 320px) {
  header .container {
    padding: 0 10px;
  }
  nav a {
    font-size: 0.8rem;
    padding: 0.4rem;
  }
  button,
  .search-btn,
  #dark-mode-toggle {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  #quick-weather-input {
    width: 100%;
    min-width: auto;
  }
}

/* Content Sections - CONSISTENT ENHANCED DESIGN */
#latest-highlights,
#search-results,
#news-articles,
#contact-content,
#quotes-content,
#articles-content,
.weather-section-full,
#quick-weather {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 48, 135, 0.08);
  position: relative;
  overflow: hidden;
}

#latest-highlights::before,
#search-results::before,
#news-articles::before,
#contact-content::before,
#quotes-content::before,
#articles-content::before,
.weather-section-full::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #003087, #74b9ff, #003087);
}

.dark-mode #latest-highlights,
.dark-mode #search-results,
.dark-mode #news-articles,
.dark-mode #contact-content,
.dark-mode #quotes-content,
.dark-mode #articles-content,
.dark-mode .weather-section-full,
.dark-mode #quick-weather {
  background-color: #2d2d2d;
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dark-mode #latest-highlights::before,
.dark-mode #search-results::before,
.dark-mode #news-articles::before,
.dark-mode #contact-content::before,
.dark-mode #quotes-content::before,
.dark-mode #articles-content::before,
.dark-mode .weather-section-full::before {
  background: linear-gradient(90deg, #e63946, #ff6b6b, #e63946);
}

#latest-highlights:hover,
#search-results:hover,
#news-articles:hover,
#contact-content:hover,
#quotes-content:hover,
#articles-content:hover,
.weather-section-full:hover,
#quick-weather:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

#latest-highlights h2,
#latest-highlights h3,
#search-results h2,
#search-results h3,
#news-articles h2,
#news-articles h3,
#contact-content h2,
#quotes-content h2,
#articles-content h2,
.weather-section-full h2,
#quick-weather h2 {
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  margin-bottom: 15px;
  color: #003087;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

#latest-highlights h2::before,
#search-results h2::before,
#news-articles h2::before,
#contact-content h2::before,
#quotes-content h2::before,
#articles-content h2::before,
.weather-section-full h2::before {
  content: "";
  width: 4px;
  height: 25px;
  background: linear-gradient(to bottom, #003087, #74b9ff);
  border-radius: 2px;
}

.dark-mode #latest-highlights h2,
.dark-mode #latest-highlights h3,
.dark-mode #search-results h2,
.dark-mode #search-results h3,
.dark-mode #news-articles h2,
.dark-mode #news-articles h3,
.dark-mode #contact-content h2,
.dark-mode #quotes-content h2,
.dark-mode #articles-content h2,
.dark-mode .weather-section-full h2,
.dark-mode #quick-weather h2 {
  color: #e63946;
}

.dark-mode #latest-highlights h2::before,
.dark-mode #search-results h2::before,
.dark-mode #news-articles h2::before,
.dark-mode #contact-content h2::before,
.dark-mode #quotes-content h2::before,
.dark-mode #articles-content h2::before,
.dark-mode .weather-section-full h2::before {
  background: linear-gradient(to bottom, #e63946, #ff6b6b);
}

/* QUOTE PAGE SPECIFIC LAYOUT */
.quote-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 15px 0;
}

.author-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.author-item {
  padding: 12px;
  border: 1px solid rgba(0, 48, 135, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}

.author-item:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: #003087;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark-mode .author-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(230, 57, 70, 0.2);
}

.dark-mode .author-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #e63946;
}

/* Content Items - CONSISTENT STYLING */
#latest-highlights .highlight-item,
#search-results .search-result-item,
#news-articles .news-item,
#quotes-content .quote-item,
#articles-content .article-item {
  padding: 18px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  border-left: 4px solid #003087;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
}

#latest-highlights .highlight-item::before,
#search-results .search-result-item::before,
#news-articles .news-item::before,
#quotes-content .quote-item::before,
#articles-content .article-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #003087, #74b9ff);
  border-radius: 2px 0 0 2px;
}

#latest-highlights .highlight-item:hover,
#search-results .search-result-item:hover,
#news-articles .news-item:hover,
#quotes-content .quote-item:hover,
#articles-content .article-item:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-left-color: #e63946;
}

.dark-mode #latest-highlights .highlight-item,
.dark-mode #search-results .search-result-item,
.dark-mode #news-articles .news-item,
.dark-mode #quotes-content .quote-item,
.dark-mode #articles-content .article-item {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #e63946;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode #latest-highlights .highlight-item:hover,
.dark-mode #search-results .search-result-item:hover,
.dark-mode #news-articles .news-item:hover,
.dark-mode #quotes-content .quote-item:hover,
.dark-mode #articles-content .article-item:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.dark-mode #latest-highlights .highlight-item::before,
.dark-mode #search-results .search-result-item::before,
.dark-mode #news-articles .news-item::before,
.dark-mode #quotes-content .quote-item::before,
.dark-mode #articles-content .article-item::before {
  background: linear-gradient(to bottom, #e63946, #ff6b6b);
}

/* Links - CONSISTENT STYLING */
#latest-highlights a,
#search-results a,
#news-articles a,
#quotes-content a,
#articles-content a {
  color: #003087;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
}

#latest-highlights a::after,
#search-results a::after,
#news-articles a::after,
#quotes-content a::after,
#articles-content a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #003087, #74b9ff);
  transition: width 0.3s ease;
}

#latest-highlights a:hover::after,
#search-results a:hover::after,
#news-articles a:hover::after,
#quotes-content a:hover::after,
#articles-content a:hover::after {
  width: 100%;
}

#latest-highlights a:hover,
#search-results a:hover,
#news-articles a:hover,
#quotes-content a:hover,
#articles-content a:hover {
  color: #e63946;
  text-decoration: none;
  transform: translateX(2px);
}

.dark-mode #latest-highlights a,
.dark-mode #search-results a,
.dark-mode #news-articles a,
.dark-mode #quotes-content a,
.dark-mode #articles-content a {
  color: #e63946;
}

.dark-mode #latest-highlights a::after,
.dark-mode #search-results a::after,
.dark-mode #news-articles a::after,
.dark-mode #quotes-content a::after,
.dark-mode #articles-content a::after {
  background: linear-gradient(90deg, #e63946, #ff6b6b);
}

.dark-mode #latest-highlights a:hover,
.dark-mode #search-results a:hover,
.dark-mode #news-articles a:hover,
.dark-mode #quotes-content a:hover,
.dark-mode #articles-content a:hover {
  color: #74b9ff;
}

/* Admin Page Styles - ENHANCED BUT KEEPS STRUCTURE */
#admin-link {
  display: none;
}

.dashboard {
  margin: 20px 0;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 48, 135, 0.08);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #003087, #74b9ff);
}

.dark-mode .card {
  background-color: #2d2d2d;
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dark-mode .card::before {
  background: linear-gradient(90deg, #e63946, #ff6b6b);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card h3 {
  font-family: "Oswald", sans-serif;
  font-size: 1.5rem;
  color: #003087;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card h3::before {
  content: "";
  width: 3px;
  height: 20px;
  background: linear-gradient(to bottom, #003087, #74b9ff);
  border-radius: 2px;
}

.dark-mode .card h3 {
  color: #e63946;
}

.dark-mode .card h3::before {
  background: linear-gradient(to bottom, #e63946, #ff6b6b);
}

.card p {
  font-size: 1rem;
  margin-top: 10px;
  color: #666;
  line-height: 1.6;
}

.dark-mode .card p {
  color: rgba(255, 255, 255, 0.8);
}

/* Tab Navigation - CONSISTENT */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

.tab-nav {
  margin: 20px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab-button {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.tab-button:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.tab-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.tab-button:hover::before {
  left: 100%;
}

.tab-button:hover,
.tab-button.active {
  transform: translateY(-1px);
}

/* Content Forms - ENHANCED */
.content-form {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  border: 1px solid rgba(0, 48, 135, 0.08);
}

.dark-mode .content-form {
  background-color: #2d2d2d;
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #003087;
  font-family: "Oswald", sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label::before {
  content: "";
  width: 3px;
  height: 16px;
  background: linear-gradient(to bottom, #003087, #74b9ff);
  border-radius: 2px;
}

.dark-mode .form-group label {
  color: #e63946;
}

.dark-mode .form-group label::before {
  background: linear-gradient(to bottom, #e63946, #ff6b6b);
}

.form-group input,
.form-group textarea {
  padding: 8px 12px;
  border: 2px solid #e0e6ed;
  border-radius: 6px;
  font-family: "Merriweather", serif;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: clamp(0.95rem, 2vw, 1rem);
  background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #003087;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.1);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: #e74c3c;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 4px;
  font-family: "Merriweather", serif;
}

.form-submit-btn {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  margin-top: 10px;
}

.form-submit-btn:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.form-submit-btn::before {
  content: "➤";
  margin-left: 8px;
  transition: margin-left 0.3s ease;
}

.form-submit-btn:hover::before {
  margin-left: 12px;
}

/* Tables - ENHANCED */
#articles-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid rgba(0, 48, 135, 0.08);
}

.dark-mode #articles-table {
  background-color: #2d2d2d;
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

#articles-table th,
#articles-table td {
  padding: 15px 12px;
  text-align: left;
  border-bottom: 1px solid #e0e6ed;
}

.dark-mode #articles-table th,
.dark-mode #articles-table td {
  border-bottom: 1px solid #555;
}

#articles-table th {
  background: linear-gradient(135deg, #003087, #74b9ff);
  color: white;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  position: relative;
}

#articles-table th::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

#articles-table th:hover::before {
  opacity: 1;
}

#articles-table button {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 4px;
  margin-right: 4px;
}

#articles-table button:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.action-select {
  padding: 8px 12px;
  border: 2px solid #e0e6ed;
  border-radius: 6px;
  font-family: "Merriweather", serif;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 4px;
  background: white;
  color: #333;
  cursor: pointer;
  min-width: 80px;
}

.action-select:focus {
  border-color: #003087;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.1);
  border-color: #003087;
  box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.15);
}

.dark-mode .action-select {
  background: #333;
  color: #fff;
  border-color: #555;
}

.dark-mode .action-select:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2);
}

/* Footer Styles - ENHANCED */
footer {
  background: linear-gradient(135deg, #003087, #74b9ff);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e63946, #ff6b6b, #e63946);
}

footer .container {
  position: relative;
  z-index: 1;
}

footer .container p {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

footer a {
  color: #e63946;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

footer a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #e63946, #ff6b6b);
  transition: width 0.3s ease;
}

footer a:hover::after {
  width: 100%;
}

footer a:hover {
  color: #ff6b6b;
  transform: translateY(-1px);
}

/* Responsive Design for Admin */
@media (max-width: 768px) {
  .dashboard-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .tab-nav {
    flex-direction: column;
    gap: 8px;
  }
  .tab-button {
    margin: 4px 0;
    width: 100%;
    text-align: center;
  }

  /* Table responsiveness */
  #articles-table {
    font-size: 0.9rem;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
  }

  #articles-table th,
  #articles-table td {
    padding: 10px 6px;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .content-form {
    padding: 15px;
  }
  .form-group input,
  .form-group textarea {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  .form-submit-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    width: 100%;
  }
  #quick-weather {
    padding: 15px;
  }
  .quick-weather-search {
    flex-direction: column;
    align-items: stretch;
  }
  #quick-weather-input {
    width: 100%;
    margin-bottom: 8px;
  }
  .quick-weather-search button {
    width: 100%;
  }
}

/* WEATHER SECTION - ENHANCED BUT INTEGRATED */
.weather-section-full {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  border-radius: 15px;
  padding: 25px;
  margin: 20px 0;
  color: white;
  box-shadow: 0 8px 25px rgba(116, 185, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.weather-section-full::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    #ffffff,
    rgba(255, 255, 255, 0.5),
    #ffffff
  );
}

.weather-section-full h2 {
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 20px;
  color: white;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
}

.weather-section-full h2::before {
  content: "";
  width: 5px;
  height: 30px;
  background: linear-gradient(to bottom, white, rgba(255, 255, 255, 0.5));
  border-radius: 3px;
}

.dark-mode .weather-section-full {
  background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.dark-mode .weather-section-full h2 {
  color: #e63946;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.dark-mode .weather-section-full h2::before {
  background: linear-gradient(to bottom, #e63946, #ff6b6b);
}

/* Weather Tabs */
.weather-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.weather-tab-btn {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

.weather-tab-btn:hover,
.weather-tab-btn.active {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.weather-tab-content {
  display: none;
}

.weather-tab-content.active {
  display: block;
  animation: slideUp 0.4s ease-out;
}

/* Weather Grid */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.weather-card {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.weather-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #74b9ff, #0984e3, #00b894);
}

.weather-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.weather-card h3 {
  font-family: "Oswald", sans-serif;
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #003087;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.weather-main-temp {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin: 15px 0;
  color: #00b894;
  font-family: "Oswald", sans-serif;
  letter-spacing: 1px;
}

.weather-icon {
  font-size: 3rem;
  text-align: center;
  margin: 15px 0;
}

.weather-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
  font-size: 0.9rem;
}

.weather-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(116, 185, 255, 0.1);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.weather-detail-item:hover {
  background: rgba(116, 185, 255, 0.2);
  transform: translateY(-1px);
}

.weather-detail-icon {
  font-size: 1.1rem;
  min-width: 20px;
  text-align: center;
}

.weather-favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 193, 7, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.weather-favorite-btn:hover {
  background: #ffc107;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
}

.weather-favorite-btn.active {
  background: #e74c3c;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.weather-favorite-btn.active:hover {
  background: #c0392b;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5);
}

/* Weather Detail */
.weather-detail {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.weather-detail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #74b9ff, #0984e3);
}

.weather-detail h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #003087;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: 1px;
}

.weather-detail .temp {
  font-size: 4rem;
  font-weight: bold;
  color: #00b894;
  margin: 15px 0;
  font-family: "Oswald", sans-serif;
  letter-spacing: 2px;
}

.weather-detail .weather-icon {
  font-size: 5rem;
  margin: 20px 0;
}

.weather-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.weather-detail-item {
  background: rgba(116, 185, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(116, 185, 255, 0.3);
}

.weather-detail-item:hover {
  background: rgba(116, 185, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(116, 185, 255, 0.2);
}

.weather-detail-item .value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #0984e3;
  margin-bottom: 5px;
  font-family: "Oswald", sans-serif;
}

/* Features Grid */
.weather-features {
  background: rgba(255, 255, 255, 0.1);
  padding: 40px;
  border-radius: 15px;
  margin: 40px 0;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.weather-features h2 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 30px;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
}

.weather-features h2::before {
  content: "✨";
  font-size: 1.5em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 30px 20px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #74b9ff, #0984e3);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #74b9ff, #0984e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #003087;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Dark Mode Weather Styles */
.dark-mode .weather-section-full {
  background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.dark-mode .weather-card,
.dark-mode .hero-weather-card,
.dark-mode .weather-detail {
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.dark-mode .weather-card h3,
.dark-mode .hero-weather-card h2,
.dark-mode .weather-detail h2 {
  color: #e63946;
}

.dark-mode .weather-main-temp,
.dark-mode .weather-detail .temp {
  color: #00cec9;
}

.dark-mode .feature-card {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .feature-card h3 {
  color: #e63946;
}

.dark-mode .weather-detail-item {
  background: rgba(230, 57, 70, 0.1);
  border-color: rgba(230, 57, 70, 0.3);
}

.dark-mode .weather-detail-item .value {
  color: #e63946;
}

/* Responsive Weather */
@media (max-width: 768px) {
  .weather-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
  }

  .weather-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
    padding: 20px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-weather-card .temp {
    font-size: 3.5rem;
  }

  .weather-tabs {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .weather-tab-btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .weather-section-full {
    padding: 15px;
    margin: 15px 0;
  }

  .weather-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .weather-card {
    padding: 18px;
  }

  .weather-details {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .feature-card {
    padding: 20px 15px;
  }

  .weather-detail {
    padding: 20px 15px;
    margin: 15px 0;
  }

  .weather-detail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Loading Animation */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  font-size: 1.1rem;
  color: #74b9ff;
  font-family: "Merriweather", serif;
  font-style: italic;
}

.loading::before {
  content: "⏳";
  margin-right: 10px;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error States */
.weather-error {
  text-align: center;
  color: #e74c3c;
  padding: 20px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 8px;
  border-left: 4px solid #e74c3c;
  margin: 15px 0;
  font-family: "Merriweather", serif;
}

.weather-error::before {
  content: "⚠️";
  font-size: 1.5rem;
  margin-right: 10px;
  display: inline-block;
  vertical-align: middle;
}

/* User Info Styles */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-welcome {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Merriweather", serif;
}

.logout-btn {
  border: none;
  cursor: pointer;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #e63946, #d32f2f);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
}

.logout-btn:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

/* Contact Form - Enhanced for Consistency */
#contact-form {
  max-width: 600px;
  margin: 0 auto;
}

#contact-form .form-group input,
#contact-form .form-group textarea {
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
}

#contact-form .form-submit-btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

/* Article Detail Page */
.article-detail {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin: 20px 0;
  border: 1px solid rgba(0, 48, 135, 0.08);
}

.dark-mode .article-detail {
  background: #2d2d2d;
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.article-detail h1 {
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #003087;
  margin-bottom: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.dark-mode .article-detail h1 {
  color: #e63946;
}

.article-detail img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-detail p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 15px;
}

.article-detail .meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 20px;
  font-family: "Merriweather", serif;
}

.dark-mode .article-detail .meta {
  color: rgba(255, 255, 255, 0.7);
}

/* Quote Detail Page */
.quote-detail {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin: 20px 0;
  border: 1px solid rgba(0, 48, 135, 0.08);
  text-align: center;
}

.dark-mode .quote-detail {
  background: #2d2d2d;
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.quote-detail blockquote {
  font-size: 1.5rem;
  font-style: italic;
  color: #003087;
  margin: 20px 0;
  padding: 20px;
  border-left: 4px solid #74b9ff;
}

.dark-mode .quote-detail blockquote {
  color: #e63946;
  border-left-color: #ff6b6b;
}

.quote-detail cite {
  font-size: 1rem;
  color: #666;
  font-family: "Merriweather", serif;
}

.dark-mode .quote-detail cite {
  color: rgba(255, 255, 255, 0.7);
}

/* Accessibility Enhancements */
:focus-visible {
  outline: 2px solid #003087;
  outline-offset: 2px;
}

.dark-mode :focus-visible {
  outline-color: #e63946;
}

/* Print Styles */
@media print {
  header,
  footer,
  nav,
  .search-container,
  #dark-mode-toggle,
  .share-buttons,
  .weather-tabs,
  .pagination-container {
    display: none;
  }
  main {
    grid-template-columns: 1fr;
  }
  #latest-highlights,
  #quick-weather {
    display: none;
  }
  .content-form,
  .weather-section-full,
  .weather-card,
  .feature-card,
  .weather-detail {
    box-shadow: none;
    border: none;
    background: none;
  }
  body {
    background: white;
    color: black;
  }
  a {
    text-decoration: underline;
    color: #000;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  body {
    background: #fff;
    color: #000;
  }
  .dark-mode {
    background: #000;
    color: #fff;
  }
  a,
  button,
  .btn-primary,
  .tab-button,
  .weather-tab-btn,
  .form-submit-btn,
  .page-btn,
  .share-btn,
  #dark-mode-toggle {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
  }
  .dark-mode a,
  .dark-mode button,
  .dark-mode .btn-primary,
  .dark-mode .tab-button,
  .dark-mode .weather-tab-btn,
  .dark-mode .form-submit-btn,
  .dark-mode .page-btn,
  .dark-mode .share-btn,
  .dark-mode #dark-mode-toggle {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
  }
  .input-base,
  .form-group input,
  .form-group textarea,
  #quick-weather-input,
  #search-bar,
  .action-select {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
  }
  .dark-mode .input-base,
  .dark-mode .form-group input,
  .dark-mode .form-group textarea,
  .dark-mode #quick-weather-input,
  .dark-mode #search-bar,
  .dark-mode .action-select {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .btn-primary:hover,
  .page-btn:hover,
  .share-btn:hover,
  #dark-mode-toggle:hover,
  .tab-button:hover,
  .weather-tab-btn:hover,
  .form-submit-btn:hover,
  .weather-card:hover,
  .feature-card:hover,
  .weather-detail-item:hover,
  .card:hover,
  .author-item:hover,
  #latest-highlights:hover,
  #search-results:hover,
  #news-articles:hover,
  #contact-content:hover,
  #quotes-content:hover,
  #articles-content:hover,
  .weather-section-full:hover,
  #quick-weather:hover,
  .highlight-item:hover,
  .search-result-item:hover,
  .news-item:hover,
  .quote-item:hover,
  .article-item:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #003087;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e63946;
}

.dark-mode ::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.dark-mode ::-webkit-scrollbar-thumb {
  background: #e63946;
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #ff6b6b;
}

/* Selection Styling */
::selection {
  background: #74b9ff;
  color: white;
}

.dark-mode ::selection {
  background: #e63946;
  color: white;
}

/* Ensure Consistent Box Sizing */
html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

/* Performance Optimizations */
body {
  will-change: background-color, color;
}

header,
.weather-section-full,
.weather-card,
.feature-card,
.card,
#latest-highlights,
#search-results,
#news-articles,
#contact-content,
#quotes-content,
#articles-content {
  will-change: transform, box-shadow;
}

/* Fallback for Older Browsers */
.no-backdrop-filter .quick-weather-search,
.no-backdrop-filter .weather-features {
  background: rgba(255, 255, 255, 0.2);
}

@supports not (backdrop-filter: blur(10px)) {
  .quick-weather-search,
  .weather-features {
    background: rgba(255, 255, 255, 0.2);
  }
}

/* Animation for Loading States */
@keyframes fadePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.loading-state {
  animation: fadePulse 1.5s ease-in-out infinite;
}

/* Enhanced Accessibility for Screen Readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent text overflow */
h1,
h2,
h3,
p,
a,
span,
div {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Enhanced hover states for touch devices */
@media (hover: none) {
  .btn-primary:hover,
  .page-btn:hover,
  .share-btn:hover,
  #dark-mode-toggle:hover,
  .tab-button:hover,
  .weather-tab-btn:hover,
  .form-submit-btn:hover,
  .weather-card:hover,
  .feature-card:hover,
  .weather-detail-item:hover,
  .card:hover,
  .author-item:hover,
  #latest-highlights:hover,
  #search-results:hover,
  #news-articles:hover,
  #contact-content:hover,
  #quotes-content:hover,
  #articles-content:hover,
  .weather-section-full:hover,
  #quick-weather:hover,
  .highlight-item:hover,
  .search-result-item:hover,
  .news-item:hover,
  .quote-item:hover,
  .article-item:hover {
    transform: none;
    box-shadow: none;
  }
  .btn-primary:active,
  .page-btn:active,
  .share-btn:active,
  #dark-mode-toggle:active,
  .tab-button:active,
  .weather-tab-btn:active,
  .form-submit-btn:active,
  .weather-card:active,
  .feature-card:active,
  .weather-detail-item:active,
  .card:active,
  .author-item:active,
  #latest-highlights:active,
  #search-results:active,
  #news-articles:active,
  #contact-content:active,
  #quotes-content:active,
  #articles-content:active,
  .weather-section-full:active,
  #quick-weather:active,
  .highlight-item:active,
  .search-result-item:active,
  .news-item:active,
  .quote-item:active,
  .article-item:active {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
  }
}

/* Custom Cursor */
body {
  cursor: default;
}

a,
button,
.btn-primary,
.page-btn,
.share-btn,
#dark-mode-toggle,
.tab-button,
.weather-tab-btn,
.form-submit-btn,
.weather-favorite-btn,
.action-select {
  cursor: pointer;
}

/* Ensure consistent font rendering */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Final tweaks for edge cases */
@media (max-width: 360px) {
  .site-logo {
    height: 35px;
  }
  .logo-fallback {
    font-size: 1.8rem;
  }
  h1,
  .weather-detail h2 {
    font-size: 1.8rem;
  }
  .weather-main-temp,
  .weather-detail .temp {
    font-size: 2.5rem;
  }
  .weather-icon {
    font-size: 2.5rem;
  }
  .weather-features h2 {
    font-size: 1.8rem;
  }
}

/* Ensure no unwanted outlines on click */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Prevent horizontal scrolling */
body {
  overflow-x: hidden;
}

/* Final fallback for older browsers */
.no-grid-support main {
  display: block;
}

.no-grid-support .weather-grid,
.no-grid-support .features-grid,
.no-grid-support .dashboard-cards,
.no-grid-support .author-list {
  display: block;
}

.no-grid-support .weather-card,
.no-grid-support .feature-card,
.no-grid-support .card,
.no-grid-support .author-item {
  margin-bottom: 20px;
}

/* Ensure all transitions are smooth */
* {
  transition: color 0.3s ease, background-color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Final media query for ultra-wide screens */
@media (min-width: 2000px) {
  .container {
    max-width: 1800px;
  }
  main {
    grid-template-columns: 1fr 3fr 1fr;
  }
  .weather-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  .dashboard-cards {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* End of CSS */
