/* ============================================
SISTEM INFORMASI PARIWISATA PARANGGUPITO
Design System & Main Styles — v2.0
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Brand Colors */
  --primary: #0077B6;
  --primary-dark: #005f8a;
  --primary-light: #0096e4;
  --primary-50: rgba(0,119,182,0.06);
  --primary-100: rgba(0,119,182,0.12);
  --secondary: #90E0EF;
  --secondary-light: #b8ecf5;
  --accent: #F4E1C1;
  --accent-dark: #e6c998;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0077B6, #00b4d8);
  --gradient-hero: linear-gradient(135deg, #003d5c 0%, #0077B6 40%, #00b4d8 70%, #48cae4 100%);
  --gradient-dark: linear-gradient(135deg, #0a1628, #0d2137);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
  --gradient-accent: linear-gradient(135deg, #f59e0b, #f97316);

  /* Background Colors */
  --bg: #FFFFFF;
  --bg-light: #f8fafe;
  --bg-gray: #f0f4f8;

  /* Text Colors */
  --text: #1a1a2e;
  --text-light: #555555;
  --text-muted: #8896a6;
  --white: #FFFFFF;
  --black: #1a1a2e;

  /* Semantic Colors */
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --star: #f59e0b;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-blur: blur(16px);
  --glass-bg-dark: rgba(15, 23, 42, 0.75);
  --glass-border-dark: rgba(255, 255, 255, 0.08);

  /* Shadows — Multi-layer for depth */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --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.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-primary: 0 4px 14px rgba(0,119,182,0.25);
  --shadow-primary-lg: 0 8px 25px rgba(0,119,182,0.3);

  /* Border Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 32px;
  --radius-full: 50%;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.5s cubic-bezier(0.4,0,0.2,1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index System */
  --z-navbar: 1000;
  --z-modal: 1100;
  --z-toast: 1200;
}

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

html {
  scroll-behavior:smooth;
  font-size:16px
}

body {
  font-family:'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.7;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Page load animation */
  animation: pageLoad 0.6s ease-out;
}

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

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

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

ul,ol {
  list-style:none
}

button,input,select,textarea {
  font-family:inherit;
  font-size:inherit;
  border:none;
  outline:none
}

button {
  cursor:pointer
}

/* ===== LAYOUT ===== */

.container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .container {
    padding: 0 80px;
  }
}

/* ===== TYPOGRAPHY ===== */

h1 {
  font-size:3rem;
  font-weight:800;
  line-height:1.15;
  letter-spacing: -0.025em;
}

h2 {
  font-size:2.2rem;
  font-weight:700;
  line-height:1.25;
  letter-spacing: -0.02em;
}

h3 {
  font-size:1.5rem;
  font-weight:600;
  line-height:1.35
}

h4 {
  font-size:1.2rem;
  font-weight:600
}

p {
  font-size:1rem;
  color:var(--text-light)
}

/* ===== SECTION TITLE ===== */

.section-title {
  text-align:center;
  margin-bottom:50px
}

.section-title h2 {
  color:var(--text);
  margin-bottom:12px;
  position:relative;
  display:inline-block
}

.section-title h2::after {
  content:'';
  position:absolute;
  bottom:-10px;
  left:50%;
  transform:translateX(-50%);
  width:50px;
  height:4px;
  background:var(--gradient-primary);
  border-radius:2px
}

.section-title p {
  font-size:1.05rem;
  color:var(--text-muted);
  margin-top:20px;
  max-width:600px;
  margin-left:auto;
  margin-right:auto
}

/* ===== UTILITY CLASSES ===== */

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

/* Skeleton Loading Animation */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* ===== BUTTONS ===== */

.btn {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 28px;
  border-radius:var(--radius-sm);
  font-weight:600;
  font-size:.93rem;
  transition:var(--transition);
  border:2px solid transparent;
  position:relative;
  overflow:hidden;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.btn::before {
  content:'';
  position:absolute;
  top:0;
  left:-100%;
  width:100%;
  height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);
  transition:left .5s
}

.btn:hover::before {
  left:100%
}

.btn-primary {
  background:var(--gradient-primary);
  color:var(--white);
  box-shadow:var(--shadow-primary);
}

.btn-primary:hover {
  transform:translateY(-2px);
  box-shadow:var(--shadow-primary-lg);
}

.btn-secondary {
  background:transparent;
  color:var(--white);
  border-color:rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background:var(--white);
  color:var(--primary);
  border-color: var(--white);
  transform:translateY(-2px)
}

.btn-outline {
  background:transparent;
  color:var(--primary);
  border-color:rgba(0,119,182,0.3);
}

.btn-outline:hover {
  background:var(--primary);
  color:var(--white);
  border-color: var(--primary);
  transform:translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.btn-sm {
  padding:8px 18px;
  font-size:.85rem;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-danger {
  background:var(--danger);
  color:var(--white)
}

.btn-danger:hover {
  background:#dc2626;
  transform:translateY(-2px)
}

.btn-success {
  background:var(--success);
  color:var(--white)
}

/* ===== NAVBAR ===== */

.navbar {
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:var(--z-navbar);
  padding:18px 0;
  transition:var(--transition)
}

.navbar.scrolled {
  background:rgba(255,255,255,0.85);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
  padding:10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.navbar .container {
  display:flex;
  align-items:center;
  justify-content:space-between
}

.navbar-brand {
  display:flex;
  align-items:center;
  gap:10px
}

.navbar-brand .logo-icon {
  width:40px;
  height:40px;
  background:var(--gradient-primary);
  border-radius:var(--radius-sm);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.2rem;
  color:white
}

.navbar-brand span {
  font-weight:800;
  font-size:1.3rem;
  letter-spacing:0.5px;
  background:linear-gradient(135deg,#ffffff,#90E0EF,#ffffff);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  background-size:200% auto;
  transition:var(--transition);
  position:relative;
  text-transform:capitalize;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.3));
  animation:brand3d 8s ease-in-out infinite;
  perspective:500px;
  display:inline-block
}

@keyframes brand3d {
  0%,25% { transform:rotateY(0deg) }
  50% { transform:rotateY(360deg) }
  50.1%,100% { transform:rotateY(360deg) }
}

.navbar-brand:hover span {
  animation-play-state:paused
}

.navbar.scrolled .navbar-brand span {
  background:linear-gradient(135deg,var(--primary),var(--primary-light),#00b4d8);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  background-size:200% auto
}

.navbar-menu {
  display:flex;
  align-items:center;
  gap:32px
}

.navbar-menu a {
  font-weight:500;
  font-size:.93rem;
  color:rgba(255,255,255,.9);
  position:relative;
  padding:6px 0;
  letter-spacing: 0.01em;
}

.navbar.scrolled .navbar-menu a {
  color:var(--text)
}

.navbar-menu a::after {
  content:'';
  position:absolute;
  bottom:-2px;
  left:0;
  width:0;
  height:2px;
  background:var(--secondary);
  transition:var(--transition);
  border-radius: 1px;
}

.navbar.scrolled .navbar-menu a::after {
  background:var(--primary)
}

.navbar-menu a:hover::after,.navbar-menu a.active::after {
  width:100%
}

.navbar-menu a:hover {
  color:var(--white)
}

.navbar.scrolled .navbar-menu a:hover {
  color:var(--primary)
}

.navbar-actions {
  display:flex;
  align-items:center;
  gap:12px
}

.navbar-actions .btn {
  padding:8px 20px;
  font-size:.88rem
}

.navbar.scrolled .btn-secondary {
  color:var(--primary);
  border-color:rgba(0,119,182,0.3)
}

.navbar.scrolled .btn-secondary:hover {
  background:var(--primary);
  color:var(--white);
  border-color: var(--primary);
}

.hamburger {
  display:none;
  flex-direction:column;
  gap:5px;
  cursor:pointer;
  z-index:1001
}

.hamburger span {
  width:28px;
  height:3px;
  background:var(--white);
  border-radius:2px;
  transition:var(--transition)
}

.navbar.scrolled .hamburger span {
  background:var(--text)
}

/* Post-login user greeting */
.nav-user-greeting {
  font-size: 0.88rem;
  color: var(--white);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.navbar.scrolled .nav-user-greeting {
  color: var(--text);
}

/* ===== BACK TO TOP BUTTON ===== */

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: var(--transition);
  z-index: 999;
  border: none;
  box-shadow: var(--shadow-primary);
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-primary-lg);
}

/* ===== RESPONSIVE ===== */

@media(max-width:1024px) {
  h1 { font-size:2.2rem }
  h2 { font-size:1.8rem }
  .container { padding:0 16px }
}

@media(max-width:768px) {
  h1 { font-size:1.8rem }
  h2 { font-size:1.5rem }
  h3 { font-size:1.2rem }

  .navbar-menu {
    position:fixed;
    top:0;
    right:-100%;
    width:300px;
    height:100vh;
    background:linear-gradient(180deg, #003d5c, #0077B6 60%, #00b4d8);
    flex-direction:column;
    padding:80px 32px 32px;
    gap:8px;
    transition:var(--transition);
    z-index:1000;
    box-shadow:-8px 0 32px rgba(0,0,0,.25);
    overflow-y:auto
  }

  .navbar-menu.active { right:0 }

  .navbar-menu a {
    color:rgba(255,255,255,.9)!important;
    font-size:1.05rem;
    padding:12px 0;
    border-bottom:1px solid rgba(255,255,255,.08)
  }

  .navbar-actions { display:none!important }

  .mobile-auth-buttons {
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:auto;
    padding-top:28px;
    border-top:1px solid rgba(255,255,255,.12)
  }

  .mobile-auth-buttons .btn {
    width:100%;
    justify-content:center;
    text-align:center;
    padding:12px 20px
  }

  .mobile-auth-buttons .btn-secondary {
    color:var(--white);
    border-color:rgba(255,255,255,.4)
  }

  .hamburger { display:flex }

  .hamburger.active span:nth-child(1) {
    transform:rotate(45deg) translate(5px,5px)
  }
  .hamburger.active span:nth-child(2) { opacity:0 }
  .hamburger.active span:nth-child(3) {
    transform:rotate(-45deg) translate(7px,-6px)
  }

  .btn { padding:10px 22px; font-size:.9rem }
  .btn-sm { padding:7px 14px; font-size:.8rem }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

@media(max-width:480px) {
  h1 { font-size:1.5rem }
  h2 { font-size:1.3rem }
  .container { padding:0 12px }
}

/* ============================================
   GLOBAL DARK MODE & THEME TOGGLE
   ============================================ */

/* Theme Toggle Button */
#themeToggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #fff;
  transition: transform 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
#themeToggle:hover {
  transform: scale(1.15);
}
.navbar.scrolled #themeToggle {
  color: var(--text);
}
html.dark .navbar.scrolled #themeToggle {
  color: #f1f5f9;
}

/* Global Dark Mode Variables & Backgrounds */
html.dark body { background-color: #040b16; color: #e6f2ff; }
html.dark {
  --bg: #040b16;
  --bg-light: #081a33;
  --bg-gray: #040b16;
  --text: #e6f2ff;
  --text-light: #a6cbe8;
  --text-muted: #6f9fcc;
  --glass-bg: rgba(8, 26, 51, 0.75);
  --glass-border: rgba(255,255,255, 0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.25);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3);
}

html.dark section, html.dark .detail-section { background-color: #040b16 !important; color: #e6f2ff; }
html.dark .page-header { background: linear-gradient(135deg, #020617, #040b16, #081a33) !important; color: #e6f2ff; border-bottom: 1px solid #133052; }
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5 { color: #ffffff !important; }

/* Destinations Card */
html.dark .dest-card { background-color: #081a33; border: 1px solid #133052; }
html.dark .dest-card-body p { color: #a6cbe8 !important; }
html.dark .dest-card-location { color: #6f9fcc; }
html.dark .dest-card-footer { border-top-color: #133052; }

/* Detail Page Components */
html.dark .info-card, html.dark .comment-form, html.dark .comment-item,
html.dark .review-form-box, html.dark .review-item, html.dark .review-login-prompt {
  background-color: #081a33; border: 1px solid #133052; box-shadow: none; color: #e6f2ff;
}
html.dark .comment-form textarea, html.dark #reviewSection textarea {
  background-color: #040b16; color: #e6f2ff; border-color: #133052;
}
html.dark .info-item { border-bottom-color: #133052; }
html.dark .facility-item { background-color: #040b16; color: #a6cbe8; }

/* Navbar */
html.dark .navbar.scrolled { background: rgba(4, 11, 22, 0.92) !important; border-bottom: 1px solid #133052; }
html.dark .navbar.scrolled .navbar-menu a { color: #a6cbe8 !important; }
html.dark .navbar.scrolled .navbar-brand span { filter: drop-shadow(0 0 8px rgba(144, 224, 239, 0.4)); }
html.dark #navbar.scrolled #navActions .nav-user-greeting,
html.dark #navbar.scrolled #navActions .nav-user-greeting strong,
html.dark .navbar.scrolled .nav-user-greeting,
html.dark .navbar.scrolled .nav-user-greeting strong {
    color: #e6f2ff !important;
}

/* Map Page */
html.dark .map-sidebar { background-color: #081a33; border-right-color: #133052; }
html.dark .sidebar-header { border-bottom-color: #133052; }
html.dark .sidebar-search input { background-color: #040b16; color: #e6f2ff; border-color: #133052; }
html.dark .beach-list-item { border-bottom-color: #133052; }
html.dark .beach-list-item:hover { background-color: #133052; }
html.dark .beach-list-item h4 { color: #e6f2ff; }
html.dark .route-info-panel { background-color: #081a33; color: #e6f2ff; border: 1px solid #133052; }
html.dark .route-info-divider { background-color: #133052; }

/* Skeleton dark mode */
html.dark .skeleton {
  background: linear-gradient(90deg, #0a1a2f 25%, #112240 50%, #0a1a2f 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

/* Back to top dark mode */
html.dark .back-to-top {
  box-shadow: 0 4px 14px rgba(0,180,216,0.3);
}
