/* =========================
   RESET & BASE
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #f5f5f5;
  -webkit-font-smoothing: antialiased;
}

/* =========================
   GLOBAL ELEMENTS
========================= */
img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

p {
  color: #444;
}

/* =========================
   HEADER & NAVBAR
========================= */
header {
  background: #f5943c;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  max-width: 1300px;
  margin: auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-img {
  height: 64px;
  width: auto;
}

/* Navigation */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1rem;
  position: relative;
  transition: background 0.3s ease, color 0.3s ease;
  border-radius: 6px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 15%;
  bottom: 6px;
  width: 70%;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

/* Hover / Active */
.nav-links a:hover,
.nav-links a.active {
  background: #0057b8; /* blue */
  color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Burger button (hidden on desktop) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 21px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Burger animation */
.burger.toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.toggle span:nth-child(2) {
  opacity: 0;
}

.burger.toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Container */
.container {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 20px;
}

/* Layout */
.content-area {
  display: flex;
  gap: 30px;
}

/* Blog list */
.blog-list {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Blog post */
.blog-post {
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(28, 45, 95, 0.1);
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}
.blog-post:hover,
.blog-post:focus-within {
  box-shadow: 0 6px 20px rgba(28, 45, 95, 0.15);
  transform: translateY(-4px);
  outline: none;
}
.blog-post:nth-child(1) {
  animation-delay: 0.1s;
}
.blog-post:nth-child(2) {
  animation-delay: 0.3s;
}
.blog-post:nth-child(3) {
  animation-delay: 0.5s;
}

.post-thumbnail {
  width: 200px;
  object-fit: cover;
  flex-shrink: 0;
  border-right: 1px solid #a8b8db; /* light blue border consistent with main */
  transition: transform 0.3s ease;
}
.blog-post:hover .post-thumbnail {
  transform: scale(1.05);
}

.post-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.post-content h2 {
  margin-bottom: 10px;
  color: #1c2d5f; /* main CSS dark blue */
}
.post-meta {
  font-size: 0.9rem;
  color: #475a94; /* main CSS medium blue */
  margin-bottom: 15px;
}
.read-more {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  color: #1c2d5f;
  transition: color 0.3s ease;
  text-decoration: none;
}
.read-more:hover,
.read-more:focus {
  color: #f28c28;
  outline-offset: 3px;
  outline: 3px solid #f28c28;
}

/* Sidebar */
.sidebar {
  flex: 1;
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(28, 45, 95, 0.1);
  padding: 20px;
  border-radius: 10px;
  height: fit-content;
}
.sidebar h3 {
  margin-bottom: 15px;
  border-bottom: 2px solid #f28c28;
  padding-bottom: 5px;
  color: #f28c28;
}
.recent-posts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.recent-posts a {
  color: #1c2d5f;
  font-weight: 600;
  transition: color 0.3s ease;
  text-decoration: none;
}
.recent-posts a:hover,
.recent-posts a:focus {
  color: #f28c28;
  outline-offset: 3px;
  outline: 3px solid #f28c28;
}

/* Pagination */
.pagination {
  margin: 40px 0 20px;
  text-align: center;
}
.pagination button {
  background-color: #a8b8db;
  border: none;
  color: #1c2d5f;
  font-weight: 700;
  padding: 10px 15px;
  margin: 0 5px;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.pagination button.active,
.pagination button:hover:not(:disabled),
.pagination button:focus:not(:disabled) {
  background-color: #f28c28;
  color: #fff;
  outline: none;
}
.pagination button:focus {
  outline: 3px solid #f28c28;
  outline-offset: 3px;
}
.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background-color: #cbd5e1;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  overflow: auto;
  padding: 60px 20px;
}
.modal-content {
  max-width: 700px;
  margin: 40px auto;
  background: white;
  border-radius: 10px;
  padding: 30px 40px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  animation: slideDown 0.3s ease forwards;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  transition: color 0.3s ease;
}
.modal-close:hover,
.modal-close:focus {
  color: #f28c28;
  outline-offset: 3px;
  outline: 3px solid #f28c28;
}

/* Animations */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .content-area {
    flex-direction: column;
  }
  .blog-post {
    flex-direction: column;
  }
  .post-thumbnail {
    width: 100%;
    height: 220px;
    border-right: none;
    border-bottom: 1px solid #a8b8db;
  }
  .sidebar {
    order: -1;
    margin-bottom: 30px;
  }
}

footer {
  background-color: #1c2d5f; /* dark blue */
  color: #a8b8db; /* light blue text */
  text-align: center;
  padding: 25px 20px 15px;
  margin-top: auto;
}

.footer-nav {
  margin-bottom: 15px;
}

.footer-nav a {
  color: #a8b8db; /* light blue */
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #f28c28; /* orange */
}

.footer-nav a:focus {
  outline: 3px solid #f28c28;
  outline-offset: 2px;
}

.footer-nav {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: #a8b8db;
}


/* Social icons */

.social-icons {
  margin-bottom: 10px;
}

.social-icons a {
  color: #a8b8db;
  margin: 0 10px;
  font-size: 1.3rem;
  transition: color 0.3s ease;
  display: inline-block;
}

.social-icons a:hover {
  color: #f28c28;
  transform: scale(1.1);
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:focus {
  outline: 3px solid #f28c28;
  outline-offset: 2px;
}
