/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1e5f8e;
  --primary-dark: #144466;
  --primary-light: #4a8cb8;
  --accent: #e8a838;
  --bg: #f4f7fa;
  --bg-card: #ffffff;
  --text: #2a3845;
  --text-muted: #5a6b7a;
  --border: #d8e2eb;
  --shadow: 0 2px 8px rgba(20, 68, 102, 0.08);
  --shadow-hover: 0 4px 16px rgba(20, 68, 102, 0.15);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

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

/* ===== Header ===== */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 2.5rem 1rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: -60px; left: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
  border-radius: 50%;
}

.site-header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 1;
}

.site-header .tagline {
  font-size: 1.05rem;
  font-weight: 300;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

/* ===== Navigation ===== */
.main-nav {
  background: var(--primary-dark);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav a {
  color: #fff;
  padding: 0.9rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,0.1);
  border-bottom-color: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ===== Layout ===== */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
}

.main-content {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.widget {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.widget h3 {
  color: var(--primary-dark);
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.widget ul {
  list-style: none;
}

.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.widget ul li:last-child { border-bottom: none; }

/* ===== Article ===== */
article h1 {
  color: var(--primary-dark);
  font-size: 1.85rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--accent);
}

article h2 {
  color: var(--primary);
  font-size: 1.35rem;
  margin: 1.8rem 0 0.8rem;
}

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

/* ===== Link Section (Homepage) ===== */
.link-section {
  margin-top: 2.5rem;
  padding: 2rem 0 1rem;
  border-top: 2px solid var(--border);
}

.link-section > h2 {
  text-align: center;
  color: var(--primary-dark);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.link-card .card-image {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #fff;
}

.card-image.bg1 { background: linear-gradient(135deg, #d4a574, #8b6f47); }
.card-image.bg2 { background: linear-gradient(135deg, #6b8e9e, #3e5a6b); }
.card-image.bg3 { background: linear-gradient(135deg, #a89078, #6b5847); }
.card-image.bg4 { background: linear-gradient(135deg, #7a9b8e, #4d6b5e); }
.card-image.bg5 { background: linear-gradient(135deg, #8a8a8a, #555); }
.card-image.bg6 { background: linear-gradient(135deg, #5b4a8a, #2e2456); }

.link-card .card-body {
  padding: 0.9rem 1rem 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.link-card h3 {
  color: var(--primary-dark);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
  text-transform: capitalize;
}

.link-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  text-align: left;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--primary-dark);
  color: #cfdde8;
  padding: 1.8rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  margin-top: 3rem;
}

.site-footer a { color: #fff; }

/* ===== Hero (Homepage) ===== */
.hero {
  background: linear-gradient(rgba(20,68,102,0.65), rgba(30,95,142,0.55)),
              linear-gradient(135deg, #87ceeb 0%, #b0d4e8 50%, #e8f0f5 100%);
  color: #fff;
  padding: 3rem 2rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.hero h2 {
  font-size: 1.7rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.hero p {
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.95;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .main-content { padding: 1.6rem; }
  .site-header h1 { font-size: 1.7rem; }
  .site-header { padding: 2rem 1rem 1.5rem; }
  article h1 { font-size: 1.5rem; }
  article h2 { font-size: 1.2rem; }
  .hero { padding: 2rem 1rem; }
  .hero h2 { font-size: 1.35rem; }
}

@media (max-width: 600px) {
  .main-nav a { padding: 0.7rem 0.9rem; font-size: 0.85rem; }
  .link-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .link-card .card-image { height: 80px; font-size: 1.8rem; }
  .link-card h3 { font-size: 0.85rem; }
  .link-card p { font-size: 0.72rem; }
  .container { margin: 1rem auto; }
  .main-content { padding: 1.2rem; }
  article p { text-align: left; }
}

@media (max-width: 380px) {
  .link-grid { grid-template-columns: 1fr; }
}
