/* MA'HAD KHOS AT-TAHZIB KEKAIT - Custom Styles */

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2d6e2d, #1a431a);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #225522, #0f2e10);
}

.dark ::-webkit-scrollbar-track {
  background: #1a1a1a;
}

/* Selection */
::selection {
  background: #d4a017;
  color: #0f2e10;
}

/* Marquee animation */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 40s linear infinite;
  display: inline-flex;
}

/* Loading screen */
#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(34, 85, 34, 0.15);
}

/* Islamic ornament corner */
.ornament-corner {
  position: relative;
}

.ornament-corner::before,
.ornament-corner::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #d4a017;
}

.ornament-corner::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.ornament-corner::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* Prose for berita detail */
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #225522;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.prose ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose ul li {
  list-style: disc;
  margin-bottom: 0.5rem;
}

/* Filter button active */
.filter-btn.active {
  background: #225522 !important;
  color: white !important;
}

/* PPDB Tab */
.ppdb-tab.active {
  color: #225522;
  border-color: #225522;
}

.dark .ppdb-tab.active {
  color: #ecd167;
  border-color: #ecd167;
}

/* Gallery item hover */
.gallery-item {
  cursor: pointer;
  overflow: hidden;
  position: relative;
  border-radius: 0.75rem;
}

.gallery-item img {
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 46, 16, 0.7), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: white;
  z-index: 1;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.gallery-item:hover .caption {
  transform: translateY(0);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-verified {
  background: #dbeafe;
  color: #1e40af;
}

.badge-accepted {
  background: #d1fae5;
  color: #065f46;
}

.badge-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Smooth fade in */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Navbar scroll effect */
.navbar-scrolled {
  background: rgba(26, 67, 26, 0.98) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Berita card */
.berita-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.dark .berita-card {
  background: rgb(17, 24, 39);
}

.berita-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(34, 85, 34, 0.15);
}

.berita-card img {
  transition: transform 0.4s ease;
}

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

/* Glass card */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Pattern overlays - Islamic geometric */
.pattern-islamic {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><path d="M30 0L37 13L52 15L41 26L44 41L30 34L16 41L19 26L8 15L23 13Z" fill="%23d4a017" opacity="0.1"/></svg>');
  background-size: 80px;
}

.pattern-gold {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80"><path d="M40 5L48 32L75 32L53 48L62 75L40 60L18 75L27 48L5 32L32 32Z" fill="%23d4a017"/></svg>');
  background-size: 100px;
}

.pattern-star {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="M50 5L60 35L90 40L68 60L74 90L50 75L26 90L32 60L10 40L40 35Z" fill="%23d4a017" opacity="0.5"/></svg>');
  background-size: 120px;
}

.pattern-green {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80"><path d="M40 5L48 32L75 32L53 48L62 75L40 60L18 75L27 48L5 32L32 32Z" fill="%23225522"/></svg>');
  background-size: 100px;
}

.pattern-rub {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M30 0L37 13L52 15L41 26L44 41L30 34L16 41L19 26L8 15L23 13Z" fill="%23d4a017"/></svg>');
  background-size: 80px;
}

/* Responsive table */
@media (max-width: 768px) {
  .responsive-table thead {
    display: none;
  }
  
  .responsive-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem;
  }
  
  .responsive-table td {
    display: block;
    text-align: right;
    border: none;
  }
  
  .responsive-table td::before {
    content: attr(data-label);
    float: left;
    font-weight: 700;
  }
}
