:root {
  --bg-dark: #111;
  --bg-medium: #1e1e1e;
  --bg-light: #2c2c2c;
  --primary: #f44336;
  --hover-bg: rgba(255, 255, 255, 0.1);
  --text-light: #fff;
  --text-muted: #ccc;
  --highlight: #0af;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

button {
  font-family: inherit;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

img {
  display: block;
  max-width: 100%;
}

/* =============================
   Navbar
============================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--bg-medium);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 100;
}

.logo-img {
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links button,
.hamburger-menu button {
  background: none;
  color: var(--text-light);
  padding: 8px 14px;
  border-radius: 6px;
}

.nav-links button:hover,
.hamburger-menu button:hover {
  background: var(--hover-bg);
}

.hamburger {
  display: none;
  background: none;
  color: var(--text-light);
  font-size: 1.8rem;
  padding: 8px;
  z-index: 3;
}

.hamburger-menu {
  display: none;
  position: absolute;
  top: 60px;
  right: 20px;
  background: var(--bg-medium);
  border: 1px solid #444;
  border-radius: 8px;
  flex-direction: column;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

/* =============================
   Carousel / Banner
============================= */
.banner-carousel {
  position: relative;
  width: 100%;
  height: 90vh;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease, transform 1s ease;
  display: flex;
  align-items: flex-end;
  z-index: 0;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-overlay {
  width: 100%;
  padding: 40px 60px;
  background: linear-gradient(to top, rgba(17,17,17,0.95), rgba(17,17,17,0.5), transparent);
}

.carousel-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.carousel-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 600px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.carousel-buttons {
  display: flex;
  gap: 15px;
}

.carousel-buttons button {
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: bold;
}

.carousel-buttons button:first-child {
  background: var(--primary);
  color: white;
}

.carousel-buttons button:last-child {
  background: rgba(255,255,255,0.2);
  color: white;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 2rem;
  padding: 10px 15px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.carousel-arrow:hover {
  background: rgba(0,0,0,0.8);
}
.carousel-arrow.left { left: 20px; }
.carousel-arrow.right { right: 20px; }

.banner-carousel:hover .carousel-arrow {
  opacity: 1;
  pointer-events: auto;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.3s;
  cursor: pointer;
}
.carousel-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* =============================
   Modal Shared Styles
============================= */
.modal,
.search-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal {
  background: rgba(0, 0, 0, 0.85);
}

.search-modal {
  background: rgba(0, 0, 0, 0.95);
  flex-direction: column;
}

.modal-content {
  background: var(--bg-medium);
  padding: 25px;
  width: 95%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.modal-body img {
  width: 30%;
  border-radius: 8px;
}

.modal-text {
  flex: 1;
  text-align: left;
}


.modal-text p {
  margin: 0.25rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.modal-text p strong {
  color: var(--text-light);
}

.search-modal input {
  width: 300px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--bg-light);
  color: var(--text-light);
  margin-bottom: 25px;
}

.search-modal .results {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.search-modal img,
.list img {
  width: 150px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, filter 0.3s;
}
.search-modal img:hover,
.list img:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 26px;
  color: #f33;
  cursor: pointer;
  z-index: 1;
}

.modal-content h2 {
  padding-top: 30px;
}

/* =============================
   Sections and Lists
============================= */
.intro-text,
.blog-preview,
.row {
  padding: 20px;
}

.blog-preview article {
  margin-bottom: 20px;
}

.row h2 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.list {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding-bottom: 10px;
}

/* =============================
   Pagination
============================= */
.pagination-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.pagination-buttons button {
  padding: 10px 18px;
  background: var(--primary);
  color: var(--text-light);
  border-radius: 6px;
}

.pagination-buttons button:hover {
  background: #d32f2f;
}
.pagination-buttons button:disabled {
  background: #444;
  cursor: not-allowed;
}

/* =============================
   Footer
============================= */
.footer {
  background: var(--bg-medium);
  color: var(--text-muted);
  padding: 25px;
  text-align: center;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-links a {
  color: var(--highlight);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text-light);
  text-decoration: underline;
}

/* =============================
   Loader
============================= */
#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17,17,17,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner {
  border: 8px solid #333;
  border-top: 8px solid var(--primary);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================
   Responsive
============================= */
@media (max-width: 768px) {
  .banner-carousel {
    height:50vh;
  }

  .carousel-slide {
    background-size: cover;
    background-position: center top; /* show more upper content */
    background-repeat: no-repeat;
  }
  
  .nav-links { display: none; }
  .hamburger { display: block; }
  .modal-body { flex-direction: column; align-items: center; }
  .modal-body img { width: 60%; }
  .modal-text { text-align: center; }
  .list img { width: 120px; }
  .search-modal input { width: 90%; }

  .carousel-title { font-size: 1.5rem; }
  .carousel-description { font-size: 1rem; }
  .carousel-buttons { flex-direction: column; gap: 10px; }
  .carousel-buttons button { width: 100%; }
}

@media (max-width: 480px) {
  .carousel-title { font-size: 1.3rem; }
  .carousel-description {
    font-size: 0.95rem;
    max-width: 100%;
    margin-bottom: 15px;
  }
  .modal-body img { width: 80%; }
  .modal-content { padding: 15px; }
  .row h2 { font-size: 1.1rem; }
  .footer-content { font-size: 14px; }
}
