/* ============================================================
   style.css — Custom styles for Bidar Chess Association
   Handles animations, ticker, lightbox, scrollbar, and effects
   that Tailwind CSS cannot handle.
   ============================================================ */

/* ── CSS Variables (Color Palette) ──────────────────────────── */
:root {
  --color-dark: #212326;
  --color-light: #E2D8DA;
  --color-white: #ffffff;
  --color-accent: #af7d51;
  --color-black: #000000;
  --color-body-bg: #E9EAEF;
  --color-gray: #434549;
  --color-text: #212326;
  --color-muted: #cccccc;
  --color-footer-bg: #1a1c1f;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Sora', sans-serif;
  background-color: var(--color-body-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

/* ── Custom Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c9956a;
}

/* ── Hero Slider ────────────────────────────────────────────── */
.hero-slider {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(67, 69, 73, 0.52) 0%, rgba(33, 35, 38, 0.42) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
}

/* ── Ticker / Marquee ───────────────────────────────────────── */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(75deg, #000000 0%, #af7d51 100%);
  padding: 12px 0;
}

.ticker {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 20s linear infinite;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ── Fade In Up Animation ───────────────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Fade In Animation ──────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.9s ease forwards;
}

.animate-fadeInUp {
  animation: fadeInUp 1.3s ease forwards;
}

/* ── Team Card Styling ──────────────────────────────────────── */
.team-card {
  position: relative;
  background: #000000;
  overflow: hidden;
  border-radius: 4px;
}

.team-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Crect width='50' height='50' fill='%23222'/%3E%3Crect x='50' y='50' width='50' height='50' fill='%23222'/%3E%3C/svg%3E") repeat;
  background-size: 20px 20px;
  opacity: 0.15;
}

.team-card-image {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 20px auto;
  border: 6px solid transparent;
  background-image: conic-gradient(
    #fff 0deg 45deg, #333 45deg 90deg,
    #fff 90deg 135deg, #333 135deg 180deg,
    #fff 180deg 225deg, #333 225deg 270deg,
    #fff 270deg 315deg, #333 315deg 360deg
  );
  background-origin: border-box;
  background-clip: border-box;
}

.team-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #555;
}

.team-card-role {
  position: relative;
  text-align: center;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 20px 0;
  letter-spacing: 1px;
}

.team-card-role::before,
.team-card-role::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 25%;
  height: 1px;
  border-top: 2px dashed var(--color-accent);
}

.team-card-role::before {
  left: 5%;
}

.team-card-role::after {
  right: 5%;
}

.team-card-name {
  position: relative;
  display: inline-block;
  background: #ffffff;
  color: var(--color-text);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 4px;
  margin: 15px auto 25px;
}

/* ── News / Blog Cards ──────────────────────────────────────── */
.news-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  height: 380px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: scale(1.02);
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 60%);
}

.news-card-date {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.news-card-title {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.news-card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: #ffffff;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.news-card:hover .news-card-arrow {
  opacity: 1;
}

/* ── Button Styles ──────────────────────────────────────────── */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-dark);
  color: #ffffff;
  border-color: var(--color-dark);
}

.btn-outline-white {
  border-color: #ffffff;
  color: #ffffff;
}

.btn-outline-white:hover {
  background: #ffffff;
  color: var(--color-dark);
}

.btn-outline-light {
  border-color: var(--color-text);
  color: var(--color-text);
  background: var(--color-dark);
  color: #ffffff;
  border-color: #ffffff;
}

.btn-outline-light:hover {
  background: #ffffff;
  color: var(--color-dark);
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-dark);
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-hero:hover {
  background: #ffffff;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* ── Events Section ─────────────────────────────────────────── */
.events-section {
  position: relative;
  overflow: hidden;
}

.events-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.events-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3);
}

.event-card {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px 0;
}

.event-card:last-child {
  border-bottom: none;
}

/* ── Discover Section ───────────────────────────────────────── */
.discover-section {
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.discover-bg {
  position: absolute;
  inset: 0;
}

.discover-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* ── WhatsApp Button ────────────────────────────────────────── */
.whatsapp-btn {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
}

.whatsapp-btn svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

/* ── Scroll to Top Button ───────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999;
  width: 45px;
  height: 45px;
  background: rgba(33, 35, 38, 0.8);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-size: 20px;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background: var(--color-dark);
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-header.scrolled {
  background: rgba(33, 35, 38, 0.95) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
  color: #ffffff;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #ffffff;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: all 0.3s ease;
  z-index: 100;
}

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

.nav-dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--color-dark);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  text-transform: none;
  transition: background 0.2s ease;
}

.nav-dropdown a:hover {
  background: var(--color-body-bg);
}

/* ── Mobile Menu ────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-dark);
  z-index: 998;
  padding-top: 80px;
  overflow-y: auto;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  color: #ffffff;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 18px 30px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  transition: all 0.3s ease;
}

/* ── Section Separator ──────────────────────────────────────── */
.section-sep {
  width: 100%;
  height: 2px;
  background: rgba(0, 0, 0, 0.05);
}

/* ── About Section Left Panel ───────────────────────────────── */
.about-panel {
  background-color: var(--color-light);
}

/* ── Benefits Checkmark ─────────────────────────────────────── */
.benefit-item::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--color-dark);
  color: #ffffff;
  font-size: 12px;
  margin-right: 12px;
}

.benefit-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Top Social Bar ─────────────────────────────────────────── */
.top-social-bar {
  background: var(--color-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.nav-header.scrolled .top-social-bar {
  display: none !important;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer-dotted-line {
  border-top: 2px dashed var(--color-accent);
  margin-bottom: 20px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hamburger {
    display: none !important;
  }

  .desktop-nav {
    display: none !important;
  }

  .hero-slider {
    min-height: 70vh;
  }

  #mainNav {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  #navLogo img {
    width: 70px !important;
    height: 70px !important;
  }

  .mobile-menu {
    padding-top: 130px;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    min-height: 60vh;
  }

  .news-card {
    height: 300px;
  }

  .team-card-image {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    min-height: 50vh;
  }

  .ticker {
    font-size: 14px;
  }
}
