/* ==========================================================================
   Penerbit Asosiasi Informatika Sumatera Utara
   Theme: Soft Mango Green & Minimalist Editorial Publisher
   ========================================================================== */

:root {
  --mango-primary: #4A7C59;
  --mango-hover: #3D6749;
  --mango-light: #EBF4ED;
  --mango-border: #D5E5D8;
  --mango-surface: #F5F9F5;
  --text-main: #1D2A20;
  --text-muted: #536657;
  --text-light: #7E9283;
  --bg-page: #F8FAF8;
  --bg-white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(30, 50, 35, 0.05);
  --shadow-md: 0 4px 16px rgba(30, 50, 35, 0.08);
  --shadow-lg: 0 10px 25px rgba(30, 50, 35, 0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-serif {
  font-family: 'Lora', Georgia, serif;
  color: var(--text-main);
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--mango-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
  color: var(--mango-primary);
}

.btn-admin-link {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 16px;
  background-color: var(--mango-light);
  color: var(--mango-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--mango-border);
}

.btn-admin-link:hover {
  background-color: var(--mango-primary);
  color: #fff;
}

/* Hero Section */
.hero-section {
  padding: 70px 0 60px;
  background: linear-gradient(180deg, var(--bg-white) 0%, var(--mango-surface) 100%);
  border-bottom: 1px solid var(--mango-border);
}

.hero-content {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero-subtitle {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mango-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text-main);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--mango-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--mango-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--mango-border);
}

.btn-outline:hover {
  background-color: var(--mango-light);
  color: var(--mango-primary);
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-header {
  margin-bottom: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 600;
}

.section-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Grid Buku */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

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

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

.book-cover-wrap {
  background: var(--mango-surface);
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.book-card:hover .book-cover-img {
  transform: scale(1.03);
}

.book-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.book-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.book-author {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.book-synopsis {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--mango-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mango-primary);
}

.book-link:hover {
  text-decoration: underline;
}

/* Detail Buku */
.book-detail-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  background: var(--bg-white);
  border: 1px solid var(--mango-border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.detail-cover {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.detail-header {
  margin-bottom: 24px;
}

.detail-title {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.detail-author {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.specs-table {
  width: 100%;
  margin-bottom: 28px;
  border-collapse: collapse;
}

.specs-table td {
  padding: 10px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--mango-border);
}

.specs-table td:first-child {
  width: 160px;
  color: var(--text-light);
  font-weight: 500;
}

.synopsis-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-main);
}

/* Forms */
.form-card {
  background: var(--bg-white);
  border: 1px solid var(--mango-border);
  border-radius: var(--radius-md);
  padding: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--mango-border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-white);
  color: var(--text-main);
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--mango-primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}

textarea.form-control {
  min-height: 130px;
  resize: vertical;
}

/* Alert */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #EAF7EE;
  color: #216E39;
  border: 1px solid #C3E6CB;
}

.alert-danger {
  background-color: #FDF2F2;
  color: #9B1C1C;
  border: 1px solid #F8B4B4;
}

/* Footer */
.site-footer {
  background-color: var(--bg-white);
  border-top: 1px solid var(--mango-border);
  padding: 50px 0 25px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 400px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--mango-primary);
}

.footer-bottom {
  border-top: 1px solid var(--mango-border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 860px) {
  .book-detail-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    gap: 16px;
  }
  .hero-title {
    font-size: 2rem;
  }
}
