/* ============================================
   KABAR RT PORTAL — SHARED STYLESHEET
   Unified design system for all pages
   ============================================ */

/* --- CSS VARIABLES (Design Tokens) --- */
:root {
  --primary: #004d40;
  --primary-dark: #00342b;
  --primary-light: #afefdd;
  --primary-fixed: #afefdd;
  --primary-fixed-dim: #94d3c1;
  --primary-container: #004d40;

  --secondary: #166969;
  --secondary-container: #a3edec;
  --on-secondary-container: #1d6d6d;

  --tertiary: #003428;
  --tertiary-container: #004d3c;
  --tertiary-fixed: #6dfad2;
  --tertiary-fixed-dim: #4bddb7;

  --surface: #f9f9ff;
  --surface-container: #eef3f2;
  --surface-container-low: #f0f3ff;
  --surface-container-high: #dee8ff;
  --surface-container-lowest: #ffffff;
  --surface-dim: #cfdaf2;

  --on-surface: #111c2d;
  --on-surface-variant: #3f4945;
  --on-primary: #ffffff;
  --on-primary-fixed: #00201a;

  --text-muted: #64748b;
  --border: #e2e8f0;
  --outline: #707975;
  --outline-variant: #bfc9c4;

  --error: #ef4444;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --success: #22c55e;
  --warning: #f59e0b;
  --whatsapp: #25d366;

  --font-main: 'Plus Jakarta Sans', sans-serif;
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--surface);
  color: var(--on-surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
}

::selection {
  background-color: var(--primary-light);
  color: var(--on-primary-fixed);
}

/* --- CONTAINER --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  margin: 0 auto;
}

/* --- MATERIAL ICONS --- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
}

/* ============================================
   NAVBAR — Shared across all pages
   ============================================ */
.site-header {
  background-color: #ffffff;
  padding: 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  background-color: var(--primary);
  padding: 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon .material-symbols-outlined {
  color: #ffffff;
  font-size: 22px;
  font-variation-settings: 'FILL' 1;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 6px;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-links a.active::after {
  width: 100%;
}

/* --- HAMBURGER MENU --- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--primary);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.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(5px, -5px);
}

/* ============================================
   SECTION UTILITIES
   ============================================ */
.section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 15px;
}

.section-header a {
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
}

.section-header a:hover {
  text-decoration: underline;
}

.section-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-line-bar {
  width: 48px;
  height: 4px;
  background-color: var(--primary);
  border-radius: 50px;
}

.section-line h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--on-surface);
}

/* ============================================
   CARD UTILITY
   ============================================ */
.card-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px -10px rgba(0, 52, 43, 0.15);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background-color: var(--primary-light);
  color: var(--on-primary-fixed);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-primary-solid {
  background-color: var(--primary);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn-primary-solid:active {
  transform: scale(0.97);
}

.btn-outline-white {
  background-color: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 10px;
  border: 2px solid #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background-color: transparent;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  color: var(--on-surface);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   WHATSAPP FAB
   ============================================ */
.fab-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  background-color: var(--whatsapp);
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  animation: fab-bounce 3s ease-in-out infinite;
}

.fab-whatsapp:hover {
  transform: scale(1.1);
}

.fab-whatsapp svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

@keyframes fab-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============================================
   FOOTER — Shared across all pages
   ============================================ */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding: 60px 0 50px;
}

.footer-brand span {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.footer-social a .material-symbols-outlined {
  font-size: 20px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--on-surface);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-newsletter p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

.footer-newsletter .input-group {
  display: flex;
  gap: 8px;
}

.footer-newsletter input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background-color: #f8fafc;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.footer-newsletter input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 77, 64, 0.12);
}

.footer-newsletter input::placeholder {
  color: #94a3b8;
}

.footer-newsletter button {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.footer-newsletter button:hover {
  background-color: #006b5a;
  transform: scale(1.02);
}

.footer-newsletter button .material-symbols-outlined {
  font-size: 22px;
}

.footer-bottom {
  border-top: 1px solid #eef2f6;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-status .dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

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

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background-color: var(--surface);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 77, 64, 0.12);
}

.form-input::placeholder {
  color: var(--outline);
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
  margin-bottom: 8px;
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    font-size: 20px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 0 30px;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 16px 0;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .container {
    padding: 0 20px;
  }
}

@media (max-width: 1100px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .footer-newsletter .input-group {
    flex-direction: column;
  }

  .footer-newsletter button {
    padding: 12px;
  }
}
