/* ============================================
   Ocean Calm Theme - Perpustakaan Digital
   SMAN 1 Padangsidimpuan
   ============================================ */

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Ocean Colors */
  --ocean-50: #f0fdfa;
  --ocean-100: #ccfbf1;
  --ocean-200: #99f6e4;
  --ocean-300: #5eead4;
  --ocean-400: #2dd4bf;
  --ocean-500: #14b8a6;
  --ocean-600: #0d9488;
  --ocean-700: #0f766e;
  --ocean-800: #115e59;
  --ocean-900: #134e4a;

  /* Slate Colors */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Typography */
  --font-family:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(20, 184, 166, 0.08);
  --shadow-md: 0 4px 20px rgba(20, 184, 166, 0.12);
  --shadow-lg: 0 8px 30px rgba(20, 184, 166, 0.15);
  --shadow-card: 0 4px 24px rgba(15, 118, 110, 0.1);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
  --transition-slow: all 0.4s ease;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--ocean-50);
  color: var(--slate-700);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ocean-800);
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}

p {
  color: var(--slate-600);
}

a {
  color: var(--ocean-600);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--ocean-700);
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-normal);
}

.navbar-transparent {
  background: transparent;
}

.navbar-solid {
  background: linear-gradient(
    135deg,
    var(--ocean-700) 0%,
    var(--ocean-800) 100%
  );
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
}

.navbar-brand span {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.navbar-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.navbar-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

/* Search Input in Navbar */
.navbar-search {
  position: relative;
}

.navbar-search input {
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: var(--font-family);
  font-size: 0.9rem;
  width: 240px;
  transition: var(--transition-fast);
}

.navbar-search input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.navbar-search input:focus {
  outline: none;
  background: white;
  color: var(--slate-700);
  border-color: white;
}

.navbar-search input:focus::placeholder {
  color: var(--slate-400);
}

.navbar-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  transition: var(--transition-fast);
}

.navbar-search input:focus + .search-icon {
  color: var(--ocean-500);
}

/* Mobile Menu Button */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 520px;
  padding-top: 80px;
  padding-bottom: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--ocean-600) 0%,
    var(--ocean-700) 50%,
    var(--ocean-800) 100%
  );
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 800px;
}

.hero h1 {
  color: white;
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero h2 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Wave Decoration */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--ocean-100);
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ocean-200);
}

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ocean-800);
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--slate-500);
  margin-bottom: 1rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--ocean-500) 0%,
    var(--ocean-600) 100%
  );
  color: white;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    var(--ocean-600) 0%,
    var(--ocean-700) 100%
  );
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.btn-secondary {
  background: var(--ocean-100);
  color: var(--ocean-700);
}

.btn-secondary:hover {
  background: var(--ocean-200);
  color: var(--ocean-800);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

/* ============================================
   Content Section
   ============================================ */
.section {
  padding: 4rem 2rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ocean-800);
  margin-bottom: 2rem;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid Layout */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================
   Info Section (About)
   ============================================ */
.info-section {
  display: flex;
  gap: 3rem;
  align-items: center;
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.info-image {
  flex: 0 0 45%;
}

.info-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.info-content {
  flex: 1;
}

.info-content h2 {
  margin-bottom: 1rem;
}

.info-list {
  margin: 1.5rem 0;
}

.info-list p {
  margin-bottom: 0.5rem;
}

.info-list strong {
  color: var(--ocean-700);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--ocean-100);
  color: var(--ocean-600);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  font-size: 1.1rem;
}

.social-links a:hover {
  background: var(--ocean-500);
  color: white;
  transform: translateY(-2px);
}

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: linear-gradient(
    135deg,
    var(--ocean-600) 0%,
    var(--ocean-700) 100%
  );
}

thead th {
  padding: 1rem 1.25rem;
  color: white;
  font-weight: 600;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--ocean-100);
  transition: var(--transition-fast);
}

tbody tr:hover {
  background: var(--ocean-50);
}

tbody td {
  padding: 1rem 1.25rem;
  color: var(--slate-600);
}

/* ============================================
   Form Inputs
   ============================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-family);
  font-size: 1rem;
  border: 2px solid var(--ocean-200);
  border-radius: var(--radius-md);
  background: white;
  color: var(--slate-700);
  transition: var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
}

.form-input::placeholder {
  color: var(--slate-400);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination button {
  padding: 0.625rem 1.25rem;
  font-family: var(--font-family);
  font-weight: 500;
  background: var(--ocean-100);
  color: var(--ocean-700);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
  background: var(--ocean-500);
  color: white;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination span {
  font-weight: 500;
  color: var(--ocean-700);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: linear-gradient(
    135deg,
    var(--slate-800) 0%,
    var(--slate-900) 100%
  );
  color: white;
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.footer-brand img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
}

.footer-brand-text h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.footer-brand-text p {
  color: var(--slate-400);
  font-size: 0.9rem;
}

.footer-section h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--slate-400);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--ocean-400);
}

.footer-contact p {
  color: var(--slate-400);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.footer-social a:hover {
  background: var(--ocean-500);
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: var(--slate-500);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--ocean-400);
}

.footer-bottom a:hover {
  color: var(--ocean-300);
}

/* ============================================
   Sidebar (Mobile)
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: white;
  z-index: 1001;
  transform: translateX(-100%);
  transition: var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  padding: 1.5rem;
  background: linear-gradient(
    135deg,
    var(--ocean-600) 0%,
    var(--ocean-700) 100%
  );
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h3 {
  color: white;
  font-size: 1.1rem;
}

.sidebar-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
}

.sidebar-nav {
  padding: 1.5rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--slate-700);
  font-weight: 500;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--ocean-100);
  color: var(--ocean-700);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   Search Results Dropdown
   ============================================ */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.search-results a {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--slate-700);
  border-bottom: 1px solid var(--ocean-100);
  transition: var(--transition-fast);
}

.search-results a:hover {
  background: var(--ocean-50);
  color: var(--ocean-700);
}

.search-results a:last-child {
  border-bottom: none;
}

/* ============================================
   Contact Cards
   ============================================ */
.contact-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--ocean-100);
  transition: var(--transition-normal);
}

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

.contact-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 4px solid var(--ocean-200);
}

.contact-card h3 {
  margin-bottom: 1rem;
}

.contact-card p {
  margin-bottom: 1.5rem;
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar-search {
    display: none;
  }

  .hero {
    min-height: 350px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1.2rem;
  }

  .info-section {
    flex-direction: column;
    padding: 1.5rem;
  }

  .info-image {
    flex: none;
    width: 100%;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section {
    padding: 2.5rem 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 1.25rem;
  }

  .contact-card {
    padding: 1.5rem;
  }

  .contact-card img {
    width: 100px;
    height: 100px;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}

.hidden {
  display: none;
}
.block {
  display: block;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}

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

.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.gap-3 {
  gap: 1.5rem;
}
