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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Header Styles */
header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Carousel Styles */
.carousel-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.carousel {
  position: relative;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel-track {
  position: relative;
  height: 400px;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 4px;
  transition: background 0.3s;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.carousel-btn-prev {
  left: 10px;
}

.carousel-btn-next {
  right: 10px;
}

.carousel-dots {
  text-align: center;
  padding: 20px;
  background: #fff;
}

.dot {
  height: 15px;
  width: 15px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active,
.dot:hover {
  background-color: #717171;
}

/* Navigation */
.main-nav {
  background: #fff;
  padding: 1rem 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-nav a {
  margin: 0 2rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.main-nav a:hover {
  background-color: #f1f3f4;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Posts Preview Section */
.posts-preview {
  background: #fff;
  padding: 3rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.posts-preview h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
  font-size: 2.5rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.post-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.post-card h3 {
  margin-bottom: 0.5rem;
}

.post-card h3 a {
  text-decoration: none;
  color: #333;
}

.post-card h3 a:hover {
  color: #667eea;
}

.post-card time {
  color: #666;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 1rem;
}

.post-card p {
  margin-bottom: 1rem;
  color: #555;
}

.read-more {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

.view-all-posts {
  display: block;
  text-align: center;
  background: #667eea;
  color: white;
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  max-width: 200px;
  margin: 0 auto;
  transition: background 0.3s;
}

.view-all-posts:hover {
  background: #5a67d8;
}

/* Gallery Styles */
.gallery-header {
  text-align: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.gallery-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-container {
  padding: 3rem 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.3s;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  max-width: 800px;
  border-radius: 8px;
}

.caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
}

/* Post Content Styles */
article {
  background: #fff;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

article h1 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

article h2 {
  color: #444;
  margin: 2rem 0 1rem 0;
  font-size: 2rem;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.5rem;
}

article h3 {
  color: #555;
  margin: 1.5rem 0 1rem 0;
  font-size: 1.5rem;
}

article time {
  color: #666;
  font-size: 1rem;
  display: block;
  margin-bottom: 2rem;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

article p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

article ul,
article ol {
  margin: 1rem 0 1rem 2rem;
}

article li {
  margin-bottom: 0.5rem;
}

/* Post List Styles */
.post-list {
  padding: 2rem 0;
}

.post-list article {
  margin-bottom: 2rem;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-list h2 {
  margin-bottom: 0.5rem;
}

.post-list h2 a {
  text-decoration: none;
  color: #333;
}

.post-list h2 a:hover {
  color: #667eea;
}

/* Footer */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

/* Maintenance Mode Styles */
.maintenance {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  margin: 2rem 0;
  color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .carousel-track {
    height: 250px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .main-nav a {
    margin: 0 1rem;
    display: inline-block;
    margin-bottom: 0.5rem;
  }

  article {
    padding: 2rem 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
  }
}
