/*
Theme Name: SMAN 1 Cibadak
Theme URI: https://sman1cibadak.sch.id
Author: Antigravity Dev
Author URI: https://antigravity.dev
Description: A modern, high-performance WordPress theme for SMAN 1 Cibadak — designed as an Information Hub with Bento Grid layout, Glassmorphism effects, and Tailwind CSS. Built with Mobile-First approach and Web 2026 standards.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sman1cibadak
Tags: education, modern, bento-grid, tailwind, responsive, glassmorphism

SMAN 1 Cibadak Information Hub Theme
Copyright 2026 Antigravity Dev
*/

/* === BASE RESET & CUSTOM PROPERTIES === */
:root {
  --color-primary: #0F172A;
  --color-primary-light: #1E293B;
  --color-accent: #4F46E5;
  --color-accent-hover: #4338CA;
  --color-accent-light: #818CF8;
  --color-surface: #F8FAFC;
  --color-surface-card: rgba(255, 255, 255, 0.72);
  --color-surface-dark: rgba(15, 23, 42, 0.65);
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  --color-text-light: #94A3B8;
  --color-border: #E2E8F0;
  --color-white: #FFFFFF;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;

  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.08);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === DARK MODE VARIABLES === */
:root.dark-mode {
  --color-primary: #F8FAFC;
  --color-primary-light: #F1F5F9;
  --color-surface: #0F172A;
  --color-surface-card: rgba(30, 41, 59, 0.85); /* Slightly darker card background */
  --color-surface-dark: rgba(255, 255, 255, 0.05);
  --color-text: #CBD5E1;
  --color-text-muted: #94A3B8;
  --color-text-light: #64748B;
  --color-border: rgba(255, 255, 255, 0.1); /* Subtle borders */
  --color-white: #1E293B; /* Map white elements to slate-800 */
}

/* === GLOBAL STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-surface);
  line-height: 1.7;
  overflow-x: hidden !important; /* Paksa agar tidak ada scroll samping */
  width: 100% !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--color-accent-hover);
}

/* === GLASSMORPHISM UTILITIES === */
.glass {
  background: var(--color-surface-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
  background: var(--color-surface-dark);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* === FLOATING NAVBAR === */
.site-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  padding: 0.75rem 1.5rem;
  transition: all var(--transition-smooth);
}

.site-navbar.scrolled {
  padding: 0.5rem 1.5rem;
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-xl);
  padding: 0.625rem 1.25rem;
  box-shadow: var(--shadow-glass);
  transition: all var(--transition-smooth);
  width: 100% !important; /* Pastikan tidak melebar */
  box-sizing: border-box !important;
}

:root.dark-mode .navbar-inner {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.site-navbar.scrolled .navbar-inner {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-lg);
}

:root.dark-mode .site-navbar.scrolled .navbar-inner {
  background: rgba(15, 23, 42, 0.88);
}

/* Navbar Responsive Polish */
@media (max-width: 400px) {
  .navbar-inner {
    padding: 0.5rem 0.75rem !important; /* Kurangi padding agar lebih luas */
    gap: 0.5rem !important;
  }
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-primary);
  flex-shrink: 0;
}

.navbar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

@media (min-width: 640px) {
  .navbar-brand img {
    width: 38px;
    height: 38px;
  }
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.navbar-brand-name {
  font-size: clamp(0.8125rem, 3.5vw, 0.9375rem);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.navbar-brand-tagline {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

@media (max-width: 400px) {
  .navbar-brand-name {
    font-size: 0.75rem !important;
    white-space: nowrap;
  }
  .navbar-brand-tagline {
    font-size: 0.6rem !important;
    white-space: nowrap;
  }
}

/* Desktop Nav */
.navbar-nav {
  display: none;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: rgba(243, 244, 246, 0.5); /* subtle background */
  border: 1px solid rgba(226, 232, 240, 0.5);
  color: var(--color-text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--color-surface);
  color: var(--color-accent);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.navbar-nav li a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

/* Dropdown Support */
.navbar-nav li {
  position: relative;
}

.navbar-nav .menu-item-has-children > a {
  padding-right: 1.5rem;
}

.navbar-nav .menu-item-has-children > a::after {
  content: '';
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3E%3Cpath stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m1 1 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  transition: transform var(--transition-fast);
}

.navbar-nav li:hover > a::after {
  transform: translateY(-50%) rotate(180deg);
}

.navbar-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 100;
  margin-top: 5px; /* Add slight gap from nav item */
}

/* Invisible bridge so mouse doesn't lose hover across the gap */
.navbar-nav .sub-menu::before {
	content: '';
	position: absolute;
	top: -15px; 
	left: 0;
	width: 100%;
	height: 15px;
}

.navbar-nav li:hover > .sub-menu,
.navbar-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar-nav .sub-menu li {
  width: 100%;
}

.navbar-nav .sub-menu li a {
  padding: 0.625rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
}

.navbar-nav .sub-menu li a:hover {
  background: rgba(79, 70, 229, 0.06);
  color: var(--color-accent);
}

.navbar-nav li a:hover,
.navbar-nav li.current-menu-item a {
  color: var(--color-accent);
  background: rgba(79, 70, 229, 0.06);
}

/* Hamburger */
.navbar-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 1100;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.navbar-toggle:hover, .navbar-toggle:active {
  background: rgba(15, 23, 42, 0.05); /* Slight rounded hover effect */
}

/* Fix background on dark mode toggle hover */
:root.dark-mode .navbar-toggle:hover, 
:root.dark-mode .navbar-toggle:active {
  background: rgba(255, 255, 255, 0.05);
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

.navbar-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Full-screen Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

:root.dark-mode .mobile-menu-overlay {
  background: rgba(15, 23, 42, 0.96) !important;
}

.mobile-menu-overlay nav ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-menu-overlay nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
}

.mobile-menu-overlay nav ul li {
  transform: translateX(-30px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.mobile-menu-overlay.active nav ul li {
  transform: translateX(0);
  opacity: 1;
}

/* Stagger anak menu */
.mobile-menu-overlay nav ul li:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-overlay nav ul li:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-overlay nav ul li:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-overlay nav ul li:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-overlay nav ul li:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu-overlay nav ul li:nth-child(6) { transition-delay: 0.3s; }
.mobile-menu-overlay nav ul li:nth-child(7) { transition-delay: 0.35s; }
.mobile-menu-overlay nav ul li:nth-child(8) { transition-delay: 0.4s; }

.mobile-menu-overlay nav ul li a {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  padding: 1rem;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-menu-overlay nav ul li a:hover {
  color: var(--color-accent-light);
  padding-left: 1.5rem;
}

/* Mobile Sub-menu */
.mobile-menu-overlay nav ul ul {
  border-bottom: none;
  padding: 0.5rem 0 0.5rem 1.5rem;
  gap: 0;
}

.mobile-menu-overlay nav ul ul li {
  transform: translateX(0);
  opacity: 0;
}

.mobile-menu-overlay.active nav ul ul li {
  opacity: 1;
}

.mobile-menu-overlay nav ul ul li a {
  font-size: 1.125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  padding: 0.5rem 1rem;
  border-bottom: none;
}

/* === HERO SECTION === */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem 3rem;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.85) 0%,
    rgba(15, 23, 42, 0.6) 40%,
    rgba(79, 70, 229, 0.3) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.3);
  color: var(--color-accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-title {
  font-size: clamp(1.4rem, 7vw, 3.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  padding: 0 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem !important; /* Ukuran pasti untuk layar kecil agar tidak overflow */
    padding: 0 0.5rem;
  }
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--color-accent-light), #C084FC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column !important; /* Paksa tumpukan vertikal */
    align-items: stretch !important;
    padding: 0 1.5rem;
    gap: 0.75rem;
  }
  
  .hero-actions .btn {
    width: 100% !important;
    justify-content: center;
    padding: 0.875rem 1.5rem; /* Lebih besar untuk touch area */
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
  color: var(--color-white);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  color: var(--color-white);
}

/* === ANNOUNCEMENT TICKER === */
.announcement-ticker {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  max-width: 100% !important; /* KUNCI UTAMA: Jangan biarkan ticker meluber */
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.ticker-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 0.5rem 1.25rem;
  max-width: 100% !important;
  overflow: hidden !important;
}

.ticker-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-warning);
  background: rgba(245, 158, 11, 0.15);
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  flex-shrink: 0;
}

.ticker-content {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.ticker-track {
  display: inline-block;
  animation: ticker-scroll 20s linear infinite;
}

.ticker-track span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  padding-right: 4rem;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === SECTION STYLES === */
.section {
  padding: 4rem 1.5rem;
}

.section-lg {
  padding: 5rem 1.5rem;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-overline {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* === BENTO GRID === */
.bento-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

/* Bento Card Base */
.bento-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-smooth);
  position: relative;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.bento-card-glass {
  background: var(--color-surface-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Card Image */
.bento-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.bento-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

/* Skeleton Loading Shimmer Effect */
.bento-card-img:empty,
.bento-card-img img[aria-hidden="true"],
.skeleton-box {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.4) 25%, rgba(203, 213, 225, 0.6) 50%, rgba(203, 213, 225, 0.4) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

:root.dark-mode .bento-card-img:empty,
:root.dark-mode .bento-card-img img[aria-hidden="true"],
:root.dark-mode .skeleton-box {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.6) 25%, rgba(51, 65, 85, 0.6) 50%, rgba(30, 41, 59, 0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

.bento-card-img .category-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-news {
  background: rgba(79, 70, 229, 0.85);
  color: white;
}

.badge-event {
  background: rgba(16, 185, 129, 0.85);
  color: white;
}

.badge-gallery {
  background: rgba(245, 158, 11, 0.85);
  color: white;
}

/* Card Content */
.bento-card-content {
  padding: 1.25rem;
}

.bento-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.625rem;
}

.bento-card-meta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.bento-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-card-title a {
  color: inherit;
  text-decoration: none;
}

.bento-card-title a:hover {
  color: var(--color-accent);
}

.bento-card-excerpt {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Featured / Large Card */
.bento-card-featured {
  grid-column: 1 / -1;
}

.bento-card-featured .bento-card-img {
  aspect-ratio: 21/9;
}

.bento-card-featured .bento-card-title {
  font-size: 1.25rem;
}

/* Stats Card */
.bento-card-stats {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1E293B 100%);
  color: var(--color-white);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.stats-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-value {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-white), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-desc {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Gallery Mosaic Card */
.bento-card-gallery {
  padding: 0.75rem;
}

.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  height: 100%;
}

.gallery-mosaic-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
}

.gallery-mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

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

.gallery-mosaic-item:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

/* CTA Card */
.bento-card-cta {
  background: linear-gradient(135deg, var(--color-accent) 0%, #7C3AED 100%);
  color: var(--color-white);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
}

.bento-card-cta h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.bento-card-cta p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.bento-card-cta .btn {
  background: var(--color-white);
  color: var(--color-accent);
}

.bento-card-cta .btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* === FOOTER === */
.site-footer {
  background: #0F172A; /* Solid dark background to ensure readability in all modes */
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.footer-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
}

.footer-desc {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  max-width: 320px;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-fast);
}

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

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

.footer-copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

/* === SCROLL-TO-TOP === */
.scroll-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
}

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

.scroll-to-top:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

/* === ACCESSIBILITY === */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--color-surface);
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  padding: 15px 23px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* === ANIMATION KEYFRAMES === */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 160ms; }
.delay-3 { transition-delay: 240ms; }
.delay-4 { transition-delay: 320ms; }
.delay-5 { transition-delay: 400ms; }
.delay-6 { transition-delay: 480ms; }

/* === RESPONSIVE: TABLET (≥640px) === */
@media (min-width: 640px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .section {
    padding: 5rem 2rem;
  }

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

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* === RESPONSIVE: DESKTOP (≥1024px) === */
@media (min-width: 1024px) {
  .navbar-nav {
    display: flex;
  }

  .navbar-toggle {
    display: none;
  }

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

  .bento-card-featured .bento-card-img {
    aspect-ratio: 21/9;
  }

  .section {
    padding: 6rem 2rem;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  }
}

/* === RESPONSIVE: LARGE DESKTOP (≥1280px) === */
@media (min-width: 1280px) {
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === WORDPRESS CORE STYLES === */
.alignnone { margin: 5px 20px 20px 0; }
.aligncenter { display: block; margin: 5px auto; }
.alignright { float: right; margin: 5px 0 20px 20px; }
.alignleft { float: left; margin: 5px 20px 20px 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text { text-align: center; font-size: 0.8125rem; color: var(--color-text-muted); }
.gallery-caption { text-align: center; }
.bypostauthor { }
.sticky { }

/* === PAGINATION === */
.pagination-modern .nav-links,
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap; /* Mencegah overflow kalau di HP layarnya kecil */
}

/* Sembunyikan H2 Screen Reader yang kadang muncul mengganggu layout */
.pagination-modern h2.screen-reader-text,
.pagination .screen-reader-text {
  display: none;
}

.nav-links .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-links .page-numbers:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(79, 70, 229, 0.05);
}

.nav-links .page-numbers.current {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.nav-links .page-numbers.prev,
.nav-links .page-numbers.next {
  width: auto;
  padding: 0 1rem;
}

/* === BUTTON TEXT === */
.btn-text {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-text:hover {
  opacity: 0.8;
  transform: translateX(4px);
}

/* === FORM STYLES === */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ==========================================================================
   SINGLE POST TEMPLATE (single.php)
   ========================================================================== */
.single-post-pt {
  padding-top: 7rem;
}

.single-post-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.single-post-breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.single-post-breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.single-post-breadcrumb a:hover {
  color: var(--color-accent);
}

.single-post-breadcrumb .breadcrumb-separator {
  margin: 0 0.5rem;
}

.single-post-breadcrumb .breadcrumb-current {
  color: var(--color-primary);
}

.single-post-category {
  margin-bottom: 1rem;
}

.single-post-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.single-post-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.single-post-featured-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 2rem;
}

.single-post-featured-image .featured-img-full {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text);
}

.single-post-tags-container {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.single-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.single-post-tags .tag-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  background: rgba(79, 70, 229, 0.06);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  border: 1px solid rgba(79, 70, 229, 0.15);
  transition: all var(--transition-fast);
}

.single-post-tags .tag-badge:hover {
  background: var(--color-accent);
  color: white;
}

.single-post-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.single-post-nav .nav-prev {
  text-align: left;
}

.single-post-nav .nav-next {
  text-align: right;
}

.single-post-nav .nav-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.single-post-nav .nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

.single-post-nav a:hover .nav-title {
  color: var(--color-accent);
}

/* ==========================================================================
   FINAL MOBILE RESPONSIVE OVERHAUL (v1.1.5)
   ========================================================================== */

/* 1. Global fix for Hero Title to prevent overflow on all screens */
.hero-title {
    font-size: clamp(1.4rem, 5vw, 2.8rem) !important; 
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 2. Comprehensive Mobile & Tablet Fixes (up to 768px) */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden !important;
        width: 100%;
    }

    .hero-section {
        padding: 4rem 1rem !important;
        min-height: auto !important;
    }

    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.25 !important;
        padding: 0 0.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.9375rem !important;
        padding: 0 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* 3. Force Vertical Button Stacking with controlled width */
    .hero-actions {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 300px !important; /* Mencegah tombol kepanjangan */
        margin: 0 auto !important;
        gap: 0.75rem !important;
    }

    .hero-actions .btn {
        width: 100% !important;
        margin: 0 !important;
        justify-content: center !important;
        padding: 0.875rem 1.25rem !important;
        font-size: 0.8125rem !important;
    }

    /* 4. Ticker adjustment */
    .announcement-ticker {
        margin-top: 1.5rem !important;
    }
    
    .ticker-inner {
        padding: 0.4rem 0.75rem !important;
        border-radius: var(--radius-lg) !important;
    }

    /* 5. Bento Grid Polish */
    .section-header {
        text-align: center !important;
        margin-bottom: 1.5rem !important;
    }

    .bento-grid {
        gap: 0.75rem !important;
    }
}

/* 6. Extreme Small Screens (iPhone SE / Older Android / Z Fold) */
@media (max-width: 400px) {
    .navbar-inner {
        padding: 0.5rem 0.625rem !important; /* Persempit padding */
        gap: 0.25rem !important;
    }
    .navbar-brand {
        gap: 0.375rem !important; /* Rapatkan logo dan teks */
        max-width: calc(100% - 50px) !important; /* Beri ruang untuk tombol menu */
    }
    .navbar-brand-name {
        font-size: 0.7rem !important;
    }
    .navbar-brand-tagline {
        font-size: 0.5rem !important;
        opacity: 0.8 !important;
    }
    .hero-title {
        font-size: 1.35rem !important; /* Turunkan lagi agar aman di 340px */
        letter-spacing: -0.01em !important;
    }
}

/* ==========================================================================
   VIDEO MODAL (Profil Sekolah)
   ========================================================================== */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.video-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.video-modal-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95) translateY(20px);
  transition: all var(--transition-smooth);
}

.video-modal-overlay.active .video-modal-container {
  transform: scale(1) translateY(0);
}

.video-modal-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: 10000;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  opacity: 0;
  visibility: hidden;
}

.video-modal-overlay.active .video-modal-close {
  opacity: 1;
  visibility: visible;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* ==========================================================================
   NEWS PAGE TEMPLATE
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* ==========================================================================
   MEGA v1.7.0 UPDATES: TRANSITION & SEARCH MODAL & READING PROGRESS
   ========================================================================== */

/* Page Transition Overlay */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-background);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  pointer-events: none; /* Let clicks pass through when hidden */
}

/* When transitioning */
body.is-transitioning .page-transition-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Spotlight Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85); /* Dark overlay */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9990;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.search-modal-close:hover {
  opacity: 1;
  transform: rotate(90deg) scale(1.1);
}

.search-modal-content {
  width: 100%;
  max-width: 800px;
  padding: 0 1.5rem;
  transform: translateY(-20px);
  transition: transform var(--transition-base);
}

.search-modal.active .search-modal-content {
  transform: translateY(0);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 0.5rem 1rem;
}

.search-input-wrapper:focus-within {
  border-color: var(--color-accent-light);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.search-modal-input {
  width: 100%;
  background: transparent !important;
  border: none !important;
  color: var(--color-white) !important;
  font-size: clamp(1.5rem, 5vw, 2.5rem) !important;
  font-weight: 700;
  padding: 1rem 1rem 1rem 3.5rem !important;
  box-shadow: none !important;
}

.search-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.search-icon {
  position: absolute;
  left: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
}

.search-modal-hints {
  margin-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* Custom Gallery WP Core Override to Masonry Bento Style */
.custom-gallery-wrapper .wp-block-gallery {
  display: block;
  column-count: 3;
  column-gap: 1.5rem;
  margin-bottom: 2rem;
}

.custom-gallery-wrapper .wp-block-gallery .wp-block-image {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  display: block;
}

.custom-gallery-wrapper .wp-block-gallery .wp-block-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  display: block;
  transition: transform var(--transition-base);
}

.custom-gallery-wrapper .wp-block-gallery .wp-block-image:hover img {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
  .custom-gallery-wrapper .wp-block-gallery {
    column-count: 2;
  }
}
@media (max-width: 640px) {
  .custom-gallery-wrapper .wp-block-gallery {
    column-count: 1;
  }
}

/* Fix Dark Mode Vibility for Hero, Footer */
.dark-mode .hero-title,
.dark-mode .hero-subtitle,
.dark-mode .hero-badge,
.dark-mode .site-footer,
.dark-mode .site-footer h3,
.dark-mode .site-footer p,
.dark-mode .site-footer a,
.dark-mode .footer-bottom,
.dark-mode .footer-copyright {
    color: #ffffff !important;
}
.dark-mode .site-footer a:hover {
    color: var(--color-accent-light) !important;
}
