:root {
  --primary-color: #003366; /* Navy Blue */
  --secondary-color: #cc0000; /* Red */
  --bg-color: #f8f9fa; /* Off-white */
  --text-color: #333333;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Sarabun", sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Header */
header {
  background-color: var(--white);
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.container {
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-logo {
  height: 40px;
  width: auto;
  border-radius: 50%;
}

.logo-area h1 {
  color: var(--primary-color);
  font-size: 28px;
  font-weight: 600;
}

.logo-area span {
  color: var(--secondary-color);
}

/* Banner Slider */
.banner-section {
  width: 100%;
  height: 400px;
  position: relative;
  overflow: hidden;
  background: #ccc;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  object-fit: cover;
}

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

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 51, 102, 0.5); /* Blue overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  padding: 20px;
}

.banner-overlay h2 {
  font-size: 48px;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
}

.banner-overlay p {
  font-size: 20px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Main Content */
main {
  padding: 50px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  color: var(--primary-color);
  font-size: 32px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
}

/* Search Bar */
.search-container {
  max-width: 600px;
  margin: 0 auto 40px auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  font-size: 16px;
  transition: border-color 0.3s;
  outline: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  border-color: var(--primary-color);
}

/* Document Grid */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.doc-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  border-top: 4px solid var(--primary-color);
  display: flex;
  flex-direction: column;
}

.doc-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.doc-card-body {
  padding: 25px;
  flex: 1;
}

.doc-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 14px;
  color: #666;
}

.doc-rank {
  background: var(--secondary-color);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 15px;
  font-weight: 600;
}

.doc-content-center {
  text-align: center;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding-bottom: 20px;
}

.doc-inst {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.doc-details {
  color: #444;
  font-size: 15px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.doc-num {
  color: #666;
  font-weight: 500;
}

.doc-footer {
  padding: 15px 25px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
  text-align: center;
}

.btn-view {
  display: inline-block;
  padding: 10px 25px;
  background-color: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s;
  width: 100%;
}

.btn-view:hover {
  background-color: var(--secondary-color);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 20px 0;
  margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
  .banner-overlay h2 {
    font-size: 32px;
  }
  .banner-section {
    height: 300px;
  }
}
