/* ============================================================
   JOYJOBBY GLOBAL PREMIUM CINEMATIC STYLE SYSTEM
   Extracted from flagship Homepage design
   Applied everywhere for unified premium experience
   ============================================================ */

:root {
  --primary: #145E4A;
  --primary-light: #19735A;
  --primary-dark: #0E3F33;
  --accent: #19735A;
  --tint: #E9F4F1;
  --surface: #F7F9F8;
  --surface-warm: #F7F9F8;
  --text: #111314;
  --text-secondary: #3D4240;
  --text-muted: #5F6664;
  --white: #FFFFFF;
  --border: #E2E6EC;
  --border-light: #EEF1F5;
  --scheduled-green: #30E09C;
  --timeslot-slate: #5B6E8A;
  --dark-bg: #0a0a0a;
  --emerald: #145E4A;
}

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

html, body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--white);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  margin: 0;
  padding: 64px 0 0 0;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  body {
    padding: 60px 0 0 0;
  }
}

/* ============================================================
   GLOBAL ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes floatShape1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 40px); }
}

@keyframes floatShape2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -30px); }
}

@keyframes floatShape3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, -25px); }
}

/* Scroll-reveal base */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   TYPOGRAPHY & SPACING UTILITIES
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin-bottom: 16px; }

/* Light sections */
.light, [data-theme="light"] {
  background-color: var(--white);
  color: var(--text);
}

.light h1, .light h2, .light h3, .light h4, .light h5, .light h6 {
  color: var(--text);
}

.light p {
  color: var(--text-muted);
}

/* Dark sections */
.dark, [data-theme="dark"] {
  background-color: var(--dark-bg);
  color: var(--white);
}

.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: var(--white);
}

.dark p {
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   SECTION COMPONENTS
   ============================================================ */

section {
  padding: 100px 24px;
  position: relative;
  overflow: hidden;
}

section.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 140px;
  background: var(--dark-bg);
  margin-top: -64px;
  padding-top: calc(120px + 64px);
}

@media (max-width: 768px) {
  section.hero {
    margin-top: -60px;
    padding-top: calc(100px + 60px);
  }
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(17, 19, 20, 0.5);
  margin-bottom: 16px;
}

.dark .section-label {
  color: rgba(255, 255, 255, 0.5);
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.dark .section-header h2 {
  color: var(--white);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

.dark .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   CARD COMPONENT
   ============================================================ */

.card, [role="card"], .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
  padding: 24px;
  color: var(--text);
}

.card:hover, [role="card"]:hover {
  background: var(--white);
  border-color: rgba(20, 94, 74, 0.3);
  box-shadow: 0 8px 32px rgba(20, 94, 74, 0.1);
}

.dark .card, .dark [role="card"] {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
  backdrop-filter: blur(10px);
}

.dark .card:hover, .dark [role="card"]:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(20, 94, 74, 0.08);
}

/* ============================================================
   BUTTON SYSTEM
   Excludes navbar buttons, page-specific buttons which have their own styles
   ============================================================ */

button:not(#navbar-placeholder button):not(.mobile-menu-btn):not(.language-toggle):not(.nav-link):not(.toggle-btn):not(.season-btn):not(.sort-btn):not(.filter-btn):not(.cta-btn):not(.hero-btn):not(.cat-sort-btn):not(.form-container button):not(.form-container *):not(.leaflet-control button):not(.leaflet-bar button), 
.btn:not(.form-container .btn), a.button:not(.form-container a.button), [role="button"]:not(#navbar-placeholder *):not(.form-container *) {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(20, 94, 74, 0.3);
}

button:not(#navbar-placeholder button):not(.mobile-menu-btn):not(.language-toggle):not(.nav-link):not(.toggle-btn):not(.season-btn):not(.sort-btn):not(.filter-btn):not(.cta-btn):not(.hero-btn):not(.cat-sort-btn):not(.form-container button):not(.form-container *):hover, 
.btn:not(.form-container .btn):hover, a.button:not(.form-container a.button):hover, [role="button"]:not(#navbar-placeholder *):not(.form-container *):hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 24px rgba(20, 94, 74, 0.4);
  transform: translateY(-2px);
}

button:not(#navbar-placeholder button):not(.mobile-menu-btn):not(.form-container button):not(.form-container *):active, .btn:not(.form-container .btn):active {
  transform: translateY(0);
}

button.secondary:not(.form-container *), .btn-secondary:not(.form-container *) {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}

button.secondary:hover, .btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(20, 94, 74, 0.3);
}

.dark button.secondary, .dark .btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.dark button.secondary:hover, .dark .btn-secondary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ============================================================
   FORM ELEMENTS
   Scoped selectors to avoid overriding page-specific forms
   ============================================================ */

/* Default input styling - light background, dark text */
input:not(#navbar-placeholder input):not(.form-container input):not(.form-container *), 
textarea:not(#navbar-placeholder textarea):not(.form-container textarea):not(.form-container *), 
select:not(#navbar-placeholder select):not(.form-container select):not(.form-container *) {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

input:not(#navbar-placeholder input):not(.form-container input):not(.form-container *)::placeholder {
  color: #9ca3af;
}

input:not(#navbar-placeholder input):not(.form-container input):not(.form-container *):focus, 
textarea:not(#navbar-placeholder textarea):not(.form-container textarea):not(.form-container *):focus, 
select:not(#navbar-placeholder select):not(.form-container select):not(.form-container *):focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 94, 74, 0.1);
}

/* Dark section input styling */
.dark input:not(.search-input), 
.dark textarea:not(.search-input), 
.dark select:not(.search-input), 
.hero input,
.how-it-works input,
.stats-section input,
.cta-section input,
[data-theme=\"dark\"] input:not(.search-input),
[data-theme=\"dark\"] textarea:not(.search-input),
[data-theme=\"dark\"] select:not(.search-input) {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.dark input:not(.search-input)::placeholder, 
.dark textarea::placeholder,
.hero input::placeholder,
.how-it-works input::placeholder,
.stats-section input::placeholder,
.cta-section input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.dark input:not(.search-input):focus, 
.dark textarea:focus, 
.dark select:focus,
.hero input:focus,
.how-it-works input:focus,
.stats-section input:focus,
.cta-section input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(20, 94, 74, 0.5);
  box-shadow: 0 0 0 3px rgba(20, 94, 74, 0.15);
}

.light input, .light textarea, .light select {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.light input:focus, .light textarea:focus, .light select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 94, 74, 0.08);
}

/* ============================================================
   TABLE STYLING
   ============================================================ */

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
}

th {
  background: rgba(20, 94, 74, 0.2);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: rgba(76, 208, 132, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.light table {
  background: var(--surface);
}

.light th {
  background: rgba(20, 94, 74, 0.08);
  color: var(--primary);
  border-bottom-color: var(--border);
}

.light td {
  border-bottom-color: var(--border-light);
  color: var(--text);
}

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

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

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #4CD084, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

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

@media (max-width: 768px) {
  section {
    padding: 80px 20px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.1rem; }

  button, .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

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

  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  section {
    padding: 60px 16px;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1rem; }

  button, .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
    width: 100%;
  }

  .section-header {
    margin-bottom: 40px;
  }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01s !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--dark-bg);
    color: var(--white);
  }
}

/* ============================================================
   DARK MODE SECTIONS
   ============================================================ */

section.dark, section[data-theme="dark"],
section.hero,
section.how-it-works,
section.stats-section,
section.cta-section {
  background: var(--dark-bg);
  color: var(--white);
}

section.dark .card, section[data-theme="dark"] .card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.dark a {
  color: rgba(76, 208, 132, 1);
}

.dark a:hover {
  color: rgba(102, 230, 150, 1);
}

/* Lists */
ul, ol {
  margin-left: 24px;
}

li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* Code blocks */
code, pre {
  background: rgba(20, 94, 74, 0.1);
  border: 1px solid rgba(20, 94, 74, 0.2);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: rgba(76, 208, 132, 1);
}

pre {
  padding: 16px;
  overflow-x: auto;
}

/* Badges */
.badge, .chip, .tag {
  display: inline-block;
  background: rgba(20, 94, 74, 0.2);
  color: rgba(76, 208, 132, 1);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.light .badge, .light .chip, .light .tag {
  background: rgba(20, 94, 74, 0.08);
  color: var(--primary);
}

/* Icons */
i[class*="fas"], i[class*="fab"] {
  transition: all 0.25s ease;
}
