/* Fonts */
@font-face {
  font-family: Tajawal-Bold;
  src: url("../fonts/Tajawal-Bold.ttf");
}

@font-face {
  font-family: Tajawal-Light;
  src: url("../fonts/Tajawal-Light.ttf");
}

@font-face {
  font-family: Tajawal-Medium;
  src: url("../Fonts/Tajawal-Medium.ttf");
}

:root {
  --default-font: "Tajawal", sans-serif;
  --heading-font: "Tajawal", sans-serif;
  --nav-font: "Tajawal", sans-serif;
}

/* Base and Reset */
:root {
  --primary: #e10600;
  --primary-glow: rgba(225, 6, 0, 0.5);
  --bg-dark: #0a0a0a;
  --bg-black: #000000;
  --text-main: #ffffff;
  --text-muted: #b3b3b3;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 0, 0, 0.15);
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-drag: none;
}

html {
  scroll-behavior: smooth;
  font-family: var(--default-font);
  background-color: var(--bg-black);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-black);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

/* Preloader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-black);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.loader-logo {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 20px;
  position: relative;
}

.loader-logo span {
  color: var(--primary);
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(225, 6, 0, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

nav.scrolled {
  padding: 15px 50px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--primary);
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.burger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.burger div {
  width: 30px;
  height: 3px;
  background: var(--text-main);
  transition: var(--transition);
}

.cta-btn {
  background: var(--primary);
  color: #fff !important;
  padding: 5px 25px;
  border-radius: 50px;
  font-weight: bold;
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: 0.5s;
}

.cta-btn:hover::before {
  left: 100%;
}

/* Hero Section */
#hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;

  /* 🔥 صورة + Overlay */
  background:
    linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
    url("../img/heroSection.jpg") center/cover no-repeat;
}
#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.typing-wrapper {
  font-size: 2rem;
  min-height: 3rem;
  color: var(--primary);
  margin-bottom: 25px;
  font-weight: 700;
}

.cursor {
  display: inline-block;
  width: 3px;
  background-color: var(--primary);
  animation: blink 1s infinite;
  margin-right: 5px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.ripple-btn {
  position: relative;
  background: var(--primary);
  color: white;
  padding: 16px 45px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 10px 30px var(--primary-glow);
  text-decoration: none;
  display: inline-block;
}

.ripple-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px var(--primary-glow);
  background: #ff0700;
}

.ripple-effect {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.9rem;
  gap: 10px;
  transition: var(--transition);
}

.scroll-down:hover {
  color: var(--primary);
}

.scroll-down svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* General Section Utility */
section {
  padding: 100px 50px;
  position: relative;
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: 1s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  text-align: center;
  margin-bottom: 70px;
}

.section-header h2 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 60px;
  height: 4px;
  background: var(--primary);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #000 100%);
}

.about-image {
  position: relative;
  height: 450px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  background: url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=800&q=80")
    center/cover no-repeat;
}

.about-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(225, 6, 0, 0.2), transparent);
}

.about-content h3 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  font-weight: 800;
}

.about-content p {
  color: var(--text-muted);
  line-height: 1.9;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 35px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.feature-item svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
}

/* Services Grid */
#services {
  background: #000000;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 40px 30px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  background: rgba(225, 6, 0, 0.05);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(225, 6, 0, 0.1);
}

.service-card .icon-wrapper {
  width: 60px;
  height: 60px;
  background: rgba(225, 6, 0, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  transition: var(--transition);
}

.service-card:hover .icon-wrapper {
  background: var(--primary);
}

.service-card .icon-wrapper svg {
  width: 30px;
  height: 30px;
  fill: var(--primary);
  transition: var(--transition);
}

.service-card:hover .icon-wrapper svg {
  fill: #fff;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.service-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.read-more {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Modal popup for services detail */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 20px;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #111;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  padding: 40px;
  position: relative;
  transform: scale(0.8);
  transition: var(--transition);
}

.modal.active .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 20px;
  left: 20px;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--primary);
}

.modal-icon {
  width: 50px;
  height: 50px;
  fill: var(--primary);
  margin-bottom: 20px;
}

.modal-content h3 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--text-main);
}

.modal-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 25px;
}

.modal-list {
  list-style: none;
  margin-bottom: 30px;
}

.modal-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.modal-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: bold;
}

/* Stats Section */
#stats {
  background:
    linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url("https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&w=1200&q=80")
      center/cover fixed;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 40px;
  padding: 80px 50px;
}

.stat-box {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.stat-number {
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stat-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Why Choose Us Section */
#why-us {
  background: var(--bg-dark);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.why-card {
  background: var(--glass);
  border-left: 3px solid var(--primary);
  padding: 30px;
  border-radius: 4px;
  transition: var(--transition);
}

.why-card:hover {
  transform: translateX(-10px);
  background: rgba(255, 255, 255, 0.05);
}

.why-card h4 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.why-card h4 svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
}

.why-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Contact Section */
#contact {
  background: #000;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
}

.contact-info h3 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 30px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(225, 6, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
}

.contact-text h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.contact-text p {
  color: var(--text-muted);
}

.contact-form {
  background: var(--glass);
  padding: 40px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  border-radius: 4px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.8);
}

.contact-form button {
  width: 100%;
}

/* Footer */
footer {
  background: var(--bg-black);
  padding: 50px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
}

.footer-logo span {
  color: var(--primary);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  fill: var(--text-main);
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-5px);
  fill: #fff;
  border-color: var(--primary);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

/* Back To Top */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(225, 6, 0, 0.3);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  #about,
  #contact {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .section-header h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 20px;
  }
  nav.scrolled {
    padding: 15px 20px;
  }

  .nav-links {
    position: fixed;
    top: 75px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 75px);
    background: var(--bg-black);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: var(--transition);
    border-top: 1px solid var(--glass-border);
  }

  .nav-links.active {
    right: 0;
  }

  .burger {
    display: flex;
  }

  .burger.active .line1 {
    transform: rotate(-45deg) translate(-6px, 6px);
  }
  .burger.active .line2 {
    opacity: 0;
  }
  .burger.active .line3 {
    transform: rotate(45deg) translate(-6px, -6px);
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .typing-wrapper {
    font-size: 1.5rem;
  }

  section {
    padding: 80px 20px;
  }

  .stat-number {
    font-size: 3rem;
  }
}
/* ===== Animated Background ===== */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-animation .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: floatOrb 20s ease-in-out infinite;
}

.bg-animation .orb:nth-child(1) {
  width: 600px;
  height: 600px;
  background: var(--primary);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.bg-animation .orb:nth-child(2) {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -150px;
  left: -100px;
  animation-delay: -7s;
}

.bg-animation .orb:nth-child(3) {
  width: 400px;
  height: 400px;
  background: #ff6b9d;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-30px, 30px) scale(0.9);
  }
  75% {
    transform: translate(40px, 40px) scale(1.05);
  }
}

/* ===== Loader ===== */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(108, 99, 255, 0.2);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loader-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ===== Header ===== */
header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px 20px 20px;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.logo-text h1 {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ===== Main Content ===== */
main {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: calc(100vh - 160px);
}

/* ===== Carousel Container ===== */
.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.carousel-container {
  position: relative;
  width: 100%;
  aspect-ratio: 841.89 / 595.276;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px var(--shadow-color),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-container:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel-track.dragging {
  transition: none;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  pointer-events: none;
}

/* Placeholder styling */
.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
  position: relative;
  overflow: hidden;
}

.placeholder::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(108, 99, 255, 0.05) 0%,
    transparent 70%
  );
  animation: placeholderGlow 4s ease-in-out infinite;
}

@keyframes placeholderGlow {
  0%,
  100% {
    transform: translate(-25%, -25%) scale(1);
  }
  50% {
    transform: translate(-25%, -25%) scale(1.2);
  }
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.6;
  z-index: 1;
}

.placeholder-text {
  font-size: 1.2rem;
  color: var(--text-secondary);
  z-index: 1;
}

.placeholder-page {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.3;
  position: absolute;
  bottom: 20px;
  left: 30px;
  z-index: 1;
}

/* ===== Zoom Icon Overlay ===== */
.zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.carousel-container:hover .zoom-overlay {
  opacity: 1;
}

.zoom-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.carousel-container:hover .zoom-icon {
  transform: scale(1);
}

/* ===== Navigation Buttons ===== */
.nav-buttons {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  pointer-events: none;
  z-index: 20;
}

.nav-btn {
  pointer-events: all;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 4px 25px var(--shadow-color);
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: scale(1);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Page Indicator ===== */
.page-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 70px;
  text-align: center;
}

.page-text .current {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-light);
}

.page-text .divider {
  margin: 0 5px;
  opacity: 0.4;
}

.page-text .total {
  color: var(--text-secondary);
}

/* ===== Dots Navigation ===== */
.dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.2);
}

.dot.active {
  background: var(--primary);
  width: 30px;
  border-radius: 5px;
  box-shadow: 0 0 10px var(--shadow-color);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  cursor: zoom-out;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 95vw;
  max-height: 95vh;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img,
.lightbox-content .placeholder {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10000;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg) scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.lightbox-nav .nav-btn {
  pointer-events: all;
}

/* ===== Thumbnail Strip ===== */
.thumbnail-strip {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  padding: 10px;
  overflow-x: auto;
  max-width: 900px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.thumbnail-strip::-webkit-scrollbar {
  height: 4px;
}

.thumbnail-strip::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

.thumbnail {
  width: 70px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
  opacity: 0.5;
}

.thumbnail:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.thumbnail.active {
  border-color: var(--primary);
  opacity: 1;
  box-shadow: 0 0 15px var(--shadow-color);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail .placeholder {
  font-size: 0.6rem;
}

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

footer a {
  color: var(--primary-light);
  text-decoration: none;
}

/* ===== Keyboard Hint ===== */
.keyboard-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.5;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 0.75rem;
  min-width: 28px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  header {
    padding: 25px 15px 15px;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .logo-text h1 {
    font-size: 1.2rem;
  }

  .logo-text p {
    font-size: 0.7rem;
    letter-spacing: 2px;
  }

  main {
    padding: 10px;
  }

  .carousel-wrapper {
    max-width: 100%;
  }

  .nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .nav-buttons {
    padding: 0 8px;
  }

  .page-indicator {
    margin-top: 20px;
  }

  .thumbnail-strip {
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 8px 5px;
  }

  .thumbnail {
    width: 55px;
    height: 38px;
  }

  .keyboard-hint {
    display: none;
  }

  .zoom-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .nav-btn {
    width: 35px;
    height: 35px;
  }

  .placeholder-icon {
    font-size: 2rem;
  }

  .placeholder-text {
    font-size: 0.9rem;
  }

  .placeholder-page {
    font-size: 2.5rem;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
  opacity: 0;
}
.delay-2 {
  animation-delay: 0.2s;
  opacity: 0;
}
.delay-3 {
  animation-delay: 0.3s;
  opacity: 0;
}
.delay-4 {
  animation-delay: 0.4s;
  opacity: 0;
}
