/* ==========================================================
   MOHAMED SAID DIGITAL HISTORICAL ARCHIVE
   MAIN STYLESHEET (PREMIUM DARK & GOLD)
========================================================== */

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* VARIABLES */
:root {
  --primary: #d4af37; /* Dhahabu */
  --primary-dark: #b9932f;
  --background: #08111d; /* Nyeusi wa Giza */
  --background-2: #0d1b2b;
  --surface: #162436;
  --card: #152338;
  --white: #ffffff;
  --text: #e9eef5;
  --muted: #aeb8c7;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --transition: all 0.35s ease;
  --container: 1250px;
}

/* GLOBAL STYLES */
body {
  font-family: 'Poppins', sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(92%, var(--container));
  margin: auto;
}

section {
  padding: 90px 0;
}

h1, h2, h3, h4 {
  color: var(--white);
  line-height: 1.2;
  font-family: 'Cinzel', serif;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.6rem; }
p { color: var(--muted); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 50px;
  background: var(--primary);
  color: #111;
  font-weight: 700;
  transition: var(--transition);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #111;
}

/* ==========================================================
   HEADER & NAVIGATION
========================================================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: var(--transition);
}

#header.scrolled {
  background: rgba(8, 17, 29, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.logo h2 {
  font-size: 1.2rem;
  color: var(--white);
}

.logo span {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

#navbar ul {
  display: flex;
  gap: 30px;
}

#navbar a {
  color: #ccc;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}

#navbar a:hover, #navbar a.active {
  color: var(--primary);
}

#navbar a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

#navbar a:hover::after, #navbar a.active::after {
  width: 100%;
}

#menuToggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

/* ==========================================================
   HERO SECTION
========================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  background: linear-gradient(rgba(8, 17, 29, 0.9), rgba(8, 17, 29, 0.7)), url('https://images.unsplash.com/photo-1568667256549-094345857637?q=80&w=2070') center/cover no-repeat fixed;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 18px;
  font-size: 0.9rem;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 25px;
}

.hero h1 span {
  color: var(--primary);
  display: block;
  font-size: 2.5rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 35px;
  max-width: 650px;
}

.hero-search {
  margin-bottom: 30px;
  max-width: 600px;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px;
  backdrop-filter: blur(10px);
}

.search-wrapper i {
  color: var(--primary);
  padding-left: 20px;
}

.search-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 15px;
  color: var(--white);
  font-size: 1rem;
}

.search-wrapper button {
  padding: 12px 25px;
  border: none;
  border-radius: 50px;
  background: var(--primary);
  color: #111;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.search-wrapper button:hover {
  background: var(--primary-dark);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 50px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stats h2 {
  font-size: 3rem;
  color: var(--primary);
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 450px;
  border-radius: 24px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.floating-badge {
  position: absolute;
  bottom: 30px;
  left: -20px;
  background: var(--surface);
  border: 1px solid var(--primary);
  padding: 15px 25px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow);
}

.floating-badge i {
  color: var(--primary);
  font-size: 1.5rem;
}

/* ==========================================================
   SECTION TITLES & ANIMATIONS
========================================================== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.section-header h2 {
  font-size: 3rem;
  margin: 15px 0;
}

.section-header p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--muted);
}

.alt-section {
  background: var(--background-2);
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   COLLECTIONS & FIGURES GRID
========================================================== */
.collection-grid, .figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.collection-card, .figure-card {
  background: var(--card);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.collection-card:hover, .figure-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.collection-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.figure-card {
  padding: 0;
  overflow: hidden;
}

.figure-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.figure-card:hover img {
  transform: scale(1.05);
}

.figure-info {
  padding: 25px;
  text-align: left;
}

.figure-info h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

/* ==========================================================
   QUOTE SECTION
========================================================== */
.quote-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0d1b2b, #08111d);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.quote-section blockquote {
  max-width: 800px;
  margin: auto;
}

.quote-section i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.quote-section p {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--white);
  margin-bottom: 20px;
}

.quote-section footer {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================
   TIMELINE
========================================================== */
.timeline-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-wrapper::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
  transform: translateX(-50%);
}

.timeline-item {
  width: 50%;
  position: relative;
  padding: 20px 40px;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-year {
  display: inline-block;
  margin-bottom: 15px;
  padding: 5px 15px;
  background: var(--primary);
  color: #111;
  font-weight: 700;
  border-radius: 20px;
}

.timeline-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 25px;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
}

/* ==========================================================
   NEWSLETTER
========================================================== */
.newsletter-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  background: var(--card);
  padding: 50px;
  border-radius: 24px;
  border: 1px solid var(--border);
}

.newsletter-form {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 280px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--white);
  outline: none;
}

/* ==========================================================
   FOOTER
========================================================== */
.footer {
  background: #040913;
  padding: 70px 0 25px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h3, .footer h4 {
  margin-bottom: 20px;
  color: var(--white);
}

.footer-about p {
  max-width: 400px;
}

.footer ul li {
  margin-bottom: 12px;
}

.footer ul li a:hover {
  color: var(--primary);
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  transition: var(--transition);
  color: #aaa;
}

.social-icons a:hover {
  background: var(--primary);
  color: #111;
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 25px;
  color: #666;
  font-size: 0.9rem;
}

/* ==========================================================
   FLOATING BUTTONS (WhatsApp & Back to Top)
========================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  z-index: 999;
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  background: #128C7E;
  transform: scale(1.1);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

#backToTop {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: #111;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  z-index: 999;
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
  transition: var(--transition);
}

#backToTop:hover {
  transform: translateY(-5px);
}

/* ==========================================================
   RESPONSIVE DESIGN
========================================================== */
@media (max-width: 992px) {
  .hero-grid, .newsletter-box, .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    text-align: center;
    padding-top: 140px;
  }

  .hero-search, .hero-buttons, .hero-stats {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .timeline-wrapper::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 60px;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  #menuToggle {
    display: block;
  }

  #navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(8, 17, 29, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }

  #navbar.active {
    right: 0;
  }

  #navbar ul {
    flex-direction: column;
    gap: 40px;
  }

  #navbar ul li a {
    font-size: 1.5rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero h1 span {
    font-size: 1.8rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  section {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .btn {
    width: 100%;
  }
}
