:root {
  --primary: #2093a4;
  --bg: #232222;
  --text-color: #fff;
  --text-secondary: #ccc;
  --card-bg: rgba(255, 255, 255, 0.05);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --navbar-bg: rgba(1, 1, 1, 0.9);
  --border-color: #21646e;
}

/* Light Theme */
[data-theme="light"] {
  --primary: #2093a4;
  --bg: #ffffff;
  --text-color: #333333;
  --text-secondary: #666666;
  --card-bg: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --border-color: #e0e0e0;
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --primary: #2093a4;
  --bg: #232222;
  --text-color: #fff;
  --text-secondary: #ccc;
  --card-bg: rgba(255, 255, 255, 0.05);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --navbar-bg: rgba(1, 1, 1, 0.9);
  --border-color: #21646e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  border: none;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: var(--bg);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  padding: 0.5rem 7%;
  background-color: var(--navbar-bg);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar .navbar-logo {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.navbar .navbar-logo img {
  height: 35px;
  margin-right: 10px;
  vertical-align: middle;
}

.navbar .navbar-logo span {
  color: var(--primary);
  vertical-align: middle;
}

.navbar .navbar-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.navbar .navbar-nav a {
  color: var(--text-color);
  display: inline-block;
  font-size: 1rem;
  margin: 0 0.75rem;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.navbar .navbar-nav a:after {
  color: var(--primary);
}

.navbar .navbar-nav a::after {
  content: "";
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 0.2rem solid var(--primary);
  transform: scaleX(0);
  transition: 0.2s linear;
}

.navbar .navbar-nav a:hover::after {
  transform: scaleX(0.5);
}

.navbar .navbar-nav a.active {
  color: var(--primary);
  font-weight: 600;
}

.navbar .navbar-nav a.active::after {
  transform: scaleX(0.5);
}

.navbar .navbar-extra {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}

.navbar .navbar-extra a {
  color: var(--text-color);
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.navbar .navbar-extra a:hover {
  color: var(--primary);
}

.navbar .navbar-extra .login-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--primary);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.navbar .navbar-extra .login-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* User Menu */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.user-info:hover {
  background-color: var(--card-bg);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1a7a85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(32, 147, 164, 0.3);
}

#userName {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.85rem;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background-color: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 10px 30px var(--shadow-color);
  min-width: 200px;
  display: none;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 1rem;
  width: 12px;
  height: 12px;
  background-color: var(--card-bg);
  transform: rotate(45deg);
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.dropdown-menu.show {
  display: block;
  animation: fadeInDown 0.3s ease;
}

.dropdown-menu a {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--text-color) !important;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background-color: var(--primary);
  color: #fff !important;
  transform: translateX(5px);
}

.dropdown-menu a i {
  width: 18px;
  height: 18px;
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hamburger Menu */
#hamburger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  color: #fff;
}

#hamburger-menu:hover {
  color: var(--primary);
}

/* Override any default styling */
#hamburger-menu i {
  color: inherit !important;
}

/* Search button styling */
#search-button {
  color: var(--text-color) !important;
  transition: color 0.3s ease, transform 0.2s ease;
}

#search-button:hover {
  color: var(--primary) !important;
  transform: scale(1.1);
}

/* Theme toggle container styling */
.theme-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.theme-toggle-label {
  color: var(--text-color);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Theme Switch Styling */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 20px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Dark theme adjustments */
[data-theme="dark"] .slider {
  background-color: #666;
}

[data-theme="dark"] .slider:before {
  background-color: #fff;
}

/* Light theme adjustments */
[data-theme="light"] .slider {
  background-color: #ddd;
}

[data-theme="light"] .slider:before {
  background-color: #fff;
}

/* Language Toggle Styling */
.language-toggle-container {
  display: flex;
  align-items: center;
  margin: 0 0.5rem;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  padding: 0.4rem 0.8rem;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-weight: 500;
}

.language-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.language-toggle span {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.language-toggle i {
  width: 16px;
  height: 16px;
}

/* Light theme adjustments */
[data-theme="light"] .navbar .navbar-nav a {
  color: var(--text-color);
}

[data-theme="light"] .navbar .navbar-extra a {
  color: var(--text-color) !important;
}

[data-theme="light"] .hero .content h1,
[data-theme="light"] .hero .content h3,
[data-theme="light"] .hero .content p {
  color: var(--text-color);
}

[data-theme="light"] .about .row .content h3,
[data-theme="light"] .about .row .content p {
  color: var(--text-color);
}

[data-theme="light"] .contact .row form .input-grup input::placeholder,
[data-theme="light"] .contact .row form .input-grup textarea::placeholder {
  color: rgba(51, 51, 51, 0.7);
}

[data-theme="light"] .contact-item h4,
[data-theme="light"] .contact-item p {
  color: var(--text-color);
}

[data-theme="light"] .contact-icon {
  color: var(--text-color);
}

/* Comprehensive Light Theme Styles */
[data-theme="light"] {
  color: var(--text-color);
}

/* Global section styling for theme consistency */
section {
  background-color: var(--bg);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

section h2 {
  color: var(--text-color);
}

section p {
  color: var(--text-color);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: var(--text-color);
}

[data-theme="light"] p {
  color: var(--text-color);
}

[data-theme="light"] .about,
[data-theme="light"] .menu,
[data-theme="light"] .materi,
[data-theme="light"] .products,
[data-theme="light"] .contact {
  background-color: var(--bg);
  color: var(--text-color);
}

[data-theme="light"] .about h2,
[data-theme="light"] .menu h2,
[data-theme="light"] .materi h2,
[data-theme="light"] .products h2,
[data-theme="light"] .contact h2 {
  color: var(--text-color);
}

[data-theme="light"] .about h2 span,
[data-theme="light"] .menu h2 span,
[data-theme="light"] .materi h2 span,
[data-theme="light"] .products h2 span,
[data-theme="light"] .contact h2 span {
  color: var(--primary);
}

[data-theme="light"] .about .row .content h3,
[data-theme="light"] .about .row .content p {
  color: var(--text-color);
}

[data-theme="light"] .menu .row .menu-card h3,
[data-theme="light"] .menu .row .menu-card p {
  color: var(--text-color);
}

[data-theme="light"] .materi .row .materi-card h3,
[data-theme="light"] .materi .row .materi-card p {
  color: var(--text-color);
}

[data-theme="light"] .team-section,
[data-theme="light"] .contact-info-section {
  background-color: var(--bg);
  color: var(--text-color);
}

[data-theme="light"] .team-section h3,
[data-theme="light"] .contact-info-section h3 {
  color: var(--text-color);
}

[data-theme="light"] .team-member h4,
[data-theme="light"] .team-member p {
  color: var(--text-color);
}

[data-theme="light"] .contact-details .contact-item h4,
[data-theme="light"] .contact-details .contact-item p {
  color: var(--text-color);
}

/* Light Theme - Perpustakaan Section Fixes */
[data-theme="light"] .perpustakaan {
  background-color: var(--bg);
  color: var(--text-color);
}

[data-theme="light"] .perpustakaan h2 {
  color: var(--text-color);
  text-align: center;
}

[data-theme="light"] .perpustakaan h2 span {
  color: var(--primary);
}

[data-theme="light"] .perpustakaan p {
  color: var(--text-color);
  text-align: center;
}

[data-theme="light"] .perpustakaan .book-item {
  background-color: #c0c0c0;
  border: 1px solid #d0d0d0;
  color: #333333;
}

[data-theme="light"] .perpustakaan .book-item:hover {
  background-color: #a0a0a0;
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(32, 147, 164, 0.3);
}

[data-theme="light"] .perpustakaan .book-item h4 {
  color: #333333;
}

[data-theme="light"] .perpustakaan .book-item p {
  color: #555555;
  text-align: center;
}

[data-theme="light"] .social-media-links h4 {
  color: var(--text-color);
}

[data-theme="light"] .contact-form-section h3,
[data-theme="light"] .contact-form-section p {
  color: var(--text-color);
}

/* Light theme mobile navbar adjustments */
[data-theme="light"] .navbar .navbar-nav {
  background-color: var(--navbar-bg);
  border-left: 1px solid var(--border-color);
}

[data-theme="light"] .navbar .navbar-nav a {
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
}

/* Light theme search form */
[data-theme="light"] .navbar .search-form {
  background-color: #ffffff;
  border: 1px solid var(--primary);
  box-shadow: 0 4px 12px rgba(32, 147, 164, 0.15);
  border-radius: 0.5rem;
}

[data-theme="light"] .navbar .search-form input {
  color: #333333;
  font-weight: 400;
}

[data-theme="light"] .navbar .search-form input::placeholder {
  color: rgba(51, 51, 51, 0.6);
  font-style: italic;
}

[data-theme="light"] .navbar .search-form label {
  color: var(--primary);
}

[data-theme="light"] .navbar .search-form label:hover {
  color: #1a7a8a;
  background-color: rgba(32, 147, 164, 0.1);
  border-radius: 0.3rem;
}

/* Search Functionality Styles */
.search-highlight {
  background-color: #ffeb3b;
  color: #000;
  padding: 0.1rem 0.2rem;
  border-radius: 0.2rem;
  font-weight: 600;
  animation: highlight-pulse 1.5s ease-in-out;
}

[data-theme="light"] .search-highlight {
  background-color: #ffc107;
  color: #000;
}

@keyframes highlight-pulse {
  0% {
    background-color: #ffeb3b;
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.5);
  }
  50% {
    background-color: #ff9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.7);
  }
  100% {
    background-color: #ffeb3b;
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.5);
  }
}

.search-message {
  position: fixed;
  top: 80px;
  right: 20px;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  font-size: 1.4rem;
  font-weight: 500;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
  word-wrap: break-word;
}

.search-message--success {
  background: #4caf50;
  border-left: 4px solid #2e7d32;
}

.search-message--error {
  background: #f44336;
  border-left: 4px solid #c62828;
}

.search-message--warning {
  background: #ff9800;
  border-left: 4px solid #f57c00;
}

.search-message--info {
  background: var(--primary);
  border-left: 4px solid var(--secondary);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

[data-theme="light"] .search-message {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border-color, #ddd);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1002;
  animation: fadeInDown 0.2s ease-out;
}

.search-result-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color, #eee);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.search-result-item:hover,
.search-result-item.selected {
  background: var(--primary);
  color: #fff;
}

.search-result-item .result-section {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.search-result-item:hover .result-section,
.search-result-item.selected .result-section {
  color: #fff;
}

.search-result-item .result-preview {
  font-size: 1.1rem;
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.4;
}

.search-result-item:hover .result-preview,
.search-result-item.selected .result-preview {
  color: #fff;
  opacity: 1;
}

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

/* Dark theme dropdown adjustments */
[data-theme="dark"] .search-dropdown {
  background: var(--navbar-bg);
  border-color: #444;
}

[data-theme="dark"] .search-result-item {
  border-color: #444;
}

/* Dark theme user dropdown adjustments */
[data-theme="dark"] .dropdown-menu {
  background-color: rgba(30, 30, 30, 0.95) !important;
  border-color: #444 !important;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .dropdown-menu::before {
  background-color: rgba(30, 30, 30, 0.95) !important;
  border-color: #444 !important;
}

[data-theme="dark"] .dropdown-menu a {
  color: #fff !important;
  border-bottom-color: #444 !important;
}

[data-theme="dark"] .dropdown-menu a:hover {
  background-color: var(--primary) !important;
  color: #fff !important;
}

/* Light theme dropdown adjustments */
[data-theme="light"] .search-dropdown {
  background: #fff;
  border-color: #ddd;
}

[data-theme="light"] .search-result-item {
  border-color: #eee;
}

/* Light theme user dropdown adjustments */
[data-theme="light"] .dropdown-menu {
  background-color: #fff !important;
  border-color: #ddd !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .dropdown-menu::before {
  background-color: #fff !important;
  border-color: #ddd !important;
}

[data-theme="light"] .dropdown-menu a {
  color: #333 !important;
  border-bottom-color: #eee !important;
}

[data-theme="light"] .dropdown-menu a:hover {
  background-color: var(--primary) !important;
  color: #fff !important;
}

/* Enhanced Light Theme Readability */
[data-theme="light"] .hero .content p {
  color: var(--text-color);
  text-shadow: none;
}

/* Better contrast for sections in light mode */
[data-theme="light"] .about h2,
[data-theme="light"] .menu h2,
[data-theme="light"] .materi h2,
[data-theme="light"] .products h2,
[data-theme="light"] .contact h2 {
  color: var(--text-color);
  text-shadow: none;
}

[data-theme="light"] .materi .materi-card p,
[data-theme="light"] .contact-form-section > p {
  color: var(--text-secondary);
}

/* Improve button contrast in light mode */
[data-theme="light"] .hero .content .cta,
[data-theme="light"] .cta,
[data-theme="light"] .read-more .btn {
  color: #fff;
  text-shadow: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Better form styling in light mode */
[data-theme="light"] .contact .row form {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .contact .row form .input-grup {
  background-color: #f9fafb;
  border: 2px solid #e5e7eb;
}

[data-theme="light"] .contact .row form .input-grup:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(32, 147, 164, 0.1);
}

[data-theme="light"] .contact .row form .input-grup:hover {
  border-color: var(--primary);
}

[data-theme="light"] .contact .row form .input-grup input,
[data-theme="light"] .contact .row form .input-grup textarea {
  color: #374151;
  border: none;
  background: transparent;
}

[data-theme="light"] .contact .row form .input-grup input::placeholder,
[data-theme="light"] .contact .row form .input-grup textarea::placeholder {
  color: #9ca3af;
}

/* Remove problematic text shadows in light mode */
[data-theme="light"] .hero .content .hero-title {
  color: #3d1f1f;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hero .content .hero-subtitle {
  color: #2a1510;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Dark theme hero colors (default) */
[data-theme="dark"] .hero .content .hero-title {
  color: #4c2a2a;
  text-shadow: 2px 2px 4px rgba(1, 1, 3, 0.7);
}

[data-theme="dark"] .hero .content .hero-subtitle {
  color: #333333;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Tablet Landscape and Medium Desktop Optimization */
@media (min-width: 768px) and (max-width: 1199px) {
  .navbar .navbar-extra {
    gap: 0.6rem;
  }

  .theme-toggle-container {
    gap: 0.4rem;
    margin: 0 0.4rem;
  }

  .language-toggle-container {
    margin: 0 0.4rem;
  }

  .language-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .user-info {
    gap: 0.4rem;
    padding: 0.4rem;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  #userName {
    font-size: 0.85rem;
  }
}

/* Desktop Optimization (Large Screens) */
@media (min-width: 1200px) {
  .navbar .navbar-extra {
    gap: 0.4rem;
  }

  .theme-toggle-container {
    gap: 0.25rem;
    margin: 0 0.3rem;
  }

  .language-toggle-container {
    margin: 0 0.3rem;
  }

  .language-toggle {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }

  .user-info {
    gap: 0.3rem;
    padding: 0.35rem;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  #userName {
    font-size: 0.8rem;
  }
}

/* Mobile-specific theme adjustments */
@media (max-width: 768px) {
  [data-theme="light"] .hero .content {
    background: rgba(255, 255, 255, 0.75); /* Reduce opacity for light theme */
    border: 1px solid rgba(32, 147, 164, 0.1);
    backdrop-filter: blur(8px);
  }

  [data-theme="dark"] .hero .content {
    background: rgba(
      255,
      255,
      255,
      0.85
    ); /* Keep white background in dark theme */
    border: 1px solid rgba(32, 147, 164, 0.2);
    backdrop-filter: blur(8px);
  }

  [data-theme="light"] .hero .content .hero-title {
    color: #2d1a1a;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
  }

  [data-theme="light"] .hero .content .hero-subtitle {
    color: #1f1209;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  }

  [data-theme="dark"] .hero .content .hero-title {
    color: #e8d5d5;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }

  [data-theme="dark"] .hero .content .hero-subtitle {
    color: #333333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  }
}

/* Extra mobile optimization for background visibility */
@media (max-width: 480px) {
  [data-theme="light"] .hero .content {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
  }

  [data-theme="dark"] .hero .content {
    background: rgba(
      255,
      255,
      255,
      0.8
    ); /* Keep white background in dark theme */
    backdrop-filter: blur(6px);
  }
}

@media (max-width: 375px) {
  [data-theme="light"] .hero .content {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
  }

  [data-theme="dark"] .hero .content {
    background: rgba(
      255,
      255,
      255,
      0.8
    ); /* Keep white background in dark theme */
    backdrop-filter: blur(5px);
  }
}

/* Ensure all section titles are readable in light mode */
[data-theme="light"] .about h2,
[data-theme="light"] .menu h2,
[data-theme="light"] .materi h2,
[data-theme="light"] .products h2,
[data-theme="light"] .contact h2 {
  color: #2c3e50;
  font-weight: 700;
}

[data-theme="light"] .about h2 span,
[data-theme="light"] .menu h2 span,
[data-theme="light"] .materi h2 span,
[data-theme="light"] .products h2 span,
[data-theme="light"] .contact h2 span {
  color: var(--primary);
}

/* Better paragraph readability */
[data-theme="light"] .about .row .content p,
[data-theme="light"] .menu p,
[data-theme="light"] .materi p,
[data-theme="light"] .contact p,
[data-theme="light"] .products p {
  color: #4a5568;
  line-height: 1.7;
  font-weight: 500;
}

/* Card content readability */
[data-theme="light"] .menu .row .menu-card h3,
[data-theme="light"] .materi .row .materi-card h3 {
  color: #2d3748;
  font-weight: 600;
}

[data-theme="light"] .menu .row .menu-card p,
[data-theme="light"] .materi .row .materi-card p {
  color: #4a5568;
  font-weight: 500;
}

/* Enhanced visibility for materi and contact sections in light mode */
[data-theme="light"] .materi {
  background-color: #f8f9fa;
  padding: 4rem 0;
}

[data-theme="light"] .contact {
  background-color: #f8f9fa;
  padding: 4rem 0;
}

[data-theme="light"] .materi h2,
[data-theme="light"] .contact h2 {
  color: #1a202c !important;
  font-weight: 800;
  text-shadow: none;
}

[data-theme="light"] .materi .materi-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

[data-theme="light"] .materi .materi-card:hover {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

[data-theme="light"] .materi .materi-card h3 {
  color: #2d3748 !important;
  font-weight: 700;
}

[data-theme="light"] .materi .materi-card p {
  color: #4a5568 !important;
}

[data-theme="light"] .materi .materi-icon i {
  color: var(--primary) !important;
}

/* Contact section improvements */
[data-theme="light"] .contact-info-section {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .contact-info-section h3 {
  color: #1a202c !important;
  font-weight: 700;
}

[data-theme="light"] .team-section {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .team-section h3 {
  color: #1a202c !important;
  font-weight: 700;
}

/* Team member cards in light mode */
[data-theme="light"] .team-member {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .team-member h4 {
  color: #2d3748 !important;
  font-weight: 600;
}

[data-theme="light"] .team-member p {
  color: #4a5568 !important;
}

/* Team grid styling for light mode */
[data-theme="light"] .team-grid {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 1rem;
}

/* Team info h4 styling for light mode */
[data-theme="light"] .team-info h4 {
  color: #374151 !important;
  font-weight: 600;
}

/* Team info p styling for light mode - primary cyan */
[data-theme="light"] .team-info p {
  color: #0891b2 !important;
  font-weight: 500;
}

/* Team card styling for light mode - grey light background */
[data-theme="light"] .team-card {
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .team-card:hover {
  background: #e5e7eb !important;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Contact form section improvements */
[data-theme="light"] .contact-form-section {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Light mode kujang background for contact form row */
[data-theme="light"] .contact-form-section .row {
  background: linear-gradient(
      135deg,
      rgba(32, 147, 164, 0.02),
      rgba(255, 255, 255, 0.95)
    ),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><defs><g id="kujang-light"><path d="M200,50 L180,80 Q160,100 140,120 L120,140 Q110,160 120,180 L140,200 Q160,220 180,240 L200,270 L220,240 Q240,220 260,200 L280,180 Q290,160 280,140 L260,120 Q240,100 220,80 Z" fill="%23209BA4" opacity="0.025"/><path d="M200,60 L185,85 Q175,95 165,105 L155,125 Q150,135 155,145 L165,155 Q175,165 185,175 L200,200 L215,175 Q225,165 235,155 L245,145 Q250,135 245,125 L235,105 Q225,95 215,85 Z" fill="%23209BA4" opacity="0.04"/><circle cx="200" cy="200" r="8" fill="%23209BA4" opacity="0.06"/></g></defs><pattern id="kujang-pattern-light" x="0" y="0" width="250" height="250" patternUnits="userSpaceOnUse"><rect width="250" height="250" fill="%23f8f9fa" opacity="0.9"/><use href="%23kujang-light" x="0" y="0" transform="scale(0.6)"/><use href="%23kujang-light" x="125" y="125" transform="scale(0.4) rotate(45)"/><use href="%23kujang-light" x="175" y="75" transform="scale(0.3) rotate(90)"/></pattern><rect width="400" height="400" fill="url(%23kujang-pattern-light)"/></svg>');
  background-size: 400px 400px;
}

[data-theme="light"] .contact-form-section .row::before {
  background: radial-gradient(
      circle at 30% 70%,
      rgba(32, 147, 164, 0.01) 0%,
      transparent 70%
    ),
    radial-gradient(
      circle at 70% 30%,
      rgba(32, 147, 164, 0.008) 0%,
      transparent 70%
    );
}

[data-theme="light"] .contact-form-section h3 {
  color: #1a202c !important;
  font-weight: 700;
}

[data-theme="light"] .contact-form-section > p {
  color: #4a5568 !important;
  font-weight: 500;
}

/* Contact items styling for light mode */
[data-theme="light"] .contact-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .contact-item:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

[data-theme="light"] .contact-item h4 {
  color: #2d3748 !important;
  font-weight: 600;
}

[data-theme="light"] .contact-item p {
  color: #4a5568 !important;
  font-weight: 500;
}

[data-theme="light"] .contact-icon {
  color: var(--primary) !important;
}

/* Ensure all feather icons in navbar are consistent */
.navbar-extra a i[data-feather] {
  color: inherit !important;
  stroke: currentColor !important;
}

/* Specific hamburger menu styling */
#hamburger-menu,
#hamburger-menu i {
  color: #fff !important;
  background: none !important;
  border: none !important;
}

#hamburger-menu:hover,
#hamburger-menu:hover i {
  color: var(--primary) !important;
}

/* Light mode hamburger visibility */
[data-theme="light"] #hamburger-menu,
[data-theme="light"] #hamburger-menu i {
  color: #333 !important;
}

[data-theme="light"] #hamburger-menu:hover,
[data-theme="light"] #hamburger-menu:hover i {
  color: var(--primary) !important;
}

/* nanbar search form */

.navbar .search-form {
  position: absolute;
  top: 100%;
  right: 7%;
  background-color: var(--bg);
  border: 1px solid var(--border-color);
  width: 25rem;
  height: 3rem;
  display: flex;
  align-items: center;
  transform: scaleY(0);
  transform-origin: top;
  transition: 0.3s;
  z-index: 1001;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar .search-form.active {
  transform: scaleY(1);
}

.navbar .search-form input {
  height: 100%;
  width: 100%;
  font-size: 1rem;
  color: var(--text-color);
  background: transparent;
  padding: 0.5rem 0.8rem;
  border: none;
  outline: none;
}

.navbar .search-form label {
  cursor: pointer;
  font-size: 1.2rem;
  margin-right: 0.8rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 100%;
  transition: all 0.3s ease;
}

.navbar .search-form label:hover {
  color: var(--primary);
  transform: scale(1.1);
}

/* Shopping cart */

#shopping-cart-button {
  position: relative;
}

#shopping-cart-button .quantity-badge {
  display: inline-block;
  padding: 1px 5px;
  background-color: red;
  border-radius: 6px;
  font-size: 0.8rem;
  position: absolute;
  top: 0;
  right: -10px;
}

.shopping-cart {
  position: absolute;
  top: 100%;
  right: -100%;
  height: 100vh;
  width: 35rem;
  padding: 0 1.5rem;
  color: var(--bg);
  background-color: #fff;
  transition: 0.3s;
}

.shopping-cart.active {
  right: 0;
}

.shopping-cart .cart-item {
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #666;
  position: relative;
}

.shopping-cart img {
  height: 4rem;
  border-radius: 50%;
}

.shopping-cart h3 {
  height: 1.4rem;
}

.shopping-cart .item-price {
  font-size: 1.2rem;
}

.shopping-cart .cart-item #add,
.shopping-cart .cart-item #remove {
  display: inline-block;
  padding: 2px 5px;
  cursor: pointer;
  margin: 0 8px;
  background-color: black;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
}

.shopping-cart h4 {
  font-size: 1.6rem;
  margin-top: -1rem;
  text-align: center;
}

.form-container {
  width: 100%;
  display: flex;
  justify-content: center;
  border-top: 1px dashed black;
  margin-top: 1rem;
  padding: 1rem;
}

.form-container h5 {
  text-align: center;
  font-size: 1rem;
}

.form-container form {
  width: 100%;
  text-align: center;
}

.form-container label {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 1rem 0;
}

.form-container span {
  text-align: right;
}

.form-container input {
  background-color: #ddd;
  padding: 5px;
  font-size: 1rem;
  width: 70%;
}

.form-container .checkout-button {
  padding: 6px 14px;
  background-color: royalblue;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 20px;
  margin: 1rem auto;
  cursor: pointer;
}

.form-container .checkout-button.disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Tablet Optimization for Team Grid */
@media (max-width: 1024px) and (min-width: 769px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
  }

  .materi .row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
  }

  .contact .row form {
    max-width: 550px;
    padding: 3.5rem 2.5rem;
  }

  .perpustakaan .books-preview {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .perpustakaan .book-item {
    padding: 1.8rem;
  }
}

/* Mobile Optimization for Hero */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    background-size: cover;
    background-position: 70% center; /* Shift image to show both house and patterns */
    min-height: 100vh;
    min-height: -webkit-fill-available;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 80px; /* Space for fixed navbar */
  }

  .hero .content {
    padding: 2rem 3% 1rem 3%; /* Reduce side padding to prevent overflow */
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    text-align: left;
    background: rgba(
      255,
      255,
      255,
      0.75
    ); /* Reduce opacity to show background better */
    border-radius: 1rem;
    backdrop-filter: blur(8px); /* Reduce blur to show background */
    margin: 1rem 3% 0 3%; /* Add margin to prevent edge collision */
  }

  .hero .content .hero-title {
    font-size: clamp(2.5rem, 7vw, 6rem); /* Smaller title on mobile */
    line-height: 1.2;
    margin-bottom: 0.8rem;
    color: #2093a4;
  }

  .hero .content .hero-title img {
    height: 200px;
    max-width: 100%;
  }

  .hero .content .hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.6rem); /* Smaller subtitle */
    margin-bottom: 1.5rem;
    color: #2c1810;
    line-height: 1.3;
  }

  .hero .content .cta {
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    background-position: 75% center; /* Better position to show both elements */
    background-size: cover; /* Use cover for better fit */
    padding-top: 70px;
  }

  .hero .content {
    padding: 1.5rem 2% 1rem 2%; /* Even tighter padding for small screens */
    margin: 0.5rem 2% 0 2%;
    background: rgba(
      255,
      255,
      255,
      0.8
    ); /* Slightly less opaque to show background */
    backdrop-filter: blur(6px); /* Less blur for better background visibility */
  }

  .hero .content .hero-title {
    font-size: clamp(
      2rem,
      6vw,
      4.5rem
    ); /* Much smaller on very small screens */
    margin-bottom: 0.5rem;
  }

  .hero .content .hero-subtitle {
    font-size: clamp(0.9rem, 2.2vw, 1.4rem);
    margin-bottom: 1rem;
  }

  .hero .content .cta {
    font-size: 1.1rem;
    padding: 0.7rem 1.5rem;
    width: auto;
    display: inline-block;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    background-size: cover;
    background-position: right center;
    padding-top: 60px;
    min-height: 100vh;
  }

  .hero .content {
    padding: 1rem 5% 1rem 5%;
  }
}

/* Extra small devices (iPhone SE, older smartphones) */
@media (max-width: 375px) {
  .hero {
    background-position: 70% center; /* Optimal position for small screens */
    background-size: cover;
  }

  .hero .content {
    padding: 1rem 1.5% 0.8rem 1.5%;
    margin: 0.3rem 1.5% 0 1.5%;
    background: rgba(255, 255, 255, 0.85); /* Good balance of visibility */
    backdrop-filter: blur(5px); /* Minimal blur for background visibility */
  }

  .hero .content .hero-title {
    font-size: clamp(1.8rem, 5.5vw, 3.5rem);
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
  }

  .hero .content .hero-subtitle {
    font-size: clamp(0.85rem, 2vw, 1.2rem);
    margin-bottom: 0.8rem;
  }

  .hero .content .cta {
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
  }
}

.hero::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 30%;
  bottom: 0;
  background: linear-gradient(
    0deg,
    rgba(1, 1, 3, 0.8) 8%,
    rgba(255, 255, 255, 0) 50%
  );
}

.hero .content {
  padding: 2rem 7%;
  max-width: 60rem;
  z-index: 2;
  position: relative;
  width: 100%;
  text-align: left;
}

.hero .content .hero-title {
  font-size: clamp(3rem, 8vw, 8rem);
  color: #2093a4;
  text-shadow: 2px 2px 4px rgba(1, 1, 3, 0.7);
  line-height: 1.1;
  margin-bottom: -4rem;
  margin-left: -3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.hero .content .hero-title img {
  height: 250px;
  max-width: 100%;
}

.hero .content .hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  margin-top: 0.5rem;
  line-height: 1.4;
  font-weight: 400;
  text-shadow: 1px 1px 3px rgba(1, 1, 3, 0.7);
  color: #2c1810;
  margin-bottom: 2rem;
}

.hero .content .cta {
  margin-top: 0.5rem;
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.4rem;
  color: #fff;
  background-color: var(--primary);
  border-radius: 0.5rem;
  box-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
}

.cta {
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.4rem;
  color: #fff;
  background-color: var(--primary);
  border-radius: 0.5rem;
  box-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta:hover {
  background-color: #1a7a85;
  transform: translateY(-2px);
}

/* About Section */
.about,
.menu,
.contact,
.products {
  padding: 10rem 7% 1.4rem;
}

.about h2,
.menu h2,
.contact h2,
.products h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.about h2 span,
.menu h2 span,
.contact h2 span,
.products h2 span {
  color: var(--primary);
}

.about .row {
  display: flex;
}

.about .row .about-img {
  flex: 1 1 41rem;
}

.about .row .about-img img {
  width: 100;
}

.about .row .content {
  flex: 1 1 35rem;
  padding: 0 1rem;
}

.about .row .content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.about .row .content p {
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
  font-weight: 100;
  line-height: 1.6;
}

/* Sejarah Content Styling */
.sejarah-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem;
}

.sejarah-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
}

.sejarah-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(32, 147, 164, 0.15);
}

.sejarah-item h3 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.sejarah-item p {
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--text-color);
  text-align: justify;
  margin: 0;
}

.read-more {
  text-align: center;
  margin-top: 3rem;
}

.read-more .btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.read-more .btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(32, 147, 164, 0.3);
}

/* Menu Section */
.menu h2 {
  margin-bottom: 1rem;
}

.menu p {
  font-size: 1.2rem;
  color: var(--text-color);
  text-align: center;
  margin: 4rem 0 20rem 0;
}

.contact p,
.products p,
.materi p {
  text-align: center;
  max-width: 30rem;
  margin: auto;
  font-weight: 100;
  line-height: 1.6;
}

.menu .row {
  display: flex;
  flex-wrap: wrap;
  margin-top: 5rem;
  justify-content: center;
}

.menu .row .menu-card {
  text-align: center;
  padding-bottom: 2rem;
}

.menu .row .menu-card img {
  border-radius: 50%;
  width: 80%;
}

.menu .row .menu-card .menu-card-title {
  margin: 1rem auto 0.5rem;
}

/* Materi Section */
.materi {
  padding: 10rem 7% 1.4rem;
}

.materi h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.materi h2 span {
  color: var(--primary);
}

.materi .row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.materi .materi-card {
  background-color: #333;
  border: 1px solid #666;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.materi .materi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(32, 147, 164, 0.3);
  border-color: var(--primary);
}

.materi .materi-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 6rem;
  height: 6rem;
  background-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.materi .materi-icon i {
  font-size: 2.5rem;
  color: var(--text-color);
}

.materi .materi-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.materi .materi-card p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: var(--text-color);
  text-align: center;
  max-width: none;
  flex: 1;
  display: flex;
  align-items: center;
}

.materi .btn-materi {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--primary);
  color: #fff;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: auto;
}

.materi .btn-materi:hover {
  background-color: #1a7a85;
  transform: scale(1.05);
}

/* Latihan Section */
.latihan {
  padding: 10rem 7% 1.4rem;
  background: linear-gradient(
    135deg,
    rgba(255, 140, 0, 0.05) 0%,
    rgba(255, 165, 0, 0.05) 100%
  );
}

.latihan h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.latihan h2 span:first-child {
  color: var(--primary);
}

.latihan p {
  text-align: center;
  max-width: 30rem;
  margin: 0 auto 4rem;
  font-weight: 100;
  line-height: 1.6;
  color: var(--text-color);
}

.latihan .row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.latihan .latihan-card {
  background: linear-gradient(
    135deg,
    rgba(255, 140, 0, 0.1) 0%,
    rgba(255, 165, 0, 0.1) 100%
  );
  border: 1px solid rgba(255, 140, 0, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.latihan .latihan-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff8c00, #ffa500);
}

.latihan .latihan-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(255, 140, 0, 0.3);
  border-color: #ff8c00;
}

.latihan .latihan-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 6rem;
  height: 6rem;
  background: linear-gradient(135deg, #ff8c00, #ffa500);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
}

.latihan .latihan-icon i {
  font-size: 2.5rem;
  color: white;
}

.latihan .latihan-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.latihan .latihan-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-align: center;
  max-width: none;
  flex: 1;
  display: flex;
  align-items: center;
}

.latihan .level-indicator {
  margin-bottom: 1.5rem;
}

.latihan .level {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.latihan .level.beginner {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
}

.latihan .level.intermediate {
  background: linear-gradient(135deg, #ff9800, #e68900);
  color: white;
}

.latihan .level.advanced {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
}

.latihan .level.all-levels {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.latihan .btn-latihan {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ff8c00, #ffa500);
  color: white;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: auto;
  box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.latihan .btn-latihan:hover {
  background: linear-gradient(135deg, #e67e00, #ff9500);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

/* Responsive styles for latihan section */
@media (max-width: 1200px) {
  .latihan .row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .latihan .row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .latihan .latihan-card {
    padding: 1.5rem;
  }

  .latihan .latihan-icon {
    width: 5rem;
    height: 5rem;
  }

  .latihan .latihan-icon i {
    font-size: 2rem;
  }

  .latihan .latihan-card h3 {
    font-size: 1.5rem;
  }
}

/* Perpustakaan Section */
.perpustakaan {
  padding: 10rem 7% 1.4rem;
  background: linear-gradient(
    135deg,
    rgba(32, 147, 164, 0.05) 0%,
    rgba(79, 179, 209, 0.05) 100%
  );
  text-align: center;
}

.perpustakaan h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.perpustakaan h2 span {
  color: var(--primary);
}

.perpustakaan > p {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.perpustakaan .row {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
}

.perpustakaan .books-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

.perpustakaan .book-item {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.perpustakaan .book-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(32, 147, 164, 0.3);
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.perpustakaan .book-cover {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 0.8rem;
  margin: 0 auto 1.5rem;
}

.perpustakaan .book-cover i {
  font-size: 2rem;
  color: white;
}

.perpustakaan .book-item h4 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
  font-weight: 600;
}

.perpustakaan .book-item p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.8;
  text-align: center;
  max-width: none;
}

/* Product Section */
.products .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.products .product-cart {
  text-align: center;
  border: 1px solid #666;
  padding: 2rem;
}

.products .product-icons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.products .product-icons a {
  width: 4rem;
  height: 4rem;
  color: #fff;
  margin: 0.3rem;
  border: 1px solid #666;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.products .product-icons a:hover {
  background-color: var(--primary);
  border: 1px solid var(--primary);
}

.products .product-image img {
  height: 25rem;
}

.products .product-content h3 {
  font-size: 2rem;
}

.products .product-stars {
  font-size: 1.7 rem;
  padding: 0.8rem;
  color: var(--primary);
}

.products .product-stars .star-full {
  fill: var(--primary);
}

.products .product-price {
  font-size: 1.3rem;
  font-weight: bold;
}

/* Contact Section */
.contact .row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 2rem;
  background-color: #222;
  gap: 2rem;
}

.contact .row .map {
  flex: 1 1 45rem;
  width: 100%;
  object-fit: cover;
}

.contact .row form {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 3rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1.5rem;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 3;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.contact .row form .input-grup {
  display: flex;
  align-items: center;
  margin-top: 2.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact .row form .input-grup:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(32, 147, 164, 0.1);
  transform: translateY(-2px);
}

.contact .row form .input-grup:hover {
  border-color: rgba(32, 147, 164, 0.3);
}
.contact .row form .input-grup input {
  width: 100%;
  padding: 1.8rem 2rem;
  font-size: 1.6rem;
  background: none;
  color: var(--text-color);
  border: none;
  outline: none;
  transition: all 0.3s ease;
}

.contact .row form .input-grup input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}

.contact .row form .input-grup i {
  color: var(--primary);
  margin-left: 1.5rem;
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.contact .row form .input-grup:focus-within i {
  color: var(--primary);
  transform: scale(1.1);
}
.contact .row form .btn {
  margin-top: 3.5rem;
  display: inline-block;
  padding: 1.5rem 4rem;
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #0891b2);
  cursor: pointer;
  border: none;
  border-radius: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(32, 147, 164, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact .row form .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(32, 147, 164, 0.4);
  background: linear-gradient(135deg, #0891b2, var(--primary));
}

.contact .row form .btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(32, 147, 164, 0.3);
}

/* Team Section */
.team-section {
  margin: 4rem 0;
  padding: 2rem 0;
}

.team-section h3 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.team-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.team-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(32, 147, 164, 0.2);
}

.team-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary);
  transition: all 0.3s ease;
}

.team-photo:hover {
  border-color: var(--secondary);
  transform: scale(1.05);
}

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

.team-info h4 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-align: center;
}

.team-info p {
  font-size: 1.2rem;
  color: var(--primary);
  margin: 0;
  font-weight: 200;
  text-align: center;
}

/* Contact Information Section */
.contact-info-section {
  margin: 4rem 0;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info-section h3 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 3rem;
  color: var(--primary);
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 120rem;
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}

/* For larger screens, show 3 columns in top row, 2 in bottom */
@media (min-width: 900px) {
  .contact-details {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "email instagram facebook"
      "tiktok youtube .";
  }

  .contact-item:nth-child(1) {
    grid-area: email;
  }
  .contact-item:nth-child(2) {
    grid-area: instagram;
  }
  .contact-item:nth-child(3) {
    grid-area: facebook;
  }
  .contact-item:nth-child(4) {
    grid-area: tiktok;
  }
  .contact-item:nth-child(5) {
    grid-area: youtube;
  }
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.8rem;
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
  height: auto;
  min-height: 80px;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  color: #fff;
  flex-shrink: 0;
}

.contact-icon svg,
.contact-icon i {
  width: 24px;
  height: 24px;
}

.contact-content h4 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.contact-content p {
  font-size: 1.2rem;
  color: #ccc;
  margin: 0;
}

/* Social Media Links */
.social-media-links {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-media-links h4 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 2rem;
  font-weight: 600;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  font-weight: 500;
  min-width: 120px;
  justify-content: center;
}

.social-btn:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(32, 147, 164, 0.3);
}

.social-btn.email:hover {
  background: #ea4335;
}

.social-btn.instagram:hover {
  background: linear-gradient(
    45deg,
    #405de6,
    #5851db,
    #833ab4,
    #c13584,
    #e1306c,
    #fd1d1d
  );
}

.social-btn.facebook:hover {
  background: #1877f2;
}

.social-btn.tiktok:hover {
  background: #000;
}

.social-btn.threads:hover {
  background: #000;
}

.social-btn.youtube:hover {
  background: #ff0000;
}

.social-btn svg,
.social-btn i {
  width: 20px;
  height: 20px;
}

/* Contact Form Section */
.contact-form-section {
  margin-top: 4rem;
  padding: 3rem 0;
  background: var(--card-bg);
  border-radius: 1rem;
  transition: background 0.3s ease;
}

.contact-form-section h3 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.contact-form-section > p {
  text-align: center;
  margin-bottom: 2rem;
  color: #ccc;
  font-size: 1.3rem;
}

/* Contact Form Row with WhatsApp-style Background */
.contact-form-section .row {
  background: linear-gradient(
      135deg,
      rgba(32, 147, 164, 0.02),
      rgba(0, 0, 0, 0.3)
    ),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><defs><pattern id="whatsapp-pattern" x="0" y="0" width="60" height="60" patternUnits="userSpaceOnUse"><rect width="60" height="60" fill="transparent"/><circle cx="10" cy="10" r="1" fill="%23209BA4" opacity="0.03"/><circle cx="30" cy="20" r="0.8" fill="%23209BA4" opacity="0.025"/><circle cx="50" cy="30" r="1.2" fill="%23209BA4" opacity="0.035"/><circle cx="20" cy="40" r="0.6" fill="%23209BA4" opacity="0.02"/><circle cx="40" cy="50" r="1" fill="%23209BA4" opacity="0.03"/><circle cx="5" cy="35" r="0.8" fill="%23209BA4" opacity="0.025"/><circle cx="25" cy="55" r="0.7" fill="%23209BA4" opacity="0.028"/><circle cx="45" cy="15" r="0.9" fill="%23209BA4" opacity="0.032"/><circle cx="15" cy="25" r="0.5" fill="%23209BA4" opacity="0.02"/><circle cx="35" cy="45" r="1.1" fill="%23209BA4" opacity="0.035"/><path d="M8,8 Q12,6 16,8 Q14,12 10,10 Z" fill="%23209BA4" opacity="0.015"/><path d="M28,18 Q32,16 36,18 Q34,22 30,20 Z" fill="%23209BA4" opacity="0.02"/><path d="M48,28 Q52,26 56,28 Q54,32 50,30 Z" fill="%23209BA4" opacity="0.018"/></pattern></defs><rect width="60" height="60" fill="url(%23whatsapp-pattern)"/></svg>');
  background-size: 60px 60px;
  background-position: center;
  background-attachment: local;
  border-radius: 1rem;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}

.contact-form-section .row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 30% 70%,
      rgba(32, 147, 164, 0.008) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 30%,
      rgba(32, 147, 164, 0.01) 0%,
      transparent 60%
    );
  backdrop-filter: blur(20px);
  pointer-events: none;
  z-index: 1;
}

.contact .row form .input-grup textarea {
  width: 100%;
  padding: 1.8rem 2rem;
  font-size: 1.5rem;
  background: none;
  color: var(--text-color);
  border: none;
  outline: none;
  resize: vertical;
  font-family: "DM Sans", sans-serif;
  transition: all 0.3s ease;
  min-height: 120px;
}

.contact .row form .input-grup textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(32, 147, 164, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  border: none;
  outline: none;
}

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

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(32, 147, 164, 0.5);
}

.back-to-top:active {
  transform: translateY(-2px);
}

.back-to-top i {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

/* Footer */
footer {
  background-color: var(--primary);
  text-align: center;
  padding: 1rem 0 3rem;
  margin-top: 3rem;
}

footer .socials {
  padding: 1rem 0;
}

footer .socials a {
  color: #fff;
  margin: 1rem;
}

footer .socials a:hover {
  color: var(--bg);
}

footer .links {
  margin-bottom: 1.4rem;
}

footer .links a {
  color: #fff;
  padding: 0.7rem 1rem;
}

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

footer .credits {
  font-size: 0.8rem;
}

footer .credits a {
  color: var(--bg);
  font-weight: 700;
}

/* Modal Box */
/* Item Detail */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-container {
  position: relative;
  background-color: #fefefe;
  color: var(--bg);
  margin: 15% auto;
  padding: 1.2rem;
  border: 1px solid #666;
  width: 80%;
  animation: animateModal 0.5s;
}

/* Modal Animation */
@keyframes animateModal {
  from {
    top: -300px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

.modal-container .close-icon {
  position: absolute;
  right: 1rem;
}

.modal-content {
  display: flex;
  flex-wrap: nowrap;
}

.modal-content img {
  height: 15rem;
  margin-right: 2rem;
  margin-bottom: 2rem;
}

.modal-content p {
  font-size: 1.2rem;
  line-height: 1.8rem;
  margin-top: 1.2rem;
}

.modal-content a {
  display: flex;
  gap: 1rem;
  width: 12rem;
  background-color: var(--primary);
  color: #fff;
  margin-top: 1rem;
  padding: 1rem 1.6rem;
}

/* Media Quaries */
/* LAPTOP */
@media (max-width: 1366px) {
  html {
    font-size: 75%;
  }
}

/* TABLET */
@media (max-width: 758px) {
  html {
    font-size: 62.5%;
  }

  /* Navbar Mobile */
  .navbar {
    padding: 0.6rem 4%;
    min-height: 60px;
  }

  .navbar .navbar-logo {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  #hamburger-menu {
    display: inline-block;
    font-size: 1.3rem;
  }

  .navbar .navbar-nav {
    position: absolute;
    top: 100%;
    right: -60%;
    background-color: var(--navbar-bg);
    width: 60%;
    height: 100vh;
    transition: 0.3s;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .navbar .navbar-nav.active {
    right: 0;
  }

  .navbar .navbar-nav a {
    color: var(--text-color);
    display: block;
    margin: 0.8rem 1.5rem;
    padding: 0.8rem;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    width: calc(100% - 3rem);
    transition: color 0.3s ease;
  }

  .navbar .navbar-nav a::after {
    transform-origin: 0 0;
  }

  .navbar .navbar-nav a:hover::after {
    transform: scaleX(0.2);
  }

  .navbar .search-form {
    width: 85%;
    right: 1rem;
    height: 2.5rem;
  }

  .search-dropdown {
    max-height: 250px;
  }

  .search-result-item {
    padding: 0.7rem 0.8rem;
  }

  .search-result-item .result-section {
    font-size: 1rem;
  }

  .search-result-item .result-preview {
    font-size: 0.9rem;
  }

  .navbar .navbar-extra {
    gap: 0.4rem;
    margin-left: auto;
    order: 3;
    align-items: center;
  }

  .navbar .navbar-extra .login-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
  }

  /* Mobile theme toggle adjustments */
  .theme-toggle-container {
    gap: 0.2rem;
    scale: 0.9;
  }

  .theme-toggle-label {
    font-size: 0.7rem;
  }

  .theme-switch {
    width: 35px;
    height: 18px;
  }

  .slider:before {
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 3px;
  }

  input:checked + .slider:before {
    transform: translateX(17px);
  }

  /* Mobile language toggle adjustments */
  .language-toggle-container {
    scale: 0.9;
  }

  .language-toggle {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    min-width: auto;
  }

  .language-toggle span {
    font-size: 0.75rem;
  }

  .language-toggle i {
    width: 14px;
    height: 14px;
  }

  /* Mobile user menu adjustments */
  .user-menu .user-info {
    padding: 0.3rem;
    gap: 0.3rem;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  #userName {
    font-size: 0.8rem;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-info i[data-feather="chevron-down"] {
    width: 14px;
    height: 14px;
  }

  /* Mobile user menu adjustments */
  .user-menu {
    position: relative;
  }

  .user-info {
    padding: 0.3rem;
    gap: 0.3rem;
  }

  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  #userName {
    font-size: 0.8rem;
    display: none; /* Hide username on very small screens */
  }

  .dropdown-menu {
    min-width: 180px;
    right: -1rem;
  }

  .dropdown-menu a {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  /* Hero Mobile */
  .hero {
    background-attachment: scroll;
    background-position: center center;
    background-size: cover;
    min-height: 100vh;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 80px;
  }

  .hero .content {
    padding: 2rem 5% 1rem 5%;
    text-align: left;
    max-width: 100%;
    margin-top: 0;
  }

  .hero .content .hero-title {
    font-size: clamp(2.5rem, 12vw, 5rem);
    margin-bottom: 1.5rem;
    text-align: left;
  }

  .hero .content .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.6rem);
    margin-bottom: 2.5rem;
    text-align: left;
  }

  .hero .content .cta {
    font-size: 1.4rem;
    padding: 1rem 2rem;
  }

  .about .row {
    flex-wrap: wrap;
  }

  .about .row .about-img img {
    height: 24rem;
    object-fit: cover;
    object-position: center;
  }

  .about .row .content {
    padding: 0;
  }

  .about .row .content h3 {
    margin-top: 1rem;
    font-size: 2rem;
  }

  .about .row .content p {
    font-size: 1.6rem;
  }

  /* Sejarah Responsive */
  .sejarah-content {
    padding: 1rem;
  }

  .sejarah-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .sejarah-item h3 {
    font-size: 1.6rem;
  }

  .sejarah-item p {
    font-size: 1.3rem;
    line-height: 1.6;
  }

  .read-more .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
  }

  .menu p {
    font-size: 1.4rem;
    line-height: 1.8;
    color: #fff;
    text-align: justify;
    margin: 0;
  }

  .materi .row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }

  .materi .materi-card {
    padding: 1.5rem;
  }

  .materi .materi-icon {
    width: 5rem;
    height: 5rem;
  }

  .materi .materi-icon i {
    font-size: 2rem;
  }

  .contact .row {
    flex-direction: column;
    align-items: center;
  }

  .contact .row form {
    max-width: 500px;
    width: 95%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
  }

  .contact .row form .input-grup {
    margin-top: 2rem;
  }

  .contact .row form .input-grup input,
  .contact .row form .input-grup textarea {
    padding: 1.5rem 1.5rem;
    font-size: 1.5rem;
  }

  .contact .row form .btn {
    padding: 1.2rem 3rem;
    font-size: 1.4rem;
  }

  /* Team Section Responsive */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .team-card {
    padding: 1.5rem;
  }

  .team-photo {
    width: 100px;
    height: 100px;
  }

  .team-info h4 {
    font-size: 1.6rem;
  }

  .team-info p {
    font-size: 1.1rem;
  }

  /* Contact Information Responsive */
  .contact-info-section {
    margin: 2rem 1rem;
    padding: 2rem 1rem;
  }

  .contact-details {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-item {
    padding: 1rem;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
  }

  .contact-icon svg,
  .contact-icon i {
    width: 20px;
    height: 20px;
  }

  .contact-content h4 {
    font-size: 1.3rem;
  }

  .contact-content p {
    font-size: 1.1rem;
  }

  .social-buttons {
    gap: 1rem;
  }

  .social-btn {
    padding: 0.8rem 1.5rem;
    min-width: 100px;
    font-size: 0.9rem;
  }

  .social-btn svg,
  .social-btn i {
    width: 18px;
    height: 18px;
  }

  .contact-form-section {
    margin: 2rem 1rem;
    padding: 2rem 1rem;
  }

  /* Back to Top Responsive */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .back-to-top i {
    width: 20px;
    height: 20px;
  }

  .modal-content {
    flex-wrap: wrap;
  }
}

/* HP / Mobile Small */
@media (max-width: 450px) {
  html {
    font-size: 55%;
  }

  /* Navbar Extra Small Mobile */
  .navbar {
    padding: 0.5rem 3%;
    min-height: 55px;
  }

  .navbar .navbar-logo {
    font-size: 1.3rem;
    line-height: 1.1;
  }

  #hamburger-menu {
    font-size: 1.2rem;
  }

  .navbar .navbar-nav {
    width: 65%;
    right: -65%;
    padding-top: 1rem;
  }

  .navbar .navbar-nav a {
    font-size: 1.4rem;
    margin: 0.6rem 1.2rem;
    padding: 0.6rem;
  }

  .navbar .navbar-extra {
    gap: 0.3rem;
  }

  .navbar .navbar-extra .login-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  /* Extra small mobile theme toggle */
  .theme-toggle-container {
    gap: 0.1rem;
    scale: 0.8;
  }

  .theme-toggle-label {
    font-size: 0.6rem;
    display: none; /* Hide label on very small screens */
  }

  .theme-switch {
    width: 30px;
    height: 16px;
  }

  .slider:before {
    height: 10px;
    width: 10px;
    left: 2px;
    bottom: 3px;
  }

  input:checked + .slider:before {
    transform: translateX(14px);
  }

  /* Extra small mobile language toggle */
  .language-toggle-container {
    scale: 0.8;
  }

  .language-toggle {
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
  }

  .language-toggle span {
    font-size: 0.7rem;
  }

  .language-toggle i {
    width: 12px;
    height: 12px;
  }

  /* Extra small mobile user menu */
  .user-menu .user-info {
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .user-avatar {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }

  #userName {
    font-size: 0.75rem;
    max-width: 50px;
  }

  .user-info i[data-feather="chevron-down"] {
    width: 12px;
    height: 12px;
  }

  .dropdown-menu {
    min-width: 160px;
    right: -10px;
  }

  .dropdown-menu a {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .dropdown-menu a i {
    width: 16px;
    height: 16px;
  }

  /* Hero Extra Small Mobile */
  .hero {
    padding-top: 70px;
    background-position: center center;
    background-size: cover;
  }

  .hero .content {
    padding: 1.5rem 4% 1rem 4%;
  }

  .hero .content .hero-title {
    font-size: clamp(2rem, 15vw, 4rem);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-align: left;
  }

  .hero .content .hero-subtitle {
    font-size: clamp(0.9rem, 5vw, 1.4rem);
    margin-bottom: 2rem;
    line-height: 1.3;
    text-align: left;
  }

  .hero .content .cta {
    font-size: 1.2rem;
    padding: 0.8rem 1.6rem;
  }

  /* Back to Top Responsive */
  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }

  .back-to-top i {
    width: 18px;
    height: 18px;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    background-attachment: scroll;
    background-position: center center;
    background-size: cover;
    align-items: flex-start;
    padding-top: 60px;
  }

  .hero .content {
    padding: 1rem 5% 1rem 5%;
    text-align: left;
  }

  .hero .content .hero-title {
    font-size: clamp(2rem, 8vw, 4rem);
    margin-bottom: 0.5rem;
    text-align: left;
  }

  .hero .content .hero-subtitle {
    font-size: clamp(0.8rem, 3vw, 1.2rem);
    margin-bottom: 1rem;
    text-align: left;
  }

  .navbar .navbar-nav {
    width: 25rem;
  }
}

/* Very Small Devices */
@media (max-width: 320px) {
  .navbar .navbar-logo {
    font-size: 1.4rem;
  }

  .hero {
    padding-top: 65px;
    background-position: center center;
    background-size: cover;
  }

  .hero .content {
    padding: 1rem 3% 1rem 3%;
  }

  .hero .content .hero-title {
    font-size: clamp(1.8rem, 12vw, 3rem);
    line-height: 1;
    text-align: left;
    margin-bottom: 0.8rem;
  }

  .hero .content .hero-subtitle {
    font-size: clamp(0.8rem, 4vw, 1.2rem);
    text-align: left;
    margin-bottom: 1.5rem;
  }
}

/* Additional Mobile Optimizations */
@media (max-width: 576px) {
  .hero {
    background-position: right center;
    background-size: auto 100%;
  }
}

@media (max-width: 414px) {
  .hero {
    background-position: 85% center;
  }
}

@media (max-width: 375px) {
  .hero {
    background-position: 90% center;
  }
}

/* Very Small Mobile - Single Column for Team Grid and Materi */
@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .team-card {
    padding: 1rem;
  }

  .materi .row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .materi .materi-card {
    padding: 1rem;
  }

  .perpustakaan .books-preview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .perpustakaan .book-item {
    padding: 1rem;
  }

  /* Hero responsive styling for mobile */
  .hero .content .hero-title img {
    height: 150px;
    max-width: 90%;
  }

  .hero .content {
    padding: 1rem 5%;
  }
}

/* ========================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
======================================== */

/* Desktop Large (1440px and above) */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }

  .navbar {
    padding: 1rem 8%;
  }

  .hero .content {
    padding: 0 8%;
  }

  .section {
    padding: 5rem 8%;
  }
}

/* Desktop Standard (1200px - 1439px) */
@media (max-width: 1439px) and (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  .navbar {
    padding: 1rem 7%;
  }

  .section {
    padding: 4rem 7%;
  }
}

/* Laptop Large (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
  .container {
    max-width: 960px;
  }

  .navbar {
    padding: 0.8rem 6%;
  }

  .section {
    padding: 3.5rem 6%;
  }

  /* Adjust navbar items spacing */
  .navbar .navbar-nav a {
    margin: 0 0.8rem;
    font-size: 0.95rem;
  }

  /* Hero adjustments */
  .hero {
    min-height: 80vh;
  }

  .hero .content h1 {
    font-size: 2.5rem;
  }
}

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .container {
    max-width: 720px;
  }

  .navbar {
    padding: 0.8rem 5%;
  }

  .section {
    padding: 3rem 5%;
  }

  /* Navbar becomes hamburger on tablet */
  .navbar .navbar-nav {
    position: absolute;
    top: 100%;
    left: -100%;
    width: 100%;
    background-color: var(--navbar-bg);
    flex-direction: column;
    justify-content: center;
    transition: 0.3s;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
  }

  .navbar .navbar-nav.active {
    left: 0;
  }

  .navbar .navbar-nav a {
    color: var(--text-color);
    display: block;
    margin: 1rem 0;
    padding: 0.5rem 2rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
  }

  #hamburger-menu {
    display: inline-block;
  }

  /* Hero tablet adjustments */
  .hero {
    min-height: 70vh;
    background-position: center center;
  }

  .hero .content h1 {
    font-size: 2.2rem;
  }

  .hero .content p {
    font-size: 1rem;
    max-width: 90%;
  }

  /* Grid adjustments for tablet */
  .menu .row,
  .products .row {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* About section tablet */
  .about .row {
    flex-direction: column;
    gap: 2rem;
  }

  .about .about-img,
  .about .content {
    flex: none;
    width: 100%;
  }
}

/* Tablet Portrait (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
  .container {
    max-width: 540px;
  }

  .navbar {
    padding: 0.8rem 4%;
  }

  .section {
    padding: 2.5rem 4%;
  }

  .hero {
    min-height: 60vh;
  }

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

  .hero .content p {
    font-size: 0.95rem;
  }

  /* Single column for cards */
  .menu .row,
  .products .row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Mobile Landscape (568px - 599px) */
@media (max-width: 599px) and (min-width: 568px) and (orientation: landscape) {
  .hero {
    min-height: 50vh;
    background-position: center center;
  }

  .hero .content {
    padding: 1rem 4%;
  }

  .hero .content h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }

  .hero .content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .navbar {
    padding: 0.6rem 4%;
  }

  .section {
    padding: 2rem 4%;
  }

  /* Compact grid for landscape mobile */
  .menu .row,
  .products .row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Mobile Portrait Large (480px - 567px) */
@media (max-width: 567px) and (min-width: 480px) {
  .container {
    max-width: 100%;
    padding: 0 1rem;
  }

  .navbar {
    padding: 0.8rem 4%;
  }

  .navbar .navbar-logo {
    font-size: 1.6rem;
  }

  .navbar .navbar-logo img {
    height: 35px;
  }

  .section {
    padding: 2rem 4%;
  }

  .hero {
    min-height: 70vh;
    background-position: center center;
  }

  .hero .content h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  .hero .content p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Mobile Portrait Standard (375px - 479px) */
@media (max-width: 479px) and (min-width: 375px) {
  .container {
    padding: 0 1rem;
  }

  .navbar {
    padding: 0.7rem 3%;
  }

  .navbar .navbar-logo {
    font-size: 1.4rem;
  }

  .navbar .navbar-logo img {
    height: 30px;
  }

  .section {
    padding: 2rem 3%;
  }

  .hero .content h1 {
    font-size: 1.6rem;
  }

  .hero .content p {
    font-size: 0.85rem;
  }

  /* Stack everything vertically */
  .menu .row,
  .products .row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Adjust user menu for small screens */
  .user-menu .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 200px;
  }

  /* Theme toggle adjustments */
  .theme-toggle-container {
    scale: 0.8;
  }

  .theme-toggle-label {
    font-size: 0.7rem;
  }
}

/* Mobile Portrait Small (320px - 374px) */
@media (max-width: 374px) {
  .container {
    padding: 0 0.8rem;
  }

  .navbar {
    padding: 0.6rem 2%;
  }

  .navbar .navbar-logo {
    font-size: 1.2rem;
  }

  .navbar .navbar-logo img {
    height: 28px;
  }

  .navbar .navbar-logo span {
    display: none; /* Hide text on very small screens */
  }

  .section {
    padding: 1.5rem 2%;
  }

  .hero {
    min-height: 60vh;
  }

  .hero .content h1 {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .hero .content p {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }

  /* Ultra compact layout */
  .navbar-extra a {
    margin: 0 0.2rem;
  }

  .theme-toggle-container {
    scale: 0.7;
  }

  .user-menu .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
}

/* Special handling for very wide mobile landscape */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
  .hero {
    min-height: 90vh;
  }

  .hero .content {
    padding: 0.5rem 4%;
  }

  .hero .content h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
  }

  .hero .content p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .navbar {
    padding: 0.5rem 4%;
  }

  .section {
    padding: 1.5rem 4%;
  }
}

/* Print styles */
@media print {
  .navbar,
  .navbar-extra,
  #hamburger-menu,
  .user-menu,
  .theme-toggle-container {
    display: none !important;
  }

  .hero {
    background: none !important;
    color: #000 !important;
  }

  .section {
    padding: 1rem 0;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }
}

/* Mobile Portrait - Optimize background image positioning */
@media (max-width: 768px) and (orientation: portrait) {
  .hero {
    background-position: center center;
    background-size: cover;
  }

  /* Ensure the house image stays centered */
  .hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.05) 50%,
      rgba(0, 0, 0, 0.1) 100%
    );
    z-index: 1;
  }

  .hero .content {
    position: relative;
    z-index: 2;
  }
}

/* Very Small Mobile Portrait */
@media (max-width: 450px) and (orientation: portrait) {
  .hero {
    background-position: center center;
    background-size: cover;
    min-height: 100vh;
  }
}
