/* ============================================
   Khmer Investment Capital Bank - Main Styles
   Color scheme: Dark Blue (#0B2B4A) | Orange (#E86A1F)
   ============================================ */

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

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  color: #0a2540;
  scroll-behavior: smooth;
  line-height: 1.5;
}

/* Color Variables */
:root {
  --dark-blue: #0B2B4A;
  --deep-blue: #07213a;
  --bright-orange: #E86A1F;
  --light-orange: #f47d38;
  --gray-light: #f1f5f9;
  --gray-border: #e2e8f0;
  --text-dark: #1e293b;
  --text-muted: #475569;
  --white: #ffffff;
}

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

/* Utility Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
  border-left: 3px solid var(--bright-orange);
  padding-left: 1rem;
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
  background-color: var(--dark-blue);
  color: white;
  font-size: 0.85rem;
  padding: 0.7rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-email a {
  color: var(--bright-orange);
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: 0.2s;
}

.contact-email a:hover {
  text-decoration: underline;
  color: #ff8c4a;
}

.top-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.top-links a {
  color: #e2e8f0;
  transition: color 0.2s;
  font-weight: 500;
  font-size: 0.85rem;
}

.top-links a:hover {
  color: var(--bright-orange);
}

/* ============================================
   Main Header (Desktop)
   ============================================ */
.main-header {
  background-color: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark-blue);
  letter-spacing: -0.5px;
}

.logo-text {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.4;
  color: #333;
  /* Recommended Khmer font fallback stack */
  font-family: "Hanuman", "Noto Sans Khmer", "Khmer OS", sans-serif;
}

.logo span {
  color: var(--bright-orange);
}

/* Desktop Navigation */
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-weight: 500;
}

.nav-item {
  position: relative;
  padding: 8px 0;
  cursor: pointer;
  color: var(--text-dark);
  transition: color 0.2s;
  font-size: 0.95rem;
}

.nav-item:hover {
  color: var(--bright-orange);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 40px;
  left: -20px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  z-index: 10;
  padding: 0.6rem 0;
  border-top: 3px solid var(--bright-orange);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: 0.1s;
}

.dropdown-menu a:hover {
  background: #fef3e8;
  color: var(--bright-orange);
  padding-left: 24px;
}

.simple-link a {
  transition: color 0.2s;
}

.simple-link a:hover {
  color: var(--bright-orange);
}

.sign-on-btn {
  background: var(--bright-orange);
  color: white;
  padding: 8px 22px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: 0.2s;
  display: inline-block;
  border: none;
}

.sign-on-btn:hover {
  background: #d45c12;
  transform: scale(0.97);
}

/* ============================================
   Hamburger Menu (Mobile)
   ============================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 200;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark-blue);
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 350px;
  height: 100vh;
  background: var(--white);
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 150;
  padding: 5rem 1.5rem 2rem;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

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

.mobile-menu a,
.mobile-dropdown-header {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-border);
  display: block;
}

.mobile-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bright-orange);
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.mobile-dropdown-items {
  padding-left: 1rem;
  display: none;
}

.mobile-dropdown-items.show {
  display: block;
}

.mobile-dropdown-items a {
  font-size: 0.9rem;
  padding: 0.6rem 0;
  border-bottom: none;
  color: var(--text-muted);
}

.mobile-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mobile-signon {
  margin-top: 0.5rem;
  background: var(--bright-orange);
  text-align: center;
  border-radius: 40px;
  color: white;
  padding: 12px;
  font-weight: 600;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 140;
  display: none;
}

.overlay.active {
  display: block;
}

body.menu-open {
  overflow: hidden;
}

/* ============================================
   Hero Slider
   ============================================ */
.hero-slider {
  position: relative;
  width: 100%;
  height: min(520px, 65vh);
  overflow: hidden;
  background: var(--dark-blue);
}

.slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.slide-content {
  max-width: 550px;
  margin-left: 6%;
  margin-right: 2rem;
  background: rgba(11, 43, 74, 0.75);
  backdrop-filter: blur(5px);
  padding: 1.8rem 2rem;
  border-radius: 24px;
  color: white;
  border-left: 6px solid var(--bright-orange);
}

.slide-content h2 {
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.slide-content p {
  font-size: clamp(0.85rem, 3vw, 1rem);
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.slide-btn {
  background: var(--bright-orange);
  border: none;
  padding: 10px 28px;
  font-weight: 600;
  border-radius: 40px;
  color: white;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.9rem;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 5;
}

.dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
}

.dot.active-dot {
  background: var(--bright-orange);
  width: 28px;
  border-radius: 20px;
}

/* ============================================
   Quick Links Bar
   ============================================ */
.quick-links-bar {
  background: white;
  border-bottom: 1px solid var(--gray-border);
}

.quick-links-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
}

.quick-link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem 1rem;
  border-radius: 48px;
  transition: all 0.2s ease;
  min-width: 90px;
}

.quick-link-item:hover {
  background: #fff3ea;
  transform: translateY(-3px);
}

.quick-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.quick-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dark-blue);
}

/* ============================================
   Product Cards
   ============================================ */
.product-showcase {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0.5rem;
}

.product-card-row {
  background: white;
  border-radius: 32px;
  margin-bottom: 2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  border: 1px solid var(--gray-border);
}

.product-card-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.1);
}

.product-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.product-info {
  flex: 1.2;
  padding: 2rem 2rem;
  background: white;
}

.product-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  min-height: 260px;
  border-radius: 0 32px 32px 0;
}

/* Flipped card (image left, text right) */
.product-card-row.flipped .product-flex {
  flex-direction: row-reverse;
}

.product-card-row.flipped .product-image {
  border-radius: 32px 0 0 32px;
}

.product-info h3 {
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.75rem;
}

.badge-rate {
  display: inline-block;
  background: #fee9df;
  color: var(--bright-orange);
  font-weight: 700;
  padding: 0.2rem 1rem;
  border-radius: 40px;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.product-description {
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.feature-list-modern {
  list-style: none;
  margin: 1rem 0 1.2rem;
}

.feature-list-modern li {
  padding: 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.feature-list-modern li::before {
  content: "✓";
  background: var(--bright-orange);
  color: white;
  font-weight: bold;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-size: 12px;
}

.learn-more-link {
  color: var(--bright-orange);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid transparent;
  transition: 0.2s;
}

.learn-more-link:hover {
  border-bottom-color: var(--bright-orange);
}

/* ============================================
   Interest Rate Table
   ============================================ */
.rate-table {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  min-width: 600px;
}

th,
td {
  padding: 12px 10px;
  font-size: 0.8rem;
}

th {
  background-color: var(--dark-blue);
  color: white;
  font-weight: 600;
}

td {
  border-bottom: 1px solid var(--gray-border);
}

tr:hover {
  background-color: #fef5ed;
}

/* ============================================
   News Section
   ============================================ */
.news-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.news-card {
  background: white;
  border-radius: 24px;
  padding: 1.5rem;
  flex: 1 1 280px;
  border-left: 4px solid var(--bright-orange);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.news-card h3 {
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
  background: var(--deep-blue);
  color: #d1dcec;
  padding: 2rem 1.5rem 1rem;
  margin-top: 2rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 12px;
}

.footer-col p,
.footer-col a {
  color: #cbd5e6;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-col a:hover {
  color: var(--bright-orange);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #1e3a5f;
  font-size: 0.7rem;
}

/* ============================================
   Responsive Breakpoints
   ============================================ */
@media (max-width: 860px) {
  .product-flex,
  .product-card-row.flipped .product-flex {
    flex-direction: column !important;
  }

  .product-image {
    border-radius: 0 0 32px 32px !important;
    min-height: 220px;
  }

  .product-info {
    padding: 1.5rem;
  }
}

@media (max-width: 780px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .top-bar {
    flex-direction: column;
    text-align: center;
  }

  .slide-content {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1.2rem;
  }

  .quick-links-container {
    gap: 0.8rem;
  }

  .container {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .quick-link-item {
    min-width: 70px;
  }

  .quick-icon {
    font-size: 1.4rem;
  }

  .quick-label {
    font-size: 0.75rem;
  }
}