/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  background: #f7f7f7;
  color: #333;
  padding: 1rem;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
/* Header with a horizontal layout and gradient background */
header {
  background: linear-gradient(90deg, #003366, #ffffff);
  padding: 10px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

/* Logo styling */
.logo img {
  max-height: 60px;
  width: auto;
}

/* Site Info (Title & Tagline) */
.site-info {
  flex-grow: 1;
  margin-left: 20px;
  text-align: left;
  color: #003366;
}
.site-info h1 {
  font-size: 2rem;
  margin: 0;
}
.site-info .tagline {
  font-size: 1rem;
  margin: 0;
  color: #003366;
}

/* Navigation Menu */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.main-nav ul li a {
  color: #003366;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  transition: color 0.3s ease;
}
.main-nav ul li a:hover {
  color: #ff6600;
}

/* Responsive Header: Stack elements only on smaller screens */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: center;
  }
  .site-info {
    margin-left: 0;
    text-align: center;
    margin-top: 10px;
  }
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
  }
}

/* ==========================================================================
   CONTAINER & ARTICLE STYLES
   ========================================================================== */
.container {
  max-width: 800px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article {
  margin-bottom: 20px;
}
.article h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #222;
}
.article .article-date {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 10px;
}

/* Article images: Fit within the container and never exceed 750px */
.article img {
  max-width: 750px;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
}

.article .content {
  font-size: 1rem;
  color: #444;
  margin-bottom: 10px;
}

.view-link {
  color: #007bff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.view-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   SOCIAL SHARING SECTION
   ========================================================================== */
#social-share {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
#social-share h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #333;
}
#social-share ul {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
}
#social-share li {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}
#social-share li i {
  font-size: 1.1rem;
  margin-right: 5px;
}
#social-share li a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}
#social-share li a:hover {
  color: #0056b3;
}

/* ==========================================================================
   UPLOAD FORM (upload.php)
   ========================================================================== */
.form-container {
  max-width: 600px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}
input[type="text"],
textarea,
.editable {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  color: #333;
}
.editable {
  min-height: 150px;
}
button {
  background: #007bff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}
button:hover {
  background: #0056b3;
}

/* ==========================================================================
   MANAGE POSTS TABLE (manage_posts.php)
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
table th,
table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
table th {
  background: #f8f8f8;
  font-weight: 600;
}
table img {
  max-width: 80px;
  height: auto;
  border-radius: 4px;
}
.action-link {
  color: #d9534f;
  text-decoration: none;
  font-weight: 600;
}
.action-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }
  .main-nav ul li a {
    font-size: 0.9rem;
  }
  .article h2 {
    font-size: 1.5rem;
  }
  .view-link {
    font-size: 0.8rem;
  }
  button {
    width: 100%;
    font-size: 1rem;
  }
}
