/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables (light mode default) */
:root {
  --bg: #ffffff;
  --text: #222;
  --accent: #000;
  --card: #f4f4f4;
}

/* Dark mode */
body.dark {
  --bg: #111;
  --text: #eee;
  --accent: #fff;
  --card: #222;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

/* Navbar */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  display: flex;
  align-items: center;           /* vertical alignment */
  justify-content: space-between;
  padding: 15px 30px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

/* Wrap links + icons together */
.nav-right {
  display: flex;
  align-items: center;
  gap: 25px;
}

.navbar .logo {
  color: white;
  font-weight: bold;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-links a {
  color: white;
  text-decoration: none;
}

#theme-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.carousel {
  position: absolute;
  width: 100%;
  height: 100%;
}

.carousel-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-img.active {
  opacity: 1;
}

/* Hero */
.hero {
  height: 100vh;
  position: relative;
}

.hero-content img {
  width: 100%;
  max-width: 470px; /* keeps original intended size */
  height: auto;
  margin: 0 auto;
}

.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.hero-content {
  position: relative;
  text-align: center;
  color: white;
  top: 50%;
  transform: translateY(-50%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background: white;
  color: black;
  text-decoration: none;
}

/* Sections */
.section {
  padding: 80px 20px;
  text-align: center;
}

.dark-section {
  background: var(--card);
}

.news-carousel {
  max-width: 900px;
  margin: 30px auto;
  overflow: hidden;
  position: relative;
}

.news-track {
  display: flex;
  transition: transform 0.5s ease;
}

.news-item {
  min-width: 50%; /* 2 items visible */
  box-sizing: border-box;
  padding: 15px;
  text-align: center;
}

.news-item img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* Controls */
.news-controls {
  text-align: center;
  margin-top: 10px;
}

.news-item.active {
  display: block;
}

@media (max-width: 768px) {
  .news-item {
    min-width: 100%; /* already doing this */
  }

  .news-controls {
    display: none; /* hide arrows on mobile */
  }
}

.dots {
  margin-top: 10px;
  text-align: center;
}

.dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 5px;
  background: #bbb;
  border-radius: 50%;
  cursor: pointer;
}

.dots span.active {
  background: #333;
}

@media (min-width: 769px) {
  .dots {
    display: none;
  }
}

/* Grid */
.grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  background: var(--card);
  padding: 20px;
  border-radius: 10px;
  width: 250px;
}

/* Form */
form {
  margin-top: 20px;
}

input {
  padding: 10px;
  width: 250px;
  max-width: 80%;
  margin-right: 10px;
}

button {
  padding: 10px 20px;
  cursor: pointer;
}

/* Footer */
footer {
  padding: 20px;
  text-align: center;
  background: #000;
  color: #fff;
}

.logo-img {
  width: 366px;
  max-width: 80vw; /* makes it responsive on smaller screens */
  height: auto;
}

.table-container {
  display: flex;
  justify-content: center; /* centers table horizontally */
  margin-top: 20px;
  overflow-x: auto;
}

.live-table {
  width: 90%;
  max-width: 800px;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto; /* fallback centering */
}

.live-table th,
.live-table td {
  padding: 12px 15px;
  text-align: left;
}

.live-table thead {
  background: rgba(0,0,0,0.2);
}

.live-table tr:nth-child(even) {
  background: rgba(255,255,255,0.05);
}

.social-icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.social-icons a {
  color: white;
  font-size: 18px;
  transition: 0.3s;
}

.social-icons a:hover {
  color: #ccc;
  transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .grid {
    flex-direction: column;
    align-items: center;
  }
}

