/**
 * SHB iThanks - Common (Design System)
 * Theo bảng component Figma: node 44-26
 * https://www.figma.com/design/3p4m70cBc5gd6TaNaRSUtN/SHBiThanks--Copy-?node-id=44-26
 *
 * Gồm: Color palettes, Typography, Buttons, Form, Cards, Spacing, Wrapper base, Splide Carousel common.
 */

/* Font chung: Inter (Google Fonts) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ==========================================================================
   FONTS – Danh Da Bold
   ========================================================================== */
@font-face {
  font-family: "Danh Da";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/DanhDa-Bold.eot");
  src: url("../fonts/DanhDa-Bold.eot?#iefix") format("embedded-opentype"),
    url("../fonts/DanhDa-Bold.woff2") format("woff2"),
    url("../fonts/DanhDa-Bold.woff") format("woff"),
    url("../fonts/DanhDa-Bold.otf") format("opentype");
}

/* ==========================================================================
   COLOR PALETTES (Figma component board node 44-26)
   Blue/SE: primary corporate | Orange/PR: accent
   ========================================================================== */
:root {
  /* Figma Blue/SE scale (node 44-26) */
  --ithanks-se-100: #162b75;
  --ithanks-se-70: #5c6b9e;
  --ithanks-se-40: #a2aac8;
  --ithanks-se-17: #d7dbe8;
  --ithanks-se-11: #e5e8f0;
  --ithanks-se-5: #f3f4f8;

  /* Figma Orange/PR scale (node 44-26) */
  --ithanks-pr-100: #f47920;
  --ithanks-pr-70: #f7a163;
  --ithanks-pr-40: #fbc9a6;
  --ithanks-pr-17: #fed7aa;
  --ithanks-pr-11: #fef0e6;
  --ithanks-pr-5: #fef8f4;

  /* Figma White & Text color */
  --ithanks-white: #ffffff;
  --ithanks-text-figma: #2b2b2b;

  /* Blue scale – navy to light grey-blue (legacy, maps to SE where useful) */
  --ithanks-blue-900: #0d1b2a;
  --ithanks-blue-800: #1b263b;
  --ithanks-blue-700: #415a77;
  --ithanks-blue-600: #778da9;
  --ithanks-blue-500: #9ca3af;
  --ithanks-blue-200: #e2e8f0;
  --ithanks-blue-100: #f1f5f9;
  --ithanks-blue-50: #f8fafc;

  /* Orange scale – vibrant to light peach (legacy, PR-100/70 used for CTA) */
  --ithanks-orange-600: var(--ithanks-pr-100);
  --ithanks-orange-500: var(--ithanks-pr-70);
  --ithanks-orange-400: var(--ithanks-pr-40);
  --ithanks-orange-300: var(--ithanks-pr-17);
  --ithanks-orange-200: var(--ithanks-pr-11);
  --ithanks-orange-100: var(--ithanks-pr-5);
  --ithanks-orange-50: #fff7ed;
  --ithanks-orange-peach: #fefae0;

  /* Semantic (alias) */
  --ithanks-primary: #0d1b2a;
  --ithanks-blue: var(--ithanks-blue-900);
  --ithanks-blue-dark: #06101a;
  --ithanks-blue-footer: var(--ithanks-blue-900);
  --ithanks-orange: var(--ithanks-orange-500);
  --ithanks-orange-light: var(--ithanks-orange-400);
  --ithanks-orange-accent: var(--ithanks-orange-200);
  --ithanks-yellow: var(--ithanks-orange-200);

  /* Neutral & UI */
  --ithanks-text: var(--ithanks-se-100);
  --ithanks-text-secondary: #475569;
  --ithanks-text-muted: #64748b;
  --ithanks-placeholder: #94a3b8;
  --ithanks-border: #e2e8f0;
  --ithanks-border-light: #f1f5f9;
  --ithanks-bg: var(--ithanks-white);
  --ithanks-bg-subtle: #f8fafc;
  --ithanks-bg-card: #f8fafc;

  /* Link */
  --ithanks-link: var(--ithanks-blue-900);
  --ithanks-link-hover: var(--ithanks-blue-700);
  --ithanks-link-inverse: #ffffff;
  --ithanks-link-inverse-hover: rgba(255, 255, 255, 0.9);

  /* Status */
  --ithanks-success: #f47920;
  --ithanks-success-dot: #f47920;

  /* Layout */
  --ithanks-container-max: 1140px;
  --ithanks-header-height: 64px;
  --ithanks-radius: 8px;
  --ithanks-radius-sm: 6px;
  --ithanks-radius-lg: 12px;
  --ithanks-radius-full: 9999px;

  /* Font – base (body), Danh Da (Bold) cho tiêu đề đặc biệt */
  --ithanks-font-base: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --ithanks-font-danhda: "Danh Da", -apple-system, BlinkMacSystemFont,
    sans-serif;
}

/* ==========================================================================
   TYPOGRAPHY (Figma: Headings, Main content, Link, Numerical, Placeholder)
   ========================================================================== */
body {
  font-family: var(--ithanks-font-base);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ithanks-text);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   WRAPPER & LAYOUT
   ========================================================================== */
.ithanks-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ithanks-main {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--ithanks-text);
  margin-top: 0;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 1.125rem;
}
h5 {
  font-size: 1rem;
}
h6 {
  font-size: 0.9375rem;
}

p {
  margin-top: 0;
  margin-bottom: 0.75em;
  color: var(--ithanks-text-figma);
  font-size: 0.9375rem;
}

a {
  color: var(--ithanks-link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--ithanks-link-hover);
}

/* Numerical data – bold, larger */
.ithanks-numerical {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ithanks-text);
}

/* Subtle text (e.g. PGD Thái Hà/CN Hà Nội) */
.ithanks-text-subtle {
  font-size: 0.8125rem;
  color: var(--ithanks-text-muted);
}

/* Placeholder */
::placeholder {
  color: var(--ithanks-placeholder);
}

/* ==========================================================================
   BUTTONS (Figma: Primary Blue, Outlined Blue, Primary Orange, ĐỔI QUÀ)
   ========================================================================== */
.ithanks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--ithanks-radius-full);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

/* Primary Blue – solid navy, white text */
.ithanks-btn--primary-blue {
  background: var(--ithanks-blue-900);
  color: var(--ithanks-white);
  border-color: var(--ithanks-blue-900);
}

.ithanks-btn--primary-blue:hover {
  background: var(--ithanks-blue-800);
  border-color: var(--ithanks-blue-800);
  color: var(--ithanks-white);
}

/* Outlined Blue – white bg, navy border & text */
.ithanks-btn--outline-blue {
  background: var(--ithanks-white);
  color: var(--ithanks-blue-900);
  border-color: var(--ithanks-blue-900);
}

.ithanks-btn--outline-blue:hover {
  background: var(--ithanks-blue-50);
  border-color: var(--ithanks-blue-800);
  color: var(--ithanks-blue-800);
}

/* Primary Orange – solid orange, white text (ĐĂNG NHẬP, NHẬN THẺ ĐỔI QUÀ) – Figma PR 100 */
.ithanks-btn--primary-orange {
  background: var(--ithanks-pr-100);
  color: var(--ithanks-white);
  border-color: var(--ithanks-pr-100);
}

.ithanks-btn--primary-orange:hover {
  background: var(--ithanks-orange-600);
  border-color: var(--ithanks-orange-600);
  color: var(--ithanks-white);
}

/* ĐỔI QUÀ – light blue border + text, smaller */
.ithanks-btn--exchange {
  background: transparent;
  color: var(--ithanks-blue-600);
  border-color: var(--ithanks-blue-600);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.ithanks-btn--exchange:hover {
  background: var(--ithanks-blue-50);
  color: var(--ithanks-blue-700);
  border-color: var(--ithanks-blue-700);
}

/* Light (white) – for hero/CTA on dark */
.ithanks-btn--light {
  background: var(--ithanks-white);
  color: var(--ithanks-orange-500);
  border-color: var(--ithanks-white);
}

.ithanks-btn--light:hover {
  background: var(--ithanks-orange-50);
  color: var(--ithanks-orange-600);
  border-color: var(--ithanks-white);
}

.ithanks-btn--outline-light {
  background: transparent;
  color: var(--ithanks-white);
  border-color: var(--ithanks-white);
}

.ithanks-btn--outline-light:hover {
  background: var(--ithanks-white);
  color: var(--ithanks-blue-900);
  border-color: var(--ithanks-white);
}

/* Tag / pill (e.g. TÂM) */
.ithanks-btn--tag {
  background: var(--ithanks-pr-100);
  color: var(--ithanks-white);
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

/* ==========================================================================
   FORM ELEMENTS (Figma: Input, Select – white bg, light grey border, rounded)
   ========================================================================== */
.ithanks-input,
.ithanks-select {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ithanks-text);
  background: var(--ithanks-white);
  border: 1px solid var(--ithanks-border);
  border-radius: var(--ithanks-radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.ithanks-input:focus,
.ithanks-select:focus {
  outline: 0;
  border-color: var(--ithanks-blue-600);
  box-shadow: 0 0 0 3px rgba(13, 27, 42, 0.08);
}

.ithanks-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23475569' d='M8 11L3 6h10l-5 5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* ==========================================================================
   CARDS (Figma: rounded corners, light grey bg)
   ========================================================================== */
.ithanks-card-base {
  background: var(--ithanks-bg-card);
  border-radius: var(--ithanks-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Base card styles - dùng chung cho tất cả card variants */
.ithanks-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--ithanks-white);
  overflow: visible;
}

.ithanks-card:hover {
  text-decoration: none;
  color: inherit;
}

.ithanks-card__link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.ithanks-card__link:hover {
  color: inherit;
  text-decoration: none;
}

.ithanks-card__img {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.ithanks-card__body {
  padding: 1rem 0 0;
}

.ithanks-card__text {
  margin: 0;
  font-weight: 700;
  color: var(--ithanks-text-figma);
  line-height: 1.5;
}

/* Ranked list – orange circle with number */
.ithanks-rank-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ithanks-orange-500);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Status indicator – green dot */
.ithanks-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ithanks-success-dot);
  flex-shrink: 0;
}

/* ==========================================================================
   SPACING & LAYOUT
   ========================================================================== */

/* Section common styles */
.ithanks-section {
  padding: 5rem 0;
}

.ithanks-section__title {
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--ithanks-se-100);
  text-align: left;
}

.ithanks-section__subtitle {
  text-align: center;
  color: var(--ithanks-text-figma);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Container responsive: >= 1440px dùng 1312px, < 1200px dùng 1140px */
@media (min-width: 1440px) {
  .container {
    max-width: 1312px;
  }
}

@media (max-width: 1199.98px) {
  .container {
    max-width: 1140px;
  }
}

/* Responsive: tablet & mobile – section padding, container, section title */
@media (max-width: 991.98px) {
  .ithanks-section {
    padding: 3rem 0;
  }
}

@media (max-width: 991.98px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .ithanks-section {
    padding: 2rem 0;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.125rem;
  }
  .ithanks-section__title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem !important;
  }
  .ithanks-section__subtitle {
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
  }
}

/* ==========================================================================
   SPLIDE CAROUSEL COMMON
   ========================================================================== */
/* CSS common cho tất cả Splide carousel trong project */

/* Splide wrapper common */
.ithanks-splide-carousel {
  padding-bottom: 2.5rem;
}

/* Reset Splide pagination default styles */
.ithanks-splide-carousel .splide__pagination {
  counter-reset: none;
}

/* Splide arrows - loại bỏ border màu xanh khi focus/click */
.ithanks-splide-carousel .splide__arrow,
.ithanks-splide-carousel .splide__arrow:focus,
.ithanks-splide-carousel .splide__arrow:active,
.ithanks-splide-carousel .splide__arrow:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ithanks-white);
  border: 2px solid var(--ithanks-pr-100);
  opacity: 1;
  transition: background 0.2s, border-color 0.2s;
}

.ithanks-splide-carousel .splide__arrow--prev {
  left: -3.5rem;
}

.ithanks-splide-carousel .splide__arrow--next {
  right: -3.5rem;
}

.ithanks-splide-carousel .splide__arrow:hover {
  background: var(--ithanks-pr-100);
  border-color: var(--ithanks-pr-100);
  opacity: 1;
}

.ithanks-splide-carousel .splide__arrow svg {
  width: 16px;
  height: 16px;
  fill: var(--ithanks-pr-100);
  filter: invert(0.4) sepia(1) saturate(8) hue-rotate(5deg);
  transition: filter 0.2s;
}

.ithanks-splide-carousel .splide__arrow:hover svg {
  filter: brightness(0) invert(1);
}

/* Splide controls - đặt arrows và pagination cùng hàng */
.ithanks-splide-carousel .splide__arrows {
}

.ithanks-splide-carousel .splide__pagination {
  gap: 0.5rem;
}

.ithanks-splide-carousel .splide__pagination li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Splide pagination buttons */
.ithanks-splide-carousel .splide__pagination__page {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--ithanks-pr-70);
  border: 2px solid var(--ithanks-pr-70);
  opacity: 1;
  margin: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
  display: block;
}

.ithanks-splide-carousel .splide__pagination__page:hover {
  background-color: var(--ithanks-pr-100);
  border-color: var(--ithanks-pr-100);
}

.ithanks-splide-carousel .splide__pagination__page.is-active {
  background-color: var(--ithanks-pr-100);
  border-color: var(--ithanks-pr-100);
  transform: none;
  cursor: default;
}

@media (max-width: 991.98px) {
  .ithanks-splide-carousel .splide__arrow--prev {
    left: 0.5rem;
  }
  .ithanks-splide-carousel .splide__arrow--next {
    right: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .ithanks-splide-carousel .splide__arrows {
    display: none;
  }
}
