.row-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.half-section {
  flex: 1 1 48%;
}

.section-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.section-grid .box {
  flex: 1 1 100%;
  background: #f7f7f7;
  padding: 15px;
  border: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .row-section {
    flex-direction: column;
  }

  .half-section {
    flex: 1 1 100%;
  }
}




/* Hide the menu by default on small screens */
.hamburger {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    background: #014a84;
    padding: 10px;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu ul {
    flex-direction: column;
  }

  .nav-menu ul li a {
    padding: 10px;
  }
}

/* cards for Achievements and events */

.section-grid .box {
  flex: 1 1 100%;
  background: #f9f9f9;
  padding: 12px;
  border: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  gap: 8px;
  min-height: 100px;
  max-height: 200px; /* ~40% of a typical 500px card */
  overflow: hidden;
}

/*

.section-grid .box .thumb img {
  min-height: 100px;
  max-height: 200px;
  object-fit: contain;
  width: 100%;
  border-radius: 4px;
}
*/

.section-grid .box h3 {
  font-size: 15px;
  margin: 0;
  line-height: 1.2em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-grid .box p {
  font-size: 13px;
  line-height: 1.4em;
  margin: 0;
  max-height: 3.2em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-grid .box .thumb img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 0px;
}


/* Visitor Counter Styles */
.dvc-counter {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
}

.dvc-counter .card-header {
    background: #2c3e50;
    color: white;
    padding: 12px 15px;
    font-weight: 600;
}

.dvc-counter .card-body p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.dvc-counter .card-body p strong {
    color: #3498db;
}


/* History Page Styling */
.history-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.history-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.history-content {
    line-height: 1.6;
    font-size: 1.1em;
}

.history-navigation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.history-navigation ul {
    list-style: none;
    padding: 0;
}

.history-navigation li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.history-navigation li.active {
    font-weight: bold;
}

.history-navigation li.active a {
    color: #2271b1;
}

.history-navigation a {
    text-decoration: none;
    color: #333;
}

.history-navigation a:hover {
    color: #2271b1;
}

.history-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.history-list li {
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.history-list h2 {
    margin-top: 0;
}

.history-list h2 a {
    text-decoration: none;
    color: #2271b1;
}

.history-list h2 a:hover {
    color: #135e96;
}

.history-date {
    color: #666;
    font-size: 0.9em;
}

.error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    max-width: 800px;
    margin: 20px auto;
}

/* Gallery Cards */
.gallery-category-card, 
.gallery-item-card {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 100%;
}

.gallery-category-card:hover, 
.gallery-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery-category-card .card-img-top, 
.gallery-item-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.gallery-category-card .card-body, 
.gallery-item-card .card-body {
    padding: 1.25rem;
}

/* Gallery Images */
.gallery-images .img-fluid {
    height: 150px;
    width: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.gallery-images .img-fluid:hover {
    transform: scale(1.05);
}

.image-caption {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* Gallery Meta */
.gallery-meta {
    margin-bottom: 20px;
}

.gallery-meta p {
    margin-bottom: 10px;
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-link {
    color: #007bff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .gallery-category-card .card-img-top, 
    .gallery-item-card .card-img-top {
        height: 150px;
    }
    
    .gallery-images .img-fluid {
        height: 120px;
    }
}