/* =====================================================
   Sistem Informasi & Asisten Sekretariat KPP Tulungagung – Landing Page CSS
   ===================================================== */
:root {
  --primary: #003366;
  --primary-light: #004080;
  --bg-body: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --glass: rgba(255, 255, 255, 0.7);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  width: 100vw;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  white-space: nowrap;
}

.nav-logo span {
  font-size: 16px !important;
}

.nav-menu {
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#liveClock {
  margin-right: 12px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  padding-right: 12px;
  color: #000;
  font-weight: 600;
  white-space: nowrap;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: flex;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 550;
  transition: all 0.3s;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(30, 64, 175, 0.05);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(30, 64, 175, 0.1);
}

.nav-login-btn {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  white-space: nowrap;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.nav-login-btn:hover {
  background: var(--primary-dark, #1e3a8a);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.menu-close {
  display: none;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 100px 20px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
}

.orb1 {
  width: 400px;
  height: 400px;
  background: #3b82f6;
  top: -100px;
  left: -100px;
}

.orb2 {
  width: 300px;
  height: 300px;
  background: #f59e0b;
  bottom: -50px;
  right: -50px;
}

.hero-tag {
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: #0f172a;
  line-height: 1.1;
}

.hero h1 span {
  color: var(--primary);
  display: block;
}

.hero p {
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: var(--text-muted);
}

.hero-search {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  padding: 8px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 20px;
  font-size: 16px;
  font-family: inherit;
}

.hero-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
}

/* ---- Links Section ---- */
.links-section {
  padding: 80px 20px;
  background: #fff;
}

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

.section-header {
  margin-bottom: 48px;
  text-align: left;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.link-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  padding: 30px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.link-card:hover {
  transform: translateY(-15px) rotateX(8deg) rotateY(-4deg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: #fff;
  border-color: var(--primary-light);
}

.link-card:hover .link-icon {
  transform: translateZ(20px) scale(1.1);
}

.link-card:hover .link-info {
  transform: translateZ(10px);
}

.link-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.5s ease;
}

.link-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.link-info p {
  font-size: 14px;
  color: var(--text-muted);
}

.link-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
}

/* ---- Footer ---- */
.footer {
  padding: 40px 20px;
  background: #f1f5f9;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

@media (max-width: 1200px) {
  .nav-container {
    padding: 8px 16px;
  }

  .nav-menu {
    gap: 8px;
  }

  .nav-link {
    font-size: 12px;
    padding: 5px 8px;
  }

  .hero h1 {
    font-size: 42px;
  }
}

@media (max-width: 992px) {
  .nav-toggle {
    display: flex !important;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch !important;
    padding: 80px 20px !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease;
    z-index: 2000;
    margin: 0 !important;
    gap: 0;
  }

  .nav-menu.active {
    right: 0;
    transform: translateX(0);
  }

  .menu-close {
    display: block !important;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 2001;
  }

  .nav-link {
    font-size: 16px;
    padding: 15px 10px;
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
  }

  .nav-link.active {
    background: rgba(30, 64, 175, 0.05);
    color: var(--primary);
    font-weight: 700;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .nav-login-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .nav-login-btn .btn-text {
    display: none;
    /* Hide text on very small screens to save space */
  }

  .hero {
    padding: 80px 20px 40px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .nav-login-btn {
    padding: 8px;
  }

  .nav-login-btn svg {
    margin: 0;
  }
}

@media (max-width: 768px) {
  .links-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .agenda-landing-section {
    padding: 30px 0 !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }

  .hero-tag {
    font-size: 10px;
    padding: 4px 12px;
  }

  .hero p {
    font-size: 14px;
  }

  .nav-logo span {
    font-size: 16px;
  }
}

/* Dropdown Styles */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 220px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
  z-index: 100;
  border-radius: 8px;
  top: 100%;
  left: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.dropdown-content.show {
  display: block;
}

.dropdown-content a {
  color: #334155;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.dropdown-content a:hover {
  background-color: #f1f5f9;
  color: var(--primary);
}

.nav-dropdown:hover .dropdown-content {
  display: block;
}

@media (max-width: 992px) {
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--primary);
    border-radius: 0;
    margin-left: 16px;
    margin-bottom: 10px;
    min-width: auto;
  }

  .nav-dropdown:hover .dropdown-content {
    display: none;
    /* Disable hover on mobile, rely on click via .show class */
  }
}