/* ============================================
   SMA Negeri 3 Purwokerto — Main Stylesheet
   Clean, Simple, Modern
   ============================================ */

/* ========== BASE & RESET ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #374151;
  background-color: #ffffff;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #0593d6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #046fa2; }

/* ========== TOP BAR ========== */
.topbar {
  background-color: #034d73;
  color: #ffffff;
  font-size: 0.75rem;
}

.topbar a:hover {
  color: #f9a825;
}

/* ========== HEADER / NAVBAR ========== */
.header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #f3f4f6;
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.logo-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
  .logo-icon {
    width: 3.5rem;
    height: 3.5rem;
  }
}

/* Nav Dropdown */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile Menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-menu.open {
  max-height: 2000px;
}

/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #034d73 0%, #0593d6 50%, #1aa4e4 100%);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(3, 30, 50, 0.88) 0%, rgba(5, 100, 155, 0.72) 50%, rgba(5, 147, 214, 0.5) 100%);
  z-index: 1;
}

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

/* Hero decorative elements */
.hero-decor-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-decor-circle-1 {
  top: -5rem;
  right: -5rem;
  width: 16rem;
  height: 16rem;
}

.hero-decor-circle-2 {
  bottom: -8rem;
  left: -8rem;
  width: 24rem;
  height: 24rem;
}

/* Floating dots */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-dot {
  position: absolute;
  border-radius: 50%;
  animation: float 4s ease-in-out infinite;
}

/* Slider indicators */
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.slider-dot.active {
  background: #ffffff;
  width: 24px;
  border-radius: 4px;
}

/* ========== STAT CARDS ========== */
.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  transition: background 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ========== SECTION BADGE ========== */
.section-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 9999px;
}

/* ========== CARDS ========== */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Program cards icon */
.program-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.card-hover:hover .program-icon {
  transform: scale(1.1);
}

/* News card image */
.news-card-img {
  height: 12rem;
  overflow: hidden;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-hover:hover .news-card-img img {
  transform: scale(1.08);
}

/* ========== VISI MISI ========== */
.misi-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f9fafb;
  transition: background 0.2s ease;
}

.misi-item:hover {
  background: #e0f4fc;
}

.misi-number {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: #0593d6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ========== GRADIENT TEXT ========== */
.gradient-text {
  background: linear-gradient(135deg, #034d73, #0593d6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== SAMBUTAN SECTION ========== */
.sambutan-photo {
  width: 9rem;
  min-width: 9rem;
  height: 11rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

@media (min-width: 1024px) {
  .sambutan-photo {
    width: 11rem;
    min-width: 11rem;
    height: 13rem;
  }
}

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

/* ========== PENGUMUMAN LIST ========== */
.announcement-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f9fafb;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.announcement-item:hover {
  background: #e0f4fc;
  border-color: #b8e3f7;
}

.announcement-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ========== LAYANAN DIGITAL GRID ========== */
.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  transition: all 0.2s ease;
  text-align: center;
}

.service-card:hover {
  background: #e0f4fc;
  border-color: #7dd3f5;
  transform: translateY(-2px);
}

/* ========== CTA SECTION ========== */
.cta-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #da0f16 0%, #a80c12 100%);
}

.cta-section::before,
.cta-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.cta-section::before {
  top: -5rem;
  right: -5rem;
  width: 20rem;
  height: 20rem;
}

.cta-section::after {
  bottom: -8rem;
  left: -5rem;
  width: 24rem;
  height: 24rem;
}

/* ========== FOOTER ========== */
.footer {
  background: #111827;
  color: #9ca3af;
}

.footer a:hover {
  color: #ffffff;
}

/* ========== BACK TO TOP ========== */
.btn-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #0593d6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(5, 147, 214, 0.4);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

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

.btn-top:hover {
  background: #da0f16;
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* ========== LINE CLAMP ========== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .hero {
    min-height: 480px;
  }

  .sambutan-photo {
    width: 7rem;
    min-width: 7rem;
    height: 8.5rem;
  }
}

/* ================================================
   MODERN ENHANCEMENTS
   ================================================ */

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #0593d6 0%, #38b5f0 55%, #da0f16 100%);
  box-shadow: 0 0 12px rgba(5, 147, 214, 0.6);
  z-index: 9999;
  transition: width 0.08s linear;
  border-radius: 0 3px 3px 0;
  pointer-events: none;
}

/* ---- Glassmorphism Header on Scroll ---- */
.header.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(243, 244, 246, 0.6);
}

/* ---- Dot Grid Pattern on Section Backgrounds ---- */
section.bg-gray-50 {
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.04) 1px, transparent 0);
  background-size: 28px 28px;
}

/* ---- Spring Easing for Fade Up ---- */
.fade-up {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Enhanced Card Hover ---- */
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(5, 147, 214, 0.14);
}

/* ---- News Card Bottom Accent Line ---- */
article.card-hover {
  position: relative;
}
article.card-hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #0593d6, #38b5f0);
  border-radius: 0 0 1rem 1rem;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
article.card-hover:hover::after {
  width: 100%;
}

/* ---- Announcement Left Accent Bar ---- */
.announcement-item {
  position: relative;
  overflow: hidden;
}
.announcement-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, #034d73, #0593d6);
  border-radius: 0.75rem 0 0 0.75rem;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.announcement-item:hover::before {
  height: 100%;
}

/* ---- Animated Gradient Text ---- */
.gradient-text {
  background: linear-gradient(270deg, #034d73, #0593d6, #38b5f0, #034d73);
  background-size: 300% 100%;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ---- Section Badge Shimmer ---- */
.section-badge {
  position: relative;
  overflow: hidden;
}
.section-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: badgeShimmer 3.5s ease-in-out infinite;
}
@keyframes badgeShimmer {
  0%        { left: -60%; }
  50%, 100% { left: 130%; }
}

/* ---- Service Card Modern Hover ---- */
.service-card:hover {
  background: linear-gradient(135deg, #e0f4fc, #b8e3f7);
  border-color: #42c0f5;
  box-shadow: 0 4px 14px rgba(5, 147, 214, 0.15);
}

/* ---- Back-to-Top Glow ---- */
.btn-top:hover {
  background: #034d73;
  box-shadow: 0 0 0 5px rgba(5, 147, 214, 0.22), 0 4px 14px rgba(5, 147, 214, 0.5);
}

/* ---- Typewriter Cursor ---- */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: rgba(255,255,255,0.75);
  margin-left: 2px;
  vertical-align: text-bottom;
  border-radius: 1px;
  animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ---- Smooth Image Zoom on Gallery ---- */
.card-hover img {
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover img {
  transform: scale(1.07);
}

/* ---- Misi Item left accent on hover ---- */
.misi-item {
  border-left: 3px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.misi-item:hover {
  background: #e0f4fc;
  border-left-color: #0593d6;
}
