/* ===========================
   Reset & Base
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: #1a202c;
  background: #f7fafc;
  font-size: 16px;
}
/* ===========================
 Input
=========================== */
.input-container {
  position: relative;
  display: inline-block;
  width: 100%;
}
input {
  width: 100%;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  background: white;
}
.input-container input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  background: white;
}

.input-container input:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66,153,225,0.1);
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #718096;
}
/* ===========================
 Header & Top Bar
=========================== */
.header-wrapper {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.top-bar {
  background: #2d3748;
  color: #e2e8f0;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.container, .top-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar .date-time {
  font-weight: 500;
}

.login-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.login-btn {
  background: #4299e1;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.login-btn:hover {
  background: #3182ce;
  transform: translateY(-1px);
}

.login-icon {
  font-size: 1rem;
}

/* ===========================
 Logo & Header
=========================== */
header {
  padding: 1rem 0;
  background: #ffffff;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin: 0;
}

header h1 a {
  color: #2d3748;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #4299e1, #3182ce);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.tagline {
  font-size: 0.875rem;
  color: #718096;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ===========================
 Search Box
=========================== */
.search-container {
  position: relative;
}

.search-box {
  width: 100%;
  max-width: 300px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  background: white;
}

.search-box:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66,153,225,0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #718096;
}

/* ===========================
 Navigation
=========================== */
nav {
  background: #2d3748;
  margin-top: 1rem;
  overflow: hidden;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  border-right: 1px solid #4a5568;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

nav a:last-child {
  border-right: none;
}

nav a:hover {
  background: #4a5568;
  color: #ffffff;
}

nav a.active {
  background: #4299e1;
  color: #ffffff;
}

/* ===========================
 Main Content Layout
=========================== */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  min-height: calc(100vh - 300px);
}

.content-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.main-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ===========================
 Breaking News Banner
=========================== */
.breaking-news {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
  padding: 0.75rem 1rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(229,62,62,0.3);
}

.breaking-label {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.breaking-text {
  font-weight: 500;
  animation: scroll-text 20s linear infinite;
}

@keyframes scroll-text {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ===========================
 Flash Messages
=========================== */
.flash-messages { margin-bottom: 2rem; }

.flash-message {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  position: relative;
  transition: opacity 0.3s ease;
}

.flash-success { background: #c6f6d5; color: #2d7d32; border-left: 4px solid #38a169; }
.flash-error   { background: #fed7d7; color: #c53030; border-left: 4px solid #e53e3e; }
.flash-warning { background: #fefcbf; color: #d69e2e; border-left: 4px solid #ed8936; }
.flash-info    { background: #bee3f8; color: #2b6cb0; border-left: 4px solid #4299e1; }

.flash-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
}
.flash-close:hover { opacity: 1; }

/* ===========================
 Featured Article
=========================== */
.featured-article-container {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.featured-image { flex: 1 1 40%; min-width: 250px; }

.featured-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

.featured-content { flex: 2 1 55%; min-width: 250px; }

/* ===========================
 Recent Articles Grid
=========================== */
.recent-articles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.recent-article {
  flex: 1 1 calc(20% - 20px);
  border: 1px solid #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.recent-article img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* ===========================
 Articles & Read More
=========================== */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #718096;
  flex-wrap: wrap;
}

.category-badge {
  background: #4299e1;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-date, .article-author { font-weight: 500; }
.article-author::before { content: "By "; color: #a0aec0; }

.article-description {
  line-height: 1.8;
  font-size: 1rem;
  margin-top: 15px;
  overflow: visible; /* remove scroll */
  max-height: none;
}

.article-description p { margin-bottom: 1rem; }

.article-description ul,
.article-description ol {
  margin-left: 1.5rem;
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.article-description li { margin-bottom: 0.5rem; }

.article-image {
  width: 100%;
  max-height: 400px; /* shorter image */
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.article-image:hover { transform: scale(1.02); }

.read-more {
  color: #4299e1;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
  margin-top: 1rem;
}
.read-more:hover { color: #3182ce; }
.read-more::after { content: "→"; font-weight: bold; }

/* ===========================
 Sidebar
=========================== */
.sidebar {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar h3 {
  color: #2d3748;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #4299e1;
}

/* ===========================
 Footer
=========================== */
footer {
  background: #2d3748;
  color: #e2e8f0;
  margin-top: 4rem;
  padding: 3rem 0 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #4a5568;
  font-size: 0.875rem;
  color: #a0aec0;
}

/* ===========================
 Modal Styling
=========================== */
.img-modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.img-modal-content {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.img-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.img-modal-close:hover { color: #ccc; }

/* ===========================
 Mobile Responsive
=========================== */
.mobile-menu-btn { display: none; }

@media (max-width: 1024px) {
  .recent-article { flex: 1 1 calc(33.333% - 20px); }
}

@media (max-width: 768px) {
  .top-bar { display: none; }

  .header-container {
    flex-direction: column;
    text-align: center;
    position: relative;
  }

  .mobile-menu-btn {
    display: block;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2d3748;
    padding: 0.5rem;
  }

  header h1 { font-size: 2rem; }

  .nav-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2d3748;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
  }
  .nav-container.mobile-open { display: flex; }

  nav a {
    border-right: none;
    border-bottom: 1px solid #4a5568;
    padding: 1rem;
  }
  nav a:last-child { border-bottom: none; }

  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; margin-top: 2rem; }
  .featured-article h2 { font-size: 2rem; }
  main { margin: 1rem auto; }
  .search-container { width: 100%; margin-top: 1rem; }
  .search-box { max-width: none; }
}

@media (max-width: 480px) {
  .main-content {
    padding: 1rem;
    margin: 0 -0.5rem;
  }

  header h1 { font-size: 1.75rem; }
  .footer-content { grid-template-columns: 1fr; text-align: center; }
  .newsletter-form { flex-direction: column; }

  .article-title { font-size: 1.75rem; }
  .article-image { max-height: 200px; }
}

/* Accessibility */
a:focus, button:focus, input:focus {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

.logo-img { height: 40px; width: auto; border-radius: 6px; }
/* ===========================
 Article Description Fix
 =========================== */
 .article-container .article-description {
  max-height: none !important;
  overflow: visible !important;
}

/* ===========================
Modal Styling
=========================== */
.img-modal {
display: none; /* hidden by default */
position: fixed;
z-index: 9999;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0,0,0,0.8);
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
}

.img-modal-content {
max-width: 90%;
max-height: 80%;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.img-modal-close {
position: absolute;
top: 20px;
right: 30px;
color: #fff;
font-size: 40px;
font-weight: bold;
cursor: pointer;
transition: color 0.3s ease;
}

.img-modal-close:hover { color: #ccc; }

/* ===========================
Alert
=========================== */

.alert {
  background-color: #ffffff; /* soft yellow */
  border-left: 5px solid #3F00E6; /* sunflower color */
  padding: 12px 20px;
  margin: 15px auto;
  max-width: 1000px;
  border-radius: 6px;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert a.alert-cta {
  margin-left: 10px;
  color: #000000;
  font-weight: bold;
  text-decoration: underline;
}

.alert a.alert-cta:hover {
  color: #000000;
}

.alert .alert-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #555;
  margin-left: 15px;
}

.alert .alert-close:hover {
  color: #000;
}

/* ===========================
SEQTA Sunflower Alert
=========================== */

.sunflower-alert {
  background-color: #fff4e5; /* soft yellow */
  border-left: 5px solid #ffb347; /* sunflower color */
  padding: 12px 20px;
  margin: 15px auto;
  max-width: 1000px;
  border-radius: 6px;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sunflower-alert a.alert-cta {
  margin-left: 10px;
  color: #d35400;
  font-weight: bold;
  text-decoration: underline;
}

.sunflower-alert a.alert-cta:hover {
  color: #e67e22;
}

.sunflower-alert .alert-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #555;
  margin-left: 15px;
}

.sunflower-alert .alert-close:hover {
  color: #000;
}
