/* ==========================================================================
   KAY GROUP OF COMPANIES - MAIN STYLESHEET
   Matching theme, colors, typography and design system of https://kayscholar.com/
   ========================================================================== */

:root {
  /* KAY Scholar Design System Variables */
  --ks-ink: #1a1729;
  --ks-indigo: #4540e1;
  --ks-violet: #7a45e8;
  --ks-magenta: #bd45c6;
  --ks-gold: #f2bc00;
  --ks-gold-hover: #d9a700;
  --ks-lilac: #f6f2ff;
  --ks-paper: #ffffff;
  --ks-bg-soft: #fbfaff;
  --ks-copy: #625f71;
  --ks-copy-light: #8d899e;
  --ks-line: rgba(26, 23, 41, 0.08);
  --ks-line-strong: rgba(26, 23, 41, 0.14);
  --ks-shadow-sm: 0 4px 14px rgba(26, 23, 41, 0.05);
  --ks-shadow-md: 0 12px 32px rgba(35, 29, 82, 0.08);
  --ks-shadow-lg: 0 22px 55px rgba(35, 29, 82, 0.12);
  --ks-shadow-glow: 0 15px 40px rgba(69, 64, 225, 0.28);
  --ks-glass: rgba(255, 255, 255, 0.78);
  --ks-glass-border: rgba(255, 255, 255, 0.85);
  --ks-button-gradient: linear-gradient(110deg, #4540e1 0%, #7a45e8 52%, #bd45c6 100%);
  --ks-button-gradient-hover: linear-gradient(110deg, #3732c5 0%, #6934d4 52%, #a835b0 100%);
  --ks-accent-gradient: linear-gradient(135deg, #4540e1 0%, #bd45c6 100%);
  --ks-dark-gradient: linear-gradient(180deg, rgba(26, 23, 41, 0) 0%, rgba(26, 23, 41, 0.6) 40%, rgba(15, 12, 28, 0.96) 100%);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-editorial: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Urbanist', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--ks-ink);
  background-color: #ffffff;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Container */
.kgoc-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.kgoc-container-wide {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   NAVIGATION HEADER (Centered Logo and Branding)
   ========================================================================== */
.kgoc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ks-line);
  transition: all 0.3s ease;
}

.kgoc-header.scrolled {
  box-shadow: 0 8px 25px rgba(26, 23, 41, 0.05);
  background: rgba(255, 255, 255, 0.98);
}

.navbar-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 0;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: left;
  margin: 0 auto;
  transition: var(--transition-smooth);
}

.brand-wrap:hover {
  transform: translateY(-1px);
}

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-divider {
  width: 1px;
  height: 30px;
  background-color: var(--ks-line-strong);
}

.brand-tag {
  display: flex;
  flex-direction: column;
}

.brand-tag-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--ks-ink);
  line-height: 1.1;
}

.brand-tag-sub {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ks-indigo);
}

/* ==========================================================================
   CURVED FAN-OUT 3D ARC SLIDER SECTION
   (Reduced top padding & margins, refined compact card sizes)
   ========================================================================== */
.fan-slider-section {
  position: relative;
  padding: 24px 0 50px; /* Reduced from 100px 0 110px */
  background: #ffffff;
  overflow: hidden;
}

.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 12px; /* Reduced margin */
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ks-indigo);
  margin-bottom: 4px; /* Reduced */
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem); /* Refined compact headline */
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--ks-ink);
  line-height: 1.15;
  margin-bottom: 4px;
}

.section-title .serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--ks-indigo);
  position: relative;
  display: inline-block;
}

.section-title .serif-accent .shape {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 18px;
  pointer-events: none;
  z-index: -1;
}

.section-title .serif-accent .shape svg {
  width: 100%;
  height: 100%;
  fill: var(--ks-gold);
}

/* Category Filter Pills */
.filter-pills-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px auto 26px; /* Reduced from 32px auto 55px */
  padding: 6px 10px;
  background: var(--ks-lilac);
  border-radius: 999px;
  max-width: max-content;
  border: 1px solid rgba(69, 64, 225, 0.1);
}

.filter-pill {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ks-copy);
  background: transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  color: var(--ks-indigo);
  background: rgba(255, 255, 255, 0.7);
}

.filter-pill.active {
  background: var(--ks-indigo);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(69, 64, 225, 0.35);
}

/* The Fan Carousel Stage (Reduced height for compact cards) */
.fan-slider-stage {
  position: relative;
  width: 100%;
  height: 440px; /* Reduced from 560px */
  margin: 0 auto;
  perspective: 1100px;
  overflow: visible;
}

.fan-cards-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Individual Fan Card (Refined compact size: 255px x 385px) */
.fan-card {
  position: absolute;
  width: 255px; /* Reduced from 320px */
  height: 385px; /* Reduced from 480px */
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transform-origin: center 90%;
  background: #151324;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1),
              opacity 0.65s ease,
              filter 0.65s ease,
              box-shadow 0.65s ease,
              border-color 0.4s ease;
  will-change: transform, filter, opacity;
}

/* Poster Image */
.fan-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  z-index: 1;
}

.fan-card.active:hover .fan-card-bg {
  transform: scale(1.05);
}

/* Gradient Overlay */
.fan-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 12, 35, 0.15) 0%,
    rgba(15, 12, 35, 0.45) 40%,
    rgba(10, 8, 25, 0.95) 85%,
    rgba(10, 8, 25, 1) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Top Floating Badges */
.fan-card-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 5;
}

.fan-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 999px;
}

/* Center Logo Box (Compact & clear) */
.fan-card-logo-container {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 115px;
  height: 56px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.4s ease;
}

.fan-card.active:hover .fan-card-logo-container {
  transform: translate(-50%, -54%) scale(1.05);
}

.fan-card-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Card Bottom Content */
.fan-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 18px;
  z-index: 5;
  text-align: left;
}

.fan-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}

.fan-card-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fan-card-meta .separator {
  color: var(--ks-violet);
  font-size: 0.65rem;
}

.fan-card-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fan-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fan-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ks-button-gradient);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 15px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(69, 64, 225, 0.35);
  transition: var(--transition-smooth);
}

.fan-card-btn:hover {
  background: var(--ks-button-gradient-hover);
  transform: translateX(3px);
  color: #ffffff;
}

.fan-card-btn i {
  font-size: 0.72rem;
  transition: transform 0.25s ease;
}

.fan-card-btn:hover i {
  transform: translateX(3px);
}

/* Slider Bottom Control Bar */
.fan-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px; /* Reduced from 36px */
}

.fan-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--ks-ink);
  border: 1.5px solid var(--ks-line-strong);
  box-shadow: var(--ks-shadow-sm);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.fan-nav-btn:hover {
  background: var(--ks-indigo);
  border-color: var(--ks-indigo);
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(69, 64, 225, 0.3);
}

.fan-indicators {
  display: flex;
  align-items: center;
  gap: 7px;
}

.fan-indicator-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(26, 23, 41, 0.18);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.fan-indicator-dot.active {
  width: 28px;
  background: var(--ks-indigo);
  box-shadow: 0 2px 8px rgba(69, 64, 225, 0.4);
}

.fan-play-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ks-lilac);
  color: var(--ks-indigo);
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.fan-play-toggle:hover {
  background: var(--ks-indigo);
  color: #ffffff;
}

/* ==========================================================================
   FOOTER (Centered Logo and Content)
   ========================================================================== */
.kgoc-footer {
  background-color: var(--ks-ink);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  padding-top: 50px;
  padding-bottom: 20px;
  text-align: center;
}

.footer-top-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-col {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0;
}

.footer-logo {
  max-width: 140px;
  margin: 0 auto 16px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-desc {
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 auto 20px;
  font-size: 0.9rem;
  text-align: center;
}

.footer-bottom-bar {
  padding: 20px 0 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  text-align: center;
}

.footer-bottom-content a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.footer-bottom-content a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .fan-slider-stage {
    height: 410px;
  }
  
  .fan-card {
    width: 230px;
    height: 350px;
  }
}

@media (max-width: 768px) {
  .navbar-wrapper {
    padding: 10px 0;
  }

  .brand-logo-img {
    height: 36px;
  }

  .brand-tag-name {
    font-size: 0.95rem;
  }

  .brand-tag-sub {
    font-size: 0.62rem;
  }

  .fan-slider-section {
    padding: 16px 0 36px; /* Highly compact top spacing */
  }

  .section-header {
    margin: 0 auto 10px;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .filter-pills-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    max-width: 95%;
    margin: 10px auto 18px;
    background: var(--ks-lilac);
  }

  .filter-pill {
    padding: 5px 12px;
    font-size: 0.76rem;
  }

  .fan-slider-stage {
    height: 360px;
  }

  .fan-card {
    width: 200px;
    height: 310px;
    border-radius: 16px;
  }

  .fan-card-top {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .fan-tag-badge {
    font-size: 0.64rem;
    padding: 2px 8px;
  }

  .fan-card-logo-container {
    width: 90px;
    height: 44px;
    border-radius: 10px;
    padding: 6px 8px;
  }

  .fan-card-content {
    padding: 12px 14px;
  }

  .fan-card-title {
    font-size: 1.05rem;
  }

  .fan-card-meta {
    font-size: 0.66rem;
    margin-bottom: 4px;
  }

  .fan-card-desc {
    font-size: 0.72rem;
    line-height: 1.35;
    margin-bottom: 8px;
    -webkit-line-clamp: 2;
  }

  .fan-card-btn {
    font-size: 0.72rem;
    padding: 5px 12px;
  }

  .fan-controls-bar {
    margin-top: 16px;
    gap: 14px;
  }

  .fan-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .kgoc-footer {
    padding-top: 36px;
    padding-bottom: 16px;
  }

  .footer-logo {
    max-width: 110px;
  }

  .footer-desc {
    font-size: 0.84rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: 8px;
  }
}
