
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #222;
}

header {
    background: #111827;
    color: white;
    text-align: center;
    padding: 25px;
}

header h1 {
    font-size: 38px;
    letter-spacing: 2px;
}

header p {
    margin-top: 8px;
    color: #ddd;
}

nav {
    background: #c8102e;
    padding: 15px;
    text-align: center;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 12px;
    font-weight: bold;
}

.breaking {
    background: white;
    padding: 15px;
    border-bottom: 2px solid #c8102e;
}

.breaking strong {
    background: #c8102e;
    color: white;
    padding: 10px;
    margin-right: 10px;
}

main {
    max-width: 1150px;
    margin: 30px auto;
    padding: 15px;
}

main h2 {
    border-left: 5px solid #c8102e;
    padding-left: 12px;
    margin-bottom: 25px;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px #ddd;
}

.news-image {
    background: #e5e7eb;
    padding: 45px;
    text-align: center;
    font-size: 45px;
    margin-bottom: 15px;
}

.news-card p {
    margin: 12px 0;
    line-height: 1.5;
}

.news-card a {
    color: #c8102e;
    font-weight: bold;
}

footer {
    background: #111827;
    color: white;
    text-align: center;
    padding: 25px;
}

@media (max-width: 700px) {
    .news-container {
        grid-template-columns: 1fr;
    }

    nav a {
        display: inline-block;
        margin: 8px;
    }
}

.search-section {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: #ffffff;
}

#newsSearch {
  width: 100%;
  max-width: 500px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 15px;
}

#searchButton {
  background: #c8102e;
  color: white;
  border: none;
  padding: 12px 22px;
  border-radius: 5px;
  cursor: pointer;
}

#searchButton:hover {
  background: #a00d25;
}

/* Breaking News Ticker Fix */

.breaking {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.breaking strong {
  flex-shrink: 0;
}

.ticker-container {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ticker-text {
  display: inline-block;
  width: max-content;
  white-space: nowrap;
  padding-left: 100%;
  animation: newsTicker 15s linear infinite;
}

@keyframes newsTicker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

.ticker-container:hover .ticker-text {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-text {
    animation: none;
    padding-left: 0;
    white-space: normal;
  }
}

/* Mobile Responsive Design */

@media (max-width: 768px) {
  header {
    padding: 15px;
    text-align: center;
  }

  header h1 {
    font-size: 24px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 10px;
  }

  nav a {
    font-size: 13px;
    padding: 7px;
  }

  main {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
  }

  .news-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .news-card {
    width: 100%;
    box-sizing: border-box;
  }

  .search-section {
    padding: 10px;
  }

  #newsSearch {
    min-width: 0;
  }

  #searchButton {
    padding: 10px 12px;
  }

  .breaking {
    font-size: 12px;
  }
}

/* Professional Mobile Navigation */

@media (max-width: 768px) {
  #categoryNav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px 12px;
    padding: 10px 8px;
  }

  #categoryNav a {
    display: inline-block;
    margin: 0;
    padding: 8px 5px;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
  }

  .breaking {
    padding: 8px;
    gap: 8px;
  }

  .breaking strong {
    font-size: 11px;
    white-space: nowrap;
  }

  .ticker-container {
    min-width: 0;
  }
}

/* Northern Express Times Logo */

.site-logo {
    display: block;
    width: 100%;
    max-width: 650px;
    height: auto;
    margin: 0 auto;
}

/* Mobile Responsive Logo */

@media (max-width: 600px) {
    .site-logo {
        max-width: 100%;
    }
}

/* Featured News Section */

.featured-news {
    background: #ffffff;
    padding: 25px;
    margin: 25px auto;
    max-width: 1100px;
    border-radius: 10px;
    border-top: 4px solid #d4af37;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.featured-news h2 {
    color: #111827;
    font-size: 28px;
    margin-bottom: 20px;
    border-left: 5px solid #d4af37;
    padding-left: 12px;
}

#featuredNews img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
}

#featuredNews h3 {
    font-size: 26px;
    margin-top: 15px;
    color: #111827;
}

#featuredNews p {
    color: #555;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .featured-news {
        padding: 15px;
        margin: 15px 10px;
    }

    #featuredNews h3 {
        font-size: 21px;
    }
}

/* Full Width Website Logo */

header {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #101827;
}

header .site-logo {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    border-radius: 0;
}

@media (max-width: 600px) {
    header .site-logo {
        width: 100%;
        height: auto;
    }
}

/* Professional News Header */

.top-bar {
    background: #f5f5f5;
    color: #333;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}

.news-header {
    background: #071c40;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.news-header .site-logo {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
}

@media (max-width: 600px) {
    .news-header {
        padding: 10px;
    }

    .news-header .site-logo {
        max-width: 300px;
    }
}

/* Blue Navigation Bar */

#categoryNav {
    background: #08285c;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 12px;
}

#categoryNav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 5px;
}

#categoryNav a:hover {
    background: #d60022;
}

@media (max-width: 600px) {
    #categoryNav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    #categoryNav a {
        white-space: nowrap;
    }
}

/* Small News Channel Logo */

.news-header {
    background: #08285c;
    padding: 5px 15px;
    width: auto;
    display: flex;
    justify-content: flex-start;
}

.news-header .site-logo {
    width: 110px;
    max-width: 110px;
    height: auto;
    object-fit: contain;
}

/* Logo and Navigation in One Bar */

.news-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    background: #08285c;
    padding: 8px 20px;
    width: 100%;
    box-sizing: border-box;
}

.logo-link {
    flex-shrink: 0;
}

.news-header .site-logo {
    display: block;
    width: 110px;
    max-width: 110px;
    height: auto;
}

.news-header #categoryNav {
    flex: 1;
    justify-content: flex-start;
    background: transparent;
    padding: 0;
    min-width: 0;
}

@media (max-width: 600px) {
    .news-header {
        gap: 10px;
        padding: 8px;
    }

    .news-header .site-logo {
        width: 75px;
    }

    .news-header #categoryNav {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}

/* Bigger Logo and Single Navigation Bar */

.news-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 20px;
    background: #08285c;
}

.news-header .logo-link {
    flex-shrink: 0;
}

.news-header .site-logo {
    width: 180px;
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

.news-header #categoryNav {
    flex: 1;
    min-width: 0;
    background: transparent;
    justify-content: flex-start;
}

@media (max-width: 600px) {
    .news-header {
        padding: 8px;
        gap: 10px;
    }

    .news-header .site-logo {
        width: 100px;
        max-width: 100px;
    }
}

/* Northern Times Navigation */
#categoryNav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  background-color: #b80000;
  padding: 12px;
  border-radius: 5px;
}

#categoryNav a {
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: bold;
  padding: 10px 14px;
  border-radius: 4px;
  transition: background 0.3s;
}

#categoryNav a:hover {
  background-color: #850000;
}

@media (max-width: 768px) {
  #categoryNav {
    justify-content: flex-start;
  }

  #categoryNav a {
    font-size: 13px;
    padding: 8px;
  }
}

/* Breaking News Scrolling Animation */

.ticker-container {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ticker-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: newsScroll 20s linear infinite;
}

@keyframes newsScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.ticker-container:hover .ticker-text {
  animation-play-state: paused;
}
