/* ==========================================================================
   UpMekan Global CSS & Design System
   ========================================================================== */

/* 1. Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* 2. Custom Properties (Tokens) */
:root {
  /* Color Palette */
  --primary-color: #2447D4;
  --primary-hover: #1732ad;
  --primary-light: #eef2ff;
  --primary-rgb: 36, 71, 212;
  
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-dark: #0f172a;
  --bg-card: #ffffff;
  
  --text-dark: #0f172a;       /* Charcoal slate-900 */
  --text-medium: #334155;     /* Slate-700 */
  --text-muted: #64748b;      /* Slate-500 */
  --text-light: #94a3b8;      /* Slate-400 */
  --text-white: #ffffff;
  
  --border-color: #e2e8f0;    /* Slate-200 */
  --border-focus: #cbd5e1;    /* Slate-300 */
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.04), 0 4px 12px -2px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 20px 40px -10px rgba(15, 23, 42, 0.06), 0 4px 16px -2px rgba(15, 23, 42, 0.02);
  --shadow-button: 0 4px 14px 0 rgba(36, 71, 212, 0.3);
  
  /* Spacing */
  --header-height: 80px;
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-medium);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

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

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

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

button {
  cursor: pointer;
}

/* 4. Layout & Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

.section-padding {
  padding: 100px 0;
}

.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--bg-white); }
.bg-dark { background-color: var(--bg-dark); }

.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.text-muted { color: var(--text-muted); }

.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }

/* 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition-normal);
  gap: 8px;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(36, 71, 212, 0.4);
}

.btn-outline {
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  background-color: transparent;
}

.btn-outline:hover {
  border-color: var(--text-dark);
  background-color: var(--text-dark);
  color: var(--bg-white);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-dark);
  font-weight: 500;
  padding: 10px 20px;
}

.btn-ghost:hover {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* Arrow Icon animation */
.btn svg {
  transition: transform var(--transition-fast);
}
.btn:hover svg {
  transform: translateX(4px);
}

/* 6. Sticky Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: all var(--transition-normal);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo svg {
  fill: var(--primary-color);
  width: 32px;
  height: 32px;
}

/* Nav Menu wrapper */
.header-container nav {
  height: 100%;
}

/* Nav Menu */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 28px;
  height: 100%;
  align-items: center;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-medium);
  font-size: 0.95rem;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.nav-link svg {
  transition: transform var(--transition-fast);
}
.nav-item:hover .nav-link svg {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 250px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 10;
  list-style: none;
}

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

.dropdown-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-medium);
  transition: all var(--transition-fast);
}

.dropdown-item a:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.dropdown-item a svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
}
.dropdown-item a:hover svg {
  stroke: var(--primary-color);
}

/* Mega Dropdown Menu Styles */
.dropdown-mega {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 540px; /* Two columns wide - slightly narrower and more compact */
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px; /* Reduced padding from 24px */
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 150;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px; /* Reduced vertical gap to 8px for closer items */
}

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

.dropdown-mega-item a {
  display: flex;
  align-items: center;
  gap: 12px; /* Reduced gap from 16px */
  padding: 8px 12px; /* Reduced padding from 12px 16px */
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500; /* Matching nav font weight (not bold) */
  font-family: var(--font-body);
  color: var(--text-medium); /* Matching header item color */
  transition: all var(--transition-fast);
  text-align: left;
}

.dropdown-mega-item a:hover {
  background-color: var(--bg-light); /* Soft background hover tint */
  color: var(--primary-color);
}

.dropdown-mega-icon {
  width: 36px; /* Reduced from 44px */
  height: 36px; /* Reduced from 44px */
  background-color: #eff6ff; /* Soft tint of our brand color #2447D4 */
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color); /* Icon in brand blue */
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.dropdown-mega-item a:hover .dropdown-mega-icon {
  background-color: var(--primary-color);
  color: white;
}

.dropdown-mega-icon svg {
  width: 16px; /* Reduced from 20px */
  height: 16px; /* Reduced from 20px */
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Pill Selector */
.lang-pill {
  position: relative;
  display: flex;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 3px;
  border-radius: var(--radius-pill);
  width: 80px;
  height: 34px;
}

.lang-btn {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.lang-btn.active {
  color: var(--primary-color);
}

.lang-pill::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 36px;
  height: 26px;
  background-color: var(--bg-white);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
  z-index: 1;
}

.lang-pill.en-selected::before {
  transform: translateX(36px);
}

/* Mobile Menu Buttons */
.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  padding: 4px;
}

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-card);
  z-index: 200;
  padding: 30px;
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.mobile-nav-close {
  font-size: 1.5rem;
  color: var(--text-dark);
}

.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu-links .nav-link {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Mobile Submenus (nested lists) */
.mobile-submenu {
  list-style: none;
  padding-left: 16px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 2px solid var(--border-color);
}

.mobile-submenu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.mobile-submenu a:hover {
  color: var(--primary-color);
}

.mobile-nav-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-actions .lang-pill {
  margin: 0 auto;
}

/* 7. Corporate Footer */
footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) 1.5fr;
  gap: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 60px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: var(--bg-white);
  margin-bottom: 20px;
}

.footer-brand .logo svg {
  fill: var(--bg-white);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-light);
}

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

.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.footer-column h4 {
  color: var(--text-white);
  font-size: 1rem;
  margin-bottom: 24px;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-light);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--bg-white);
}

.footer-newsletter h4 {
  color: var(--text-white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-newsletter p {
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.newsletter-form {
  display: flex;
  position: relative;
  width: 100%;
}

.newsletter-form input {
  width: 100%;
  padding: 12px 16px;
  padding-right: 50px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.newsletter-form input::placeholder {
  color: var(--text-light);
}

.newsletter-form input:focus {
  border-color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.08);
}

.newsletter-form button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background-color: var(--primary-color);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.newsletter-form button:hover {
  background-color: var(--primary-hover);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: var(--text-light);
}
.footer-bottom-links a:hover {
  color: var(--bg-white);
}

/* 8. Modal Overlay & Forms */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 480px;
  padding: 40px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-normal);
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.close-modal {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: var(--text-dark);
}

.modal-card h3 {
  margin-bottom: 8px;
  font-size: 1.75rem;
}

.modal-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-control {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-light);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: all var(--transition-fast);
  width: 100%;
}

.form-control:focus {
  border-color: var(--primary-color);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(36, 71, 212, 0.15);
}

.form-control::placeholder {
  color: var(--text-light);
}

/* 9. Responsive Adjustments */
@media (max-width: 1024px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 1.85rem; }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-brand {
    grid-column: span 2;
  }
  .footer-newsletter {
    grid-column: span 2;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  /* Navigation Hide */
  .nav-menu, .header-actions .btn {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .section-padding {
    padding: 60px 0;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-bottom-links {
    justify-content: center;
  }
  
  .modal-card {
    padding: 30px 20px;
  }
}
