/* ======= Base Reset ======= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: #f9f9f9;
  color: #333;
  height: 100%;
}

/* ========== SITE HEADER ========== */
.site-header {
  background-color: #1f2937;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #fff;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

/* ========== NAVIGATION ========== */
.nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding-left: 0;
  margin: 0;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #60a5fa;
}

/* ========== SEARCH FORM ========== */
.search-form {
  margin-left: 1rem;
}

.search-form input {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: none;
  font-size: 0.95rem;
}

/* ========== MENU TOGGLE BUTTON ========== */
.menu-toggle {
  font-size: 1.6rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: none;
}

/* ========== MOBILE STYLES ========== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 1rem;
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
  }

  .nav-links a {
    padding: 0.5rem 0;
    width: 100%;
    border-bottom: 1px solid #374151;
  }

  .search-form {
    width: 100%;
    margin-top: 0.75rem;
  }

  .search-form input {
    width: 100%;
  }
}












/* ======= Header Styles ======= */
.header {
  background-color: #1f2937; /* dark gray */
  color: #ffffff;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1000;
}

.header__logo {
  font-size: 1.6rem;
  font-weight: bold;
  text-decoration: none;
  color: #ffffff;
  letter-spacing: 1px;
}

.header__nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.header__nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  transition: background 0.3s ease, color 0.3s ease;
  border-radius: 4px;
}

.header__nav ul li a:hover,
.header__nav ul li a.active {
  background-color: #2563eb; /* blue on hover */
  color: white;
}

/* ======= Search Bar ======= */
.search--form {
  margin-left: 1rem;
}

.search--form input {
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: none;
  font-size: 0.95rem;
}

/* ======= Mobile Menu Toggle ======= */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  margin-left: auto;
  cursor: pointer;
}

@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

  .header__nav {
    width: 100%;
    display: none;
    flex-direction: column;
    background-color: #374151; /* darker shade */
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
  }

  .header__nav.open {
    display: flex;
  }

  .header__nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .search--form {
    width: 100%;
    margin-top: 1rem;
  }

  .search--form input {
    width: 100%;
  }
}






/* ======= Footer ======= */
.footer {
  background-color: #111;
  color: #eee;
  padding: 20px 0;
  font-size: 0.95rem;
  margin-top: 40px;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 15px;
  gap: 10px;
}

.footer-left p {
  margin: 5px 0;
  text-align: center;
}

.footer-left span {
  color: #4fc3f7;
}

.footer-right {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-right a {
  color: #4fc3f7;
  text-decoration: none;
  transition: color 0.2s;
}

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

@media (min-width: 600px) {
  .footer-container {
    flex-direction: row;
    align-items: flex-start;
  }

  .footer-left,
  .footer-right {
    text-align: left;
  }
}













/* ======= Author Section ======= */
/* Author Section */
.auther {
  text-align: center;
  margin-bottom: 2rem;
}
.auther__heading {
  font-size: 2rem;
  font-weight: bold;
}
.auther__body {
  font-size: 1rem;
  color: #555;
}

/* Hero Image */
.my-img {
  text-align: center;
  margin-bottom: 2rem;
}
.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Latest Posts Section */
.articles {
  max-width: 1200px;
  margin: auto;
}
.articles__heading {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* Card Layout */
.articles-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 0.5rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
}
.card a {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 1rem;
}

/* Media (Image, Video, Audio) */
.media-box {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}
.media-box img,
.media-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-box audio {
  width: 100%;
}

/* Post Meta */
.card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.article-list_date {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.5rem;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #999;
}

/* Pagination */
.pagination {
  display: block;
  text-align: center;
  margin: 2rem 0;
  color: #007bff;
  font-weight: bold;
  text-decoration: none;
}
.pagination:hover {
  text-decoration: underline;
}

/* ======= Media Queries ======= */
@media (min-width: 600px) {
  .articles-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .author__heading {
    font-size: 2.2rem;
  }
}

@media (min-width: 900px) {
  .articles-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-image {
    max-height: 480px;
  }
}












/* ======= Single Post Page ======= */
.single-post {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.post-image-container {
  text-align: center;
  margin-bottom: 1.5rem;
}

.post-image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.post-title {
  font-size: 2rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 1rem;
  line-height: 1.3;
  text-align: center;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #374151;
  padding-top: 1rem;
}

.post-body p {
  margin-bottom: 1.2rem;
}

/* Responsive improvements */
@media (max-width: 600px) {
  .post-title {
    font-size: 1.5rem;
  }

  .post-body {
    font-size: 1rem;
  }
}






/* ======= Admin Layout ======= */
body {
  background-color: #f3f4f6;
}

/* Optional: darker admin header override */
.header-admin {
  background-color: #111827;
}

/* ======= Admin Container ======= */
.admin-container {
  max-width: 1100px;
  margin: 2rem auto;
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* ======= Admin Heading ======= */
.admin-heading {
  font-size: 1.8rem;
  color: #1f2937;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

/* ======= Admin Table ======= */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.admin-table th {
  background-color: #f9fafb;
  color: #374151;
  font-weight: 600;
}

.admin-table td {
  color: #4b5563;
}

.admin-actions a {
  margin-right: 0.5rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.admin-actions a:hover {
  text-decoration: underline;
}

/* ======= Admin Forms ======= */
.admin-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: #1f2937;
}

.admin-form input, .admin-form select {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.admin-form button {
  background-color: #2563eb;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.admin-form button:hover {
  background-color: #1d4ed8;
}

/* Responsive layout */
@media (max-width: 768px) {
  .admin-table th, .admin-table td {
    font-size: 0.85rem;
    padding: 0.6rem;
  }

  .admin-heading {
    font-size: 1.4rem;
  }
}











/* ======= Owner Dashboard ======= */
.owner-dashboard {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.owner-dashboard h2,
.owner-dashboard h3 {
  color: #1f2937;
  margin-bottom: 1rem;
}

/* ======= Registration Form ======= */
.owner-dashboard form {
  margin-bottom: 2rem;
}

.owner-dashboard form input[type="text"],
.owner-dashboard form input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.owner-dashboard form .btn,
.owner-dashboard button {
  background-color: #2563eb;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  text-transform: capitalize;
}

.owner-dashboard .btn:hover,
.owner-dashboard button:hover {
  background-color: #1d4ed8;
}

/* ======= User Cards ======= */
.user-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.user-card {
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info strong {
  display: block;
  color: #111827;
  font-size: 1.1rem;
}

.user-info small {
  color: #6b7280;
}

.user-actions form {
  display: inline-block;
  margin-left: 0.5rem;
}

/* ======= Button Colors ======= */
.restrict {
  background-color: #f59e0b;
}

.restrict:hover {
  background-color: #d97706;
}

.unrestrict {
  background-color: #10b981;
}

.unrestrict:hover {
  background-color: #059669;
}

.delete {
  background-color: #ef4444;
}

.delete:hover {
  background-color: #dc2626;
}

/* Responsive */
@media (max-width: 600px) {
  .user-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .user-actions form {
    margin-left: 0;
  }
}











/* ========== DASHBOARD WRAPPER ========== */
.post-dashboard {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
  font-family: "Segoe UI", sans-serif;
}

/* ========== HEADER ========== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-header h2 {
  font-size: 1.6rem;
  color: #1f2937;
}

.add-btn {
  background-color: #2563eb;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
}

.add-btn:hover {
  background-color: #1e40af;
}

/* ========== POST LIST ========== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card {
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.post-card-title a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
  word-break: break-word;
}

.post-card-title a:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* ========== ACTION BUTTONS ========== */
.post-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-edit {
  background-color: #10b981;
  color: white;
}

.btn-edit:hover {
  background-color: #059669;
}

.btn-delete {
  background-color: #ef4444;
  color: white;
}

.btn-delete:hover {
  background-color: #dc2626;
}


.post-meta {
  margin-top: 5px;
  font-size: 0.9rem;
  color: #555;
}



/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 600px) {
  .post-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-card-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }
}
