/* =====================
   RESET & GLOBAL STYLES
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* =====================
   HEADER
===================== */
.header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

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

.logo {
  height: 40px;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: bold;
  color: #0077cc;
}

.top-nav {
  display: flex;
  gap: 20px;
}

.top-nav a {
  font-weight: 500;
  color: #333;
  transition: color 0.2s;
}

.top-nav a:hover {
  color: #0077cc;
}

.header-search {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.header-search input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.header-search button {
  background: #0077cc;
  border: none;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.header-search img {
  width: 18px;
  filter: invert(1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle img {
  width: 24px;
}

/* =====================
   SIDEBAR
===================== */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 250px;
  height: 100%;
  background: #fff;
  border-right: 1px solid #ddd;
  transition: left 0.3s;
  z-index: 1200;
  padding: 20px;
  overflow-y: auto;
}

.sidebar.active {
  left: 0;
}

.sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.sidebar-nav ul {
  list-style: none;
  margin-top: 20px;
}

.sidebar-nav li {
  margin-bottom: 12px;
}

.sidebar-nav a {
  color: #333;
  font-weight: 500;
}

.sidebar-nav a:hover {
  color: #0077cc;
}

.sidebar-social {
  margin-top: 20px;
}

.sidebar-social img {
  width: 22px;
  margin-right: 10px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1100;
}

.overlay.active {
  display: block;
}

/* =====================
   HERO
===================== */
.hero {
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 100px 20px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.cta {
  display: inline-block;
  background: #0077cc;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}

.cta:hover {
  background: #005fa3;
}

/* =====================
   CATEGORIES
===================== */
.categories-section {
  padding: 60px 0;
  background: #fff;
}

.categories-section h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 2rem;
}

.subtitle {
  text-align: center;
  margin-bottom: 30px;
  color: #666;
}

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

.card {
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-body {
  padding: 15px;
  flex: 1;
}

.card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.card-body p {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: #555;
}

.meta {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 12px;
}

.card-btn {
  display: inline-block;
  background: #0077cc;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.card-btn:hover {
  background: #005fa3;
}

/* =====================
   ARTICLES SECTION
===================== */
.articles-section {
  padding: 60px 0;
  background: #f9f9f9;
}

.articles-section h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
}

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

.article-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

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

.article-body {
  padding: 15px;
}

.article-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.article-body p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}

.read-more {
  color: #0077cc;
  font-weight: 500;
}

/* =====================
   QUICK LINKS
===================== */
.quick-links {
  background: #fff;
  border-top: 1px solid #ddd;
  padding: 20px 0;
  text-align: center;
}

.quick-links a {
  margin: 0 10px;
  color: #0077cc;
  font-size: 0.9rem;
}

/* =====================
   FOOTER
===================== */
.site-footer {
  background: #222;
  color: #ccc;
  padding: 40px 20px 20px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.footer-logo {
  width: 60px;
  margin-bottom: 10px;
}

.footer-left p {
  font-size: 0.9rem;
  color: #aaa;
}

.footer-center h4,
.footer-right h4 {
  margin-bottom: 10px;
  color: #fff;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  color: #ccc;
  font-size: 0.9rem;
}

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

.social a {
  margin-right: 10px;
}

.social img {
  width: 22px;
  filter: brightness(0) invert(1);
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
  border-top: 1px solid #444;
  padding-top: 10px;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  .top-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}