/* Basic Blog Single Page - Modern & Responsive */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
}

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

/* ================= HEADER ================= */
header {
  display: flex;                 /* FIX */
  align-items: center;           /* FIX */
  justify-content: space-between;/* FIX */
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #fff;
  padding: 15px 20px;            /* FIX */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header .logo {
  font-size: 24px;
  font-weight: bold;
  color: #0ABAB5;
}

.logo span {
  color: #8A2BE2;
}

header nav {
  display: flex;
  align-items: center;
}

header nav a {
  margin-left: 20px;
  font-weight: 500;
  transition: 0.3s;
}

header nav a:hover {
  color: #ffd700;
}

/* ================= MOBILE NAV ================= */
.nav-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
}

/* Mobile Styles */
@media (max-width: 768px) {

  header nav {
    display: none;                 /* FIX */
    flex-direction: column;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    position: absolute;            /* FIX */
    top: 100%;                     /* FIX */
    left: 0;
    width: 100%;
    padding: 15px 0;
  }

  header nav a {
    margin: 12px 0;
    text-align: center;
  }

  header nav.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}

/* ================= HERO ================= */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e')
    no-repeat center center / cover;
  color: #fff;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 10px;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 20px;
}

/* ================= POSTS ================= */
.posts {
  width: 90%;
  max-width: 1000px;
  margin: 40px auto;
}

.post {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

/* Blog grid layout */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}


.post:hover {
  transform: translateY(-5px);
}

.post h2 {
  margin-bottom: 10px;
}

.post p {
  line-height: 1.6;
}

/* Post Meta */
.meta {
  font-size: 14px;
  color: #777;
  margin-bottom: 10px;
}

/* Post Links */
.post a {
  color: #0ABAB5;
  font-weight: 600;
}

.post a:hover {
  text-decoration: underline;
}

/* ================= SECTION TITLE ================= */
.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: #0f2027;
}

/* ================= INFO SECTIONS ================= */
.info-section {
  width: 90%;
  max-width: 900px;
  margin: 60px auto;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.info-section h2 {
  margin-bottom: 15px;
  color: #203a43;
}

.info-section p {
  line-height: 1.8;
}

/* Topics */
.topics {
  list-style: none;
  padding: 0;
}

.topics li {
  padding: 8px 0;
  font-size: 16px;
}

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 20px;
  background: #222;
  color: #fff;
  margin-top: 50px;
}

/* Active nav link */
header nav a.active {
  color: #ffd700;
  font-weight: 700;
}


/* ================= MOBILE REFINEMENTS ================= */
/* Smooth mobile nav animation */
header nav {
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }

  .section-title {
    font-size: 26px;
  }

  .info-section {
    padding: 25px;
  }

    header nav {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
  }

  header nav.active {
    max-height: 400px; /* enough to show all links */
    opacity: 1;
  }
}
