/**  ปรับปแต่งสืบคลาสและสร้างใหม่ในไฟล์นี้ **/

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

/* Global Styles */
:root {
  --primary-color: #4a86e8;
  --secondary-color: #f8f9fa;
  --accent-color: #ffc107;
  --text-color: #333;
  --link-color: #4a86e8;
  --heading-color: #2d5bb9;
  --border-radius: 8px;
  --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Prompt', sans-serif;
  font-size: .95rem !important;
  color: var(--text-color);
  line-height: 1.5 !important;
  background-color: #f5f5f5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Prompt', sans-serif;
  color: var(--heading-color);
  font-weight: 500;
  font-size: 1.25rem !important;
}

/* ลบ underline ทั้งหมดจากลิงก์ */
a, a:link, a:visited, a:hover, a:active {
  text-decoration: none !important;
}

a {
  color: var(--link-color);
  transition: var(--transition);
}

a:hover {
  color: #2d5bb9;
}

/* Header Styles */
.header {
  background-color: white;
  box-shadow: var(--box-shadow);
  padding: 10px 0;
  position: relative;
}

.brand-logo img {
  max-height: 100px;
  width: auto;
}

.container-nav {
  margin-top: 10px;
}

.nav {
  background-color: var(--primary-color);
  border-radius: var(--border-radius);
  padding: 5px 15px;
}

.nav-item a {
  color: white;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 4px;
  transition: var(--transition);
}

.nav-item a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

/* Slideshow */
.djslider-loader {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
}

/* Cards */
.card {
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 2px !important;
  padding-bottom: 2px;
  font-size: .98rem !important;  
  padding: 5 5 ;
}

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

.card-header {
  background-color: #f0f6ff;
  color: var(--primary-color);
  font-weight: 500;
  padding: 8px 10px !important ;
  font-size: .98rem !important;
  border-bottom: 1px solid #e0e0e0;
}

.card-body {
  padding-left: 5px !important;
  padding-top: 5px !important;
  padding-right: 5px !important;
  padding-bottom: 5px !important;
}

/* Blog Items */
.blog-item {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--transition);
}

.blog-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.blog-item h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.blog-item .page-header {
  background-color: #6c9ce4;
  padding: 8px 10px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  font-size: .98rem !important;
}

.blog-item .page-header h2 a {
  color: white;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.05rem !important;
}

.blog-item .page-header h2 a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.blog-item .item-content {
  padding: 10px;
}

.page-header .headline {
  font-size: .98rem !important;
}

/* Pagination */
.pagination .page-link {
  color: var(--primary-color);
  background-color: white;
  border-color: #dee2e6;
  margin: 0 3px;
  border-radius: 4px;
  transition: var(--transition);
}

.pagination .page-link:hover {
  color: white;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.pagination .active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Sidebar right */
.sidebar-right  .card {
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
}

.sidebar-right  .card-header {
  background-color: #f0f6ff;
  color: var(--primary-color);
  font-weight: 500;
  padding: 8px 10px;
  font-size: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.sidebar-right  .nav-item a {
  color: #505050;
  padding: 6px 10px;
  border-radius: 0;
  transition: all 0.2s ease;
  display: block;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.sidebar-right  .nav-item:last-child a {
  border-bottom: none;
}

.sidebar-right  .nav-item a:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
  padding-left: 12px;
}

.sidebar-right  .nav {
  background-color: white;
  padding: 0;
}


/* Sidebar left */
.sidebar-left  .card {
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
}

.sidebar-left  .card-header {
  background-color: #f0f6ff;
  color: var(--primary-color);
  font-weight: 500;
  padding: 8px 10px;
  font-size: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.sidebar-left  .nav-item a {
  color: #505050;
  padding: 6px 10px;
  border-radius: 0;
  transition: all 0.2s ease;
  display: block;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.sidebar-left  .nav-item:last-child a {
  border-bottom: none;
}

.sidebar-left  .nav-item a:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
  padding-left: 12px;
}

.sidebar-left  .nav {
  background-color: white;
  padding: 0;
}

/* Bottom Sections */
.container-bottom-a {
  background-color: #6c9ce4;
  color: white;
  padding: 20px 0;
  margin-top: 30px;
  border-radius: var(--border-radius);
}

.container-bottom-a .card {
  background: transparent;
  box-shadow: none;
}

.container-bottom-a .card-body {
  color: white;
}

.container-bottom-a a {
  color: var(--accent-color);
}

/* Back to Top */
#back-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #6c9ce4;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  z-index: 999;
}

#back-top:hover {
  background-color: var(--heading-color);
  transform: translateY(-3px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .brand-logo img {
    max-height: 80px;
  }
  
  .blog-item h2 {
    font-size: 1.1rem;
  }
  
  .card-header {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .brand-logo img {
    max-height: 60px;
  }
  
  .blog-item h2 {
    font-size: 1rem;
  }
  
  .container-nav {
    margin-top: 5px;
  }
  
  .nav {
    padding: 2px 5px;
  }
  
  .nav-item a {
    padding: 5px 10px;
    font-size: 0.9rem;
  }
}

/* Container spacing */
.container-component,
.container-sidebar-left,
.container-sidebar-right {
  padding-left: 10px;
  padding-right: 10px;
}

/* Reduce grid gap */
.site-grid {
  gap: 10px;
}
