/* ==========================================================================
   KASAM ANUGRAH SEJAHTERA DESIGN SYSTEM (MARKETOOPIL TEAM)
   COLOR: Vibrant KAS Blue #104187 (Matching Original React App 100%)
   ========================================================================== */

:root {
  --primary: #104187;
  --primary-hover: #1555ab;
  --primary-foreground: #ffffff;
  
  --sky: #2a8adf;
  --sky-soft: #bae6fd;
  --teal: #21adad;
  --amber: #f59e0b;
  
  --ink: #0f172a;
  --foreground: #0f172a;
  --background: #ffffff;
  --mist: #f8fafc;
  
  --secondary: #eef4fc;
  --secondary-foreground: #104187;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;

  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-glass: 0 24px 60px -28px rgba(16, 65, 135, 0.35);
  --shadow-lift: 0 30px 70px -40px rgba(16, 65, 135, 0.5);
}

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

html {
  scroll-behavior: smooth;
  background-color: #ffffff !important;
}

body, #page, .site, .elementor {
  margin: 0;
  padding: 0;
  background-color: #ffffff !important;
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Force-hide Elementor Page Transition peach overlay */
.e-page-transition,
.e-page-transition-animation {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ==========================================================================
   GLASSMORPHISM & ANIMATION UTILITIES
   ========================================================================== */

.glass {
  background: rgba(255, 255, 255, 0.62) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(22px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
  box-shadow: var(--shadow-glass) !important;
}

.glass-dark {
  background: rgba(16, 65, 135, 0.42) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
}

.glass-morph {
  position: relative;
  isolation: isolate;
  border-radius: 1.75rem;
  transition: border-radius 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 500ms ease;
}

.glass-morph:hover {
  border-radius: 2.75rem 1.25rem 2.75rem 1.25rem;
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

/* Ambient Animated Blobs */
.kasam-blob {
  position: absolute;
  border-radius: 50% !important;
  filter: blur(80px) !important;
  -webkit-filter: blur(80px) !important;
  opacity: 0.55 !important;
  animation: morph-drift 18s ease-in-out infinite alternate;
  pointer-events: none !important;
  z-index: 1;
}

@keyframes morph-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    border-radius: 48% 52% 60% 40% / 55% 45% 55% 45%;
  }
  50% {
    transform: translate3d(4%, -5%, 0) scale(1.12);
    border-radius: 62% 38% 42% 58% / 40% 60% 40% 60%;
  }
  100% {
    transform: translate3d(-3%, 4%, 0) scale(1.05);
    border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%;
  }
}

/* ==========================================================================
   HEADER & NAVBAR (MOBILE BRAND TEXT VISIBLE ALWAYS)
   ========================================================================== */

.kasam-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 12px 12px 0 12px;
  transition: all 0.3s ease;
}

@media (min-width: 640px) {
  .kasam-header {
    padding: 16px 20px 0 20px;
  }
}

.kasam-header-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 9999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.5s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
  .kasam-header-inner {
    padding: 10px 20px;
    gap: 16px;
  }
}

.kasam-header.scrolled .kasam-header-inner {
  background: rgba(255, 255, 255, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(22px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
  box-shadow: var(--shadow-glass) !important;
}

.kasam-brand-logo,
.kasam-brand-logo-custom,
.kasam-brand-logo-custom a,
.custom-logo-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}

@media (min-width: 640px) {
  .kasam-brand-logo,
  .kasam-brand-logo-custom,
  .kasam-brand-logo-custom a,
  .custom-logo-link {
    gap: 10px !important;
  }
}

.kasam-brand-logo img,
.kasam-brand-logo-custom img,
.custom-logo-link img,
img.custom-logo {
  height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
  display: inline-block !important;
}

@media (min-width: 640px) {
  .kasam-brand-logo img,
  .kasam-brand-logo-custom img,
  .custom-logo-link img,
  img.custom-logo {
    height: 36px !important;
    max-height: 36px !important;
    max-width: 220px !important;
  }
}

.kasam-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.kasam-brand-title {
  font-size: 11px;
  font-weight: 600;
  color: #104187 !important;
  display: block;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .kasam-brand-title {
    font-size: 13px;
  }
}

.kasam-brand-subtitle {
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  display: block;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .kasam-brand-subtitle {
    font-size: 10px;
    letter-spacing: 0.18em;
  }
}

/* Nav Menu */
.kasam-nav-desktop {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

@media (min-width: 768px) {
  .kasam-nav-desktop {
    display: flex;
  }
}

.kasam-nav-desktop ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kasam-nav-desktop li a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.75);
  transition: all 0.2s ease;
}

.kasam-nav-desktop li a:hover {
  background-color: var(--secondary);
  color: #104187 !important;
}

.kasam-nav-desktop li.current-menu-item a,
.kasam-nav-desktop li.current-menu-ancestor a,
.kasam-nav-desktop li.current_page_item a {
  background-color: #ffffff !important;
  color: #104187 !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(16, 65, 135, 0.15) !important;
}

/* Header Action Button */
.kasam-header-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 9999px;
  background-color: #104187 !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  margin-left: auto;
  text-decoration: none;
}

@media (min-width: 768px) {
  .kasam-header-btn {
    display: inline-flex;
    margin-left: 0;
  }
}

.kasam-header-btn:hover {
  background-color: #1555ab !important;
  box-shadow: var(--shadow-lift) !important;
}

/* Mobile Toggle Button */
.kasam-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #104187 !important;
  cursor: pointer;
  margin-left: auto;
}

@media (min-width: 640px) {
  .kasam-mobile-toggle {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 768px) {
  .kasam-mobile-toggle {
    display: none;
  }
}

/* Mobile Drawer */
.kasam-mobile-drawer {
  display: none;
  max-width: 80rem;
  margin: 8px auto 0;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow-glass);
}

.kasam-mobile-drawer.open {
  display: block;
  animation: fadeInDown 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

.kasam-mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.kasam-mobile-drawer li a {
  display: block;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.8);
  transition: all 0.2s ease;
}

.kasam-mobile-drawer li a:hover,
.kasam-mobile-drawer li.current-menu-item a {
  background-color: var(--secondary);
  color: #104187 !important;
}

.kasam-mobile-cta {
  display: block;
  margin-top: 4px;
  padding: 12px 16px;
  text-align: center;
  border-radius: 16px;
  background-color: #104187 !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 500;
}

/* ==========================================================================
   FOOTER (EXACT MATCH #104187 ROYAL BLUE WITH AMBIENT BLURRED BLOBS)
   ========================================================================== */

.kasam-footer {
  position: relative;
  overflow: hidden;
  background-color: #104187 !important;
  color: #ffffff !important;
  padding: 64px 20px 32px;
}

@media (min-width: 640px) {
  .kasam-footer {
    padding: 80px 32px 40px;
  }
}

.kasam-footer-container {
  max-width: 80rem;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.kasam-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 1024px) {
  .kasam-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.kasam-footer-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kasam-footer-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px;
}

.kasam-footer-logo-badge img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.kasam-footer-brand-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff !important;
}

.kasam-footer-desc {
  margin-top: 20px;
  max-width: 380px;
  font-size: 14px;
  line-height: 1.625;
  color: rgba(255, 255, 255, 0.85) !important;
}

.kasam-footer-contact-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9) !important;
}

.kasam-footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.kasam-footer-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #bae6fd !important;
}

.kasam-footer-contact-item a:hover {
  text-decoration: underline;
  color: #ffffff !important;
}

.kasam-footer-heading {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6) !important;
  margin-bottom: 20px;
  font-weight: 600;
}

.kasam-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kasam-footer-menu li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85) !important;
  transition: color 0.2s ease;
}

.kasam-footer-menu li a:hover {
  color: #ffffff !important;
}

.kasam-footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7) !important;
}

@media (min-width: 640px) {
  .kasam-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Ambient Blobs in Footer */
.kasam-footer .kasam-blob-1 {
  top: -30%;
  left: -10%;
  width: 420px;
  height: 420px;
  background: #2a8adf !important;
  border-radius: 50% !important;
  filter: blur(80px) !important;
  -webkit-filter: blur(80px) !important;
  opacity: 0.5 !important;
  pointer-events: none !important;
}

.kasam-footer .kasam-blob-2 {
  bottom: -40%;
  right: -8%;
  width: 380px;
  height: 380px;
  background: #21adad !important;
  border-radius: 50% !important;
  filter: blur(80px) !important;
  -webkit-filter: blur(80px) !important;
  opacity: 0.4 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   PAGE WRAPPERS & ELEMENTOR FULL WIDTH ZERO PADDING FIX
   ========================================================================== */

.kasam-page-wrapper {
  padding-top: 90px;
  min-height: 80vh;
}

.elementor-template-fullwidth,
.elementor-template-fullwidth.kasam-page-wrapper,
.elementor-template-fullwidth .kasam-page-wrapper {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.kasam-page-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 404 Page Styling */
.kasam-404-container {
  display: flex;
  min-height: 70vh;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.kasam-404-code {
  font-size: 80px;
  font-weight: 700;
  color: #104187 !important;
  line-height: 1;
}

.kasam-404-title {
  font-size: 24px;
  font-weight: 600;
  margin-top: 16px;
}

.kasam-404-btn {
  display: inline-flex;
  margin-top: 24px;
  padding: 12px 28px;
  border-radius: 9999px;
  background-color: #104187 !important;
  color: #ffffff !important;
  font-weight: 500;
  transition: all 0.2s ease;
}

.kasam-404-btn:hover {
  box-shadow: var(--shadow-glass) !important;
}
