/* ============================================================
   广西钦州农业学校 — Green Education Portal Theme
   Main: #2e7d32  Accent: #4caf50  Gold: #d4a843
   ============================================================ */

:root {
  --green-dark: #2e7d32;
  --green-main: #388e3c;
  --green-light: #4caf50;
  --green-pale: #e8f5e9;
  --green-gradient: linear-gradient(135deg, #2e7d32 0%, #388e3c 50%, #43a047 100%);
  --gold: #d4a843;
  --dark-bg: #1a2332;
  --dark-bg-light: #223044;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --border-color: #e8e8e8;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 6px;
  --radius-lg: 10px;
  --transition: all 0.3s ease;
}

/* ========== Reset & Base ========== */

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  margin: 0;
  padding: 0;
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background-color: #f3f5f7;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green-dark);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: #1b5e20;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========== Utility ========== */

.btn-school-primary {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
  transition: var(--transition);
}

.btn-school-primary:hover,
.btn-school-primary:focus {
  background-color: #1b5e20;
  border-color: #1b5e20;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-school-outline {
  border: 2px solid var(--green-dark);
  color: var(--green-dark);
  background: transparent;
  transition: var(--transition);
}

.btn-school-outline:hover {
  background-color: var(--green-dark);
  color: #fff;
}

/* ========== Top Bar ========== */

.top-bar {
  background: linear-gradient(90deg, #1a3a1a 0%, #1b5e20 100%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  padding: 6px 0;
  letter-spacing: 0.3px;
}

.top-bar-left span {
  opacity: 0.9;
}

.top-bar-right span {
  margin-left: 18px;
}

.top-bar-right i {
  margin-right: 4px;
  color: var(--gold);
}

/* ========== Logo Bar ========== */

.logo-bar {
  background-color: #c5f5e1;
  text-align: center;
  line-height: 0;
}

.logo-bar a {
  display: block;
}

.logo-banner-img {
  height: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

/* ========== Main Navbar ========== */

.main-navbar {
  background: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-bottom: 2px solid var(--green-dark);
}

.main-navbar .container {
  position: relative;
}

.main-navbar .navbar-nav {
  gap: 0;
  flex: 1;
  justify-content: center;
}

.nav-search-form {
  display: flex;
  align-items: center;
  background: #f5f7f6;
  border: 1px solid #e0e5e2;
  border-radius: 20px;
  padding: 2px 4px 2px 14px;
  margin-left: 12px;
  transition: all 0.25s ease;
}

.nav-search-form:focus-within {
  border-color: var(--green-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.08);
}

.nav-search-form input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  width: 160px;
  padding: 6px 4px;
  color: var(--text-primary);
}

.nav-search-form input::placeholder {
  color: #9aa5a0;
}

.nav-search-form button {
  border: none;
  background: var(--green-primary);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nav-search-form button:hover {
  background: var(--green-dark);
}

.search-summary {
  font-size: 0.95rem;
}

.search-summary mark,
.article-title mark {
  background: #fff3b0;
  color: #b8860b;
  padding: 0 2px;
  border-radius: 2px;
}

@media (max-width: 991.98px) {
  .nav-search-form {
    margin: 10px 0;
    width: 100%;
  }
  .nav-search-form input {
    width: 100%;
    flex: 1;
  }
}

.main-navbar .nav-link {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 14px 22px !important;
  position: relative;
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
}

.main-navbar .nav-link::after {
  display: none !important;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
  color: var(--green-dark);
  background: var(--green-pale);
}

/* Hover dropdown (desktop) */
@media (min-width: 992px) {
  .main-navbar .dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

.main-navbar .dropdown-menu {
  border: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px 0;
  margin-top: 0;
  border-top: 3px solid var(--gold);
  animation: fadeDown 0.2s ease;
  min-width: 180px;
}

.main-navbar .dropdown-menu li {
  list-style: none;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-navbar .dropdown-item {
  padding: 9px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.main-navbar .dropdown-item:hover {
  background-color: var(--green-pale);
  color: var(--green-dark);
  padding-left: 24px;
}

.main-navbar .navbar-toggler {
  border: 2px solid rgba(0, 0, 0, 0.2);
  padding: 4px 10px;
}

.main-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23333333' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========== Carousel Section ========== */

.carousel-section {
  position: relative;
  overflow: hidden;
}

.carousel-section .carousel-item {
  /*aspect-ratio: 16 / 5;*/
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  overflow: hidden;
}

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

.carousel-section .carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  padding: 60px 40px 30px;
}

.carousel-section .carousel-overlay h3 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.carousel-section .carousel-indicators {
  margin-bottom: 18px;
}

.carousel-section .carousel-indicators button {
  width: 30px;
  height: 4px;
  border-radius: 2px;
  border: none;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.carousel-section .carousel-indicators button.active {
  opacity: 1;
  width: 45px;
  background-color: var(--gold);
}

.carousel-section .carousel-control-prev,
.carousel-section .carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  margin: 0 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-section:hover .carousel-control-prev,
.carousel-section:hover .carousel-control-next {
  opacity: 1;
}

.carousel-section .carousel-control-prev:hover,
.carousel-section .carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.carousel-default-banner {
  aspect-ratio: 16 / 5;
  background: var(--green-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.carousel-default-banner h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 8px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 16px;
}

.carousel-default-banner p {
  font-size: 1.2rem;
  letter-spacing: 6px;
  opacity: 0.85;
}

/* ========== Top Banner ========== */

.top-banner-section {
  padding: 10px 0;
  background: #fff;
}

.top-banner-section img {
  width: 100%;
  border-radius: var(--radius);
  transition: var(--transition);
}

.top-banner-link:hover img {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ========== Campus Gallery Section (Home) ========== */

.campus-gallery-section {
  padding: 40px 0;
  background: #fff;
}

.campus-gallery-section .section-title {
  margin-bottom: 24px;
}

/* ========== Section Title ========== */

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #eee;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--green-dark);
}

.section-title h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title h4 i {
  color: var(--green-dark);
  font-size: 1.1rem;
}

.section-title .more-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
  flex-shrink: 0;
}

.section-title .more-link:hover {
  color: var(--green-dark);
}

/* ========== Home Content Section ========== */

.home-content {
  padding: 40px 0;
}

/* ========== News Section ========== */

.news-section {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  height: 100%;
}

.news-feature-card {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 220px;
  background: #f0f0f0;
  text-decoration: none;
  transition: var(--transition);
}

.news-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.news-feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-feature-card:hover img {
  transform: scale(1.05);
}

.news-feature-card .feature-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #43a047, #2e7d32);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-feature-card .feature-placeholder i {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.3);
}

.news-feature-card .feature-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.news-feature-card .feature-info h5 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.news-feature-card .feature-info span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

.news-feature-card .top-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #e53935;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
  z-index: 2;
}

.news-list-item {
  display: flex;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border-color);
  transition: var(--transition);
}

.news-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news-list-item:hover {
  padding-left: 6px;
}

.news-list-item .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-light);
  flex-shrink: 0;
  margin-right: 10px;
}

.news-list-item a {
  flex: 1;
  min-width: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}

.news-list-item a:hover {
  color: var(--green-dark);
}

.news-list-item .date {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 12px;
}

/* ========== Notice Section ========== */

.notice-section {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  height: 100%;
}

.notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notice-item {
  display: flex;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border-color);
  text-decoration: none;
  transition: var(--transition);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item:hover {
  padding-left: 4px;
}

.notice-item .date-box {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--green-pale);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  border-left: 3px solid var(--green-dark);
  transition: var(--transition);
}

.notice-item:hover .date-box {
  background: var(--green-dark);
}

.notice-item .date-box .day {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.2;
  transition: color 0.25s ease;
}

.notice-item:hover .date-box .day {
  color: #fff;
}

.notice-item .date-box .month {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
  transition: color 0.25s ease;
}

.notice-item:hover .date-box .month {
  color: rgba(255, 255, 255, 0.8);
}

.notice-item .notice-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  transition: color 0.25s ease;
}

.notice-item:hover .notice-title {
  color: var(--green-dark);
}

.notice-item .top-tag {
  flex-shrink: 0;
  display: inline-block;
  background: #e53935;
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 8px;
  font-weight: 600;
}

/* ========== Banner Section ========== */

.banner-section {
  padding: 30px 0;
}

.banner-section img {
  width: 100%;
  border-radius: var(--radius);
  transition: var(--transition);
}

.banner-section a:hover img {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.middle-banner-section {
  padding: 0 0 40px;
}

.middle-banner-section img {
  width: 100%;
  border-radius: var(--radius);
  transition: var(--transition);
}

.middle-banner-section a:hover img {
  box-shadow: var(--shadow-md);
}

/* ========== School Overview ========== */

.school-overview {
  padding: 50px 0;
  background: linear-gradient(135deg, #f8fdf8 0%, #eef7ee 100%);
}

.overview-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.overview-card:hover {
  box-shadow: var(--shadow-md);
}

.overview-img {
  height: 100%;
  min-height: 280px;
  background: var(--green-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.overview-img .placeholder-icon {
  color: rgba(255, 255, 255, 0.2);
  font-size: 4rem;
}

.overview-text {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.overview-content {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.9;
  margin-bottom: 20px;
  max-height: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-content img {
  display: none;
}

.overview-content p {
  margin-bottom: 6px;
}

.overview-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 12px;
}

.overview-text h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.overview-text p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.9;
  margin-bottom: 20px;
}

.overview-text .btn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: var(--green-dark);
  color: #fff;
  border-radius: 30px;
  font-size: 0.88rem;
  transition: var(--transition);
}

.overview-text .btn-more:hover {
  background: #1b5e20;
  transform: translateX(4px);
}

/* ========== Friend Links ========== */

.friend-links {
  background: #fff;
  border-top: 1px solid var(--border-color);
  padding: 16px 0;
}

.friend-links-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  margin-right: 12px;
  padding-top: 2px;
}

.friend-links-title i {
  color: var(--green-dark);
}

.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.friend-links-list a {
  font-size: 0.84rem;
  color: var(--text-secondary);
  transition: color 0.25s ease;
  line-height: 1.8;
}

.friend-links-list a:hover {
  color: var(--green-dark);
}

/* ========== Footer ========== */

.site-footer {
  background: var(--dark-bg);
  color: rgba(255, 255, 255, 0.75);
}

.footer-main {
  padding: 48px 0 36px;
}

.footer-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  position: relative;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.footer-info p {
  margin-bottom: 10px;
  font-size: 0.87rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-info p i {
  color: var(--gold);
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links li a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.87rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.footer-links li a::before {
  content: "›";
  margin-right: 6px;
  color: var(--gold);
  font-weight: bold;
}

.footer-links li a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-qrcode {
  text-align: center;
}

.footer-qrcode .qr-placeholder {
  width: 110px;
  height: 110px;
  background: var(--dark-bg-light);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.footer-qrcode .qr-placeholder i {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.2);
}

.footer-qrcode p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.2);
  padding: 14px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.25s ease;
}

.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ========== Back to Top ========== */

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-dark);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #1b5e20;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.45);
}

/* ========== Page Banner / Breadcrumb ========== */

.page-banner {
  background: var(--green-gradient);
  padding: 36px 0 24px;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.page-banner::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.page-banner-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.6rem;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.page-banner .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.page-banner .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s ease;
}

.page-banner .breadcrumb-item a:hover {
  color: #fff;
}

.page-banner .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.95);
}

.page-banner .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

/* ========== Content Card (Inner pages) ========== */

.content-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.content-card-header {
  background: #fff;
  padding: 16px 24px;
  border-bottom: 2px solid var(--green-dark);
}

.content-card-header h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  position: relative;
  padding-left: 14px;
}

.content-card-header h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background-color: var(--green-dark);
  border-radius: 2px;
}

.content-card-body {
  padding: 24px;
}

/* ========== Sidebar ========== */

.sidebar-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.sidebar-card-header {
  background: var(--green-gradient);
  padding: 14px 18px;
}

.sidebar-card-header h5 {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-card-body {
  padding: 0;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  border-bottom: 1px solid #f5f5f5;
}

.sidebar-nav li:last-child {
  border-bottom: none;
}

.sidebar-nav li a {
  display: block;
  padding: 12px 18px 12px 28px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
}

.sidebar-nav li a::before {
  content: "›";
  position: absolute;
  left: 14px;
  color: #ccc;
  font-weight: bold;
  transition: var(--transition);
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
  background-color: var(--green-pale);
  color: var(--green-dark);
  padding-left: 32px;
}

.sidebar-nav li a:hover::before,
.sidebar-nav li.active a::before {
  color: var(--green-dark);
}

.sidebar-nav li.active a {
  font-weight: 600;
  border-left: 3px solid var(--green-dark);
  padding-left: 25px;
}

/* ========== Hot Articles ========== */

.hot-article-list {
  list-style: none;
  padding: 10px 14px;
  margin: 0;
}

.hot-article-list li {
  display: flex;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px dashed #f0f0f0;
}

.hot-article-list li:last-child {
  border-bottom: none;
}

.hot-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background-color: #d0d0d0;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 10px;
  margin-top: 2px;
}

.hot-num.top {
  background-color: #e53935;
}

.hot-article-list li a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.hot-article-list li a:hover {
  color: var(--green-dark);
}

/* ========== Article List (inner page) ========== */

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-list-item {
  display: flex;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px dashed var(--border-color);
  transition: var(--transition);
}

.article-thumb {
  flex-shrink: 0;
  width: 160px;
  height: 100px;
  margin-right: 16px;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-list-item:hover .article-thumb img {
  transform: scale(1.05);
}

.article-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5d6a7;
  font-size: 1.8rem;
}

.article-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.article-meta i {
  margin-right: 3px;
}

.article-list-item:last-child {
  border-bottom: none;
}

.article-list-item:hover {
  padding-left: 4px;
}

.article-date {
  flex-shrink: 0;
  width: 62px;
  text-align: center;
  margin-right: 16px;
  background: #fafafa;
  border-radius: var(--radius);
  padding: 8px 6px;
  border-left: 3px solid var(--green-dark);
  transition: var(--transition);
}

.article-list-item:hover .article-date {
  background: var(--green-pale);
}

.article-date .day {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.2;
}

.article-date .month {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.article-info {
  flex: 1;
  min-width: 0;
}

.article-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.6;
}

.article-title a {
  color: var(--text-primary);
  transition: color 0.25s ease;
}

.article-title a:hover {
  color: var(--green-dark);
}

.badge-top {
  display: inline-block;
  background-color: #e53935;
  color: #fff;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
  font-weight: 600;
}

.article-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
}

/* ========== Article Detail ========== */

.article-detail-header {
  padding: 30px 24px 24px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.article-detail-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 14px;
  line-height: 1.6;
}

.article-detail-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-content {
  font-size: 0.95rem;
  line-height: 1.9;
  color: #444;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: var(--radius);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.article-content table td,
.article-content table th {
  border: 1px solid #ddd;
  padding: 10px;
}

.article-content p {
  margin-bottom: 0.9em;
}

/* ========== Attachments ========== */

.attachment-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.lightbox-item {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid #eee;
  transition: var(--transition);
}

.lightbox-item:hover {
  box-shadow: var(--shadow-md);
}

.lightbox-item img {
  width: 100%;
  height: auto;
  display: block;
}

.video-item video {
  border: 1px solid #eee;
  border-radius: var(--radius);
}

.file-list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  transition: var(--transition);
}

.file-item:last-child {
  border-bottom: none;
}

.file-item:hover {
  background: #fafafa;
}

.file-icon {
  font-size: 1.2rem;
  margin-right: 10px;
  color: var(--green-dark);
}

.file-name {
  flex: 1;
  color: var(--green-dark);
  font-size: 0.9rem;
  transition: var(--transition);
}

.file-name:hover {
  text-decoration: underline;
}

.file-size {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 14px;
}

/* ========== Article Navigation ========== */

.article-nav {
  font-size: 0.88rem;
}

.article-nav a {
  color: var(--green-dark);
  transition: var(--transition);
}

.article-nav a:hover {
  text-decoration: underline;
}

/* ========== Gallery Grid ========== */

.gallery-grid {
  /* uses Bootstrap row/col grid */
}

.gallery-card {
  display: block;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f5f5f5;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-overlay i {
  color: #fff;
  font-size: 2rem;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5d6a7;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.gallery-caption {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  transition: color 0.25s ease;
}

.gallery-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gallery-card:hover .gallery-title {
  color: var(--green-dark);
}

/* ========== Pagination ========== */

.pagination .page-link {
  color: var(--green-dark);
  border-color: #dee2e6;
  font-size: 0.88rem;
  transition: var(--transition);
  border-radius: var(--radius) !important;
  margin: 0 2px;
}

.pagination .page-link:hover {
  color: #fff;
  background-color: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
}

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

/* ========== Form ========== */

.form-control:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.12);
}

/* ========== Animations ========== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */

@media (max-width: 1199.98px) {
  .main-navbar .nav-link {
    padding: 14px 14px !important;
  }
}

@media (max-width: 991.98px) {
  .carousel-default-banner h1 {
    font-size: 2rem;
    letter-spacing: 4px;
  }

  .logo-bar {
    padding: 12px 0;
  }

  .logo-title {
    font-size: 1.3rem;
    letter-spacing: 1px;
  }

  .logo-slogan {
    font-size: 0.72rem;
    letter-spacing: 2px;
  }

  .site-logo i {
    font-size: 32px;
  }

  .main-navbar .navbar-collapse {
    background: var(--green-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 10px 0;
    max-height: 70vh;
    overflow-y: auto;
  }

  .main-navbar .nav-link {
    padding: 12px 16px !important;
  }

  .main-navbar .nav-link:hover,
  .main-navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
  }

  .main-navbar .dropdown-menu {
    border-top: none;
    box-shadow: none;
    padding-left: 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0;
    border-top-width: 0;
  }

  .main-navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
  }

  .main-navbar .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .news-feature-card {
    height: 180px;
  }

  .overview-img {
    height: 200px;
    min-height: auto;
  }

  .article-thumb {
    width: 120px;
    height: 75px;
  }

  .page-banner {
    padding: 24px 0 18px;
  }

  .page-banner-title {
    font-size: 1.3rem;
  }

  .home-content {
    padding: 30px 0;
  }

  .col-lg-3 {
    margin-top: 20px;
  }
}

@media (max-width: 767.98px) {
  .carousel-default-banner h1 {
    font-size: 1.5rem;
    letter-spacing: 3px;
  }

  .carousel-default-banner p {
    font-size: 0.9rem;
    letter-spacing: 3px;
  }

  .carousel-section .carousel-overlay h3 {
    font-size: 1.1rem;
  }

  .carousel-section .carousel-control-prev,
  .carousel-section .carousel-control-next {
    width: 36px;
    height: 36px;
    margin: 0 10px;
  }

  .top-bar-left span {
    font-size: 0.72rem;
  }

  .top-bar-right {
    display: none;
  }

  .logo-bar {
    padding: 10px 0;
  }

  .site-logo i {
    font-size: 28px;
  }

  .logo-title {
    font-size: 1.1rem;
    letter-spacing: 1px;
  }

  .logo-slogan {
    font-size: 0.68rem;
    letter-spacing: 2px;
  }

  .news-section,
  .notice-section {
    padding: 18px;
  }

  .section-title h4 {
    font-size: 1.05rem;
  }

  .overview-text {
    padding: 24px 20px;
  }

  .footer-main {
    padding: 36px 0 24px;
  }

  .school-overview {
    padding: 30px 0;
  }
}

@media (max-width: 575.98px) {
  .article-date {
    width: 50px;
    margin-right: 10px;
  }

  .article-date .day {
    font-size: 1.1rem;
  }

  .article-detail-title {
    font-size: 1.15rem;
  }

  .article-detail-meta {
    font-size: 0.75rem;
  }

  .content-card-body {
    padding: 16px;
  }

  .notice-item .date-box {
    width: 44px;
    height: 44px;
    margin-right: 10px;
  }

  .notice-item .date-box .day {
    font-size: 1rem;
  }

  .gallery-img-wrap {
    height: 160px;
  }
}

/* ========== Scroll Reveal Observer (JS helper) ========== */

.reveal-ready .animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-ready .animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
