:root {
  --gold-primary: #D4AF37;
  --gold-light: #F4E4A8;
  --gold-dark: #8B7500;
  --sand-light: #F5E6D3;
  --sand-medium: #D2B48C;
  --sand-dark: #8B7355;
  --stone-dark: #2C2416;
  --stone-darker: #1A140D;
  --night-sky: #0A1128;
  --royal-blue: #1E3A5F;
  --nile-blue: #4A90A4;
  --papyrus-green: #4A7C59;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Amiri', serif;
  background-color: var(--stone-darker);
  color: var(--sand-light);
  overflow-x: hidden;
  line-height: 1.8;
}

#app {
  width: 100%;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, var(--stone-darker) 0%, var(--night-sky) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ankh-loader {
  font-size: 5rem;
  color: var(--gold-primary);
  animation: rotateAnkh 2s ease-in-out infinite;
  filter: drop-shadow(0 0 30px var(--gold-primary));
}

@keyframes rotateAnkh {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
}

.loading-text {
  margin-top: 2rem;
  font-size: 1.5rem;
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
}

.audio-control {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 100%);
  border: 3px solid var(--gold-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.audio-control:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
}

.audio-control i {
  color: var(--stone-darker);
  font-size: 1.5rem;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--night-sky) 0%, var(--stone-dark) 100%);
  overflow: hidden;
}

.golden-rays {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top center, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
  pointer-events: none;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

.pharaoh-avatar {
  position: relative;
  margin-bottom: 3rem;
  z-index: 10;
}

.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: expandGlow 3s ease-in-out infinite;
}

@keyframes expandGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.9; }
}

.pharaoh-character-img {
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 15px 30px rgba(212, 175, 55, 0.5));
  z-index: 11;
}

.pharaoh-icon {
  font-size: 6rem;
  color: var(--stone-darker);
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

.welcome-dialogue {
  max-width: 800px;
  padding: 0 2rem;
  z-index: 10;
}

.dialogue-bubble {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(42, 36, 22, 0.9) 100%);
  border: 3px solid var(--gold-primary);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(212, 175, 55, 0.3);
}

.dialogue-bubble::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 30px solid var(--gold-primary);
}

.typing-text {
  font-size: 1.8rem;
  line-height: 1.6;
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  text-align: center;
  min-height: 3rem;
}

.cursor {
  display: inline-block;
  width: 3px;
  background-color: var(--gold-primary);
  animation: blink 1s infinite;
  margin-right: 5px;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  color: var(--gold-primary);
  animation: bounce 2s ease-in-out infinite;
  cursor: pointer;
  z-index: 10;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-20px); }
}

.content-section {
  position: relative;
  min-height: 100vh;
  padding: 8rem 0;
  overflow: hidden;
}

.section-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.parallax-bg {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.pyramids-section {
  background: linear-gradient(180deg, var(--stone-dark) 0%, var(--sand-dark) 50%, var(--stone-dark) 100%);
}

.pyramids-section .parallax-bg {
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
                    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><polygon points="300,500 600,100 900,500" fill="%238B7355" opacity="0.3"/><polygon points="100,500 400,150 700,500" fill="%23A0826D" opacity="0.2"/></svg>');
}

.nile-section {
  background: linear-gradient(180deg, var(--stone-dark) 0%, var(--royal-blue) 50%, var(--stone-dark) 100%);
}

.river-bg {
  background-image: linear-gradient(rgba(10, 17, 40, 0.7), rgba(30, 58, 95, 0.7));
}

.hieroglyphics-section {
  background: linear-gradient(180deg, var(--stone-dark) 0%, var(--stone-darker) 100%);
}

.stone-texture {
  background-image:
    repeating-linear-gradient(90deg, rgba(212, 175, 55, 0.03) 0px, transparent 2px, transparent 4px, rgba(212, 175, 55, 0.03) 6px),
    repeating-linear-gradient(0deg, rgba(212, 175, 55, 0.03) 0px, transparent 2px, transparent 4px, rgba(212, 175, 55, 0.03) 6px);
}

.gold-section {
  background: linear-gradient(180deg, var(--stone-darker) 0%, var(--gold-dark) 30%, var(--stone-darker) 100%);
}

.golden-texture {
  background-image: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 80% 50%, rgba(244, 228, 168, 0.1) 0%, transparent 50%);
}

.section-title {
  position: relative;
  font-family: 'Cinzel', serif;
  font-size: 4rem;
  font-weight: 900;
  text-align: center;
  color: var(--gold-primary);
  margin-bottom: 5rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5),
               0 0 30px rgba(212, 175, 55, 0.5);
  z-index: 10;
  position: relative;
}

.section-title i {
  margin-left: 1rem;
  font-size: 0.8em;
}

.section-title::after {
  content: attr(data-title);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: transparent;
  -webkit-text-stroke: 2px rgba(212, 175, 55, 0.3);
  z-index: -1;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  position: relative;
  z-index: 10;
}

.content-block {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.8) 0%, rgba(42, 36, 22, 0.8) 100%);
  border: 2px solid var(--gold-primary);
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
              0 0 20px rgba(212, 175, 55, 0.2);
  transition: all 0.4s ease;
}

.content-block:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7),
              0 0 40px rgba(212, 175, 55, 0.4);
  border-color: var(--gold-light);
}

.content-block h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.content-block h3 i {
  color: var(--gold-primary);
}

.content-block p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--sand-light);
}

.nile-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  position: relative;
  z-index: 10;
}

.content-card {
  background: linear-gradient(135deg, rgba(74, 144, 164, 0.2) 0%, rgba(30, 58, 95, 0.4) 100%);
  border: 2px solid var(--nile-blue);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.4s ease;
}

.content-card:hover {
  transform: scale(1.05);
  border-color: var(--gold-primary);
  box-shadow: 0 15px 40px rgba(74, 144, 164, 0.5);
}

.card-icon {
  font-size: 4rem;
  color: var(--gold-primary);
  margin-bottom: 1.5rem;
  display: block;
}

.content-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}

.content-card p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--sand-light);
}

.hieroglyph-content {
  position: relative;
  z-index: 10;
  max-width: 1000px;
  margin: 0 auto;
}

.stone-tablet {
  background: linear-gradient(135deg, rgba(139, 115, 85, 0.3) 0%, rgba(42, 36, 22, 0.5) 100%);
  border: 3px solid var(--sand-dark);
  border-radius: 10px;
  padding: 4rem 3rem;
  margin-bottom: 4rem;
  box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.5),
              0 10px 40px rgba(0, 0, 0, 0.5);
}

.hieroglyph-line {
  font-size: 1.5rem;
  line-height: 2.2;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  padding-right: 2rem;
  border-right: 3px solid var(--gold-primary);
  opacity: 0;
}

.hieroglyph-symbols {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.symbol {
  position: relative;
  font-size: 4rem;
  color: var(--gold-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.5));
}

.symbol:hover {
  transform: scale(1.2) rotate(10deg);
  color: var(--gold-light);
}

.symbol::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: rgba(30, 58, 95, 0.95);
  color: var(--gold-light);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  border: 1px solid var(--gold-primary);
}

.symbol:hover::after {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

.arts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  position: relative;
  z-index: 10;
}

.art-card {
  background: linear-gradient(135deg, rgba(139, 117, 0, 0.2) 0%, rgba(42, 36, 22, 0.6) 100%);
  border: 2px solid var(--gold-primary);
  border-radius: 15px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.art-card:hover {
  transform: translateY(-15px) scale(1.05);
  border-color: var(--gold-light);
  box-shadow: 0 20px 50px rgba(212, 175, 55, 0.4);
}

.art-icon {
  font-size: 5rem;
  color: var(--gold-primary);
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
}

.art-card:hover .art-icon {
  transform: scale(1.2) rotate(360deg);
  color: var(--gold-light);
}

.art-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.art-card p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--sand-light);
}

.tourism-section {
  background: linear-gradient(180deg, var(--stone-darker) 0%, var(--sand-dark) 30%, var(--nile-blue) 60%, var(--stone-darker) 100%);
}

.tourism-texture {
  background-image: 
    radial-gradient(circle at 30% 40%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(74, 144, 164, 0.1) 0%, transparent 50%);
}

.tourism-intro {
  max-width: 900px;
  margin: 0 auto 5rem;
  text-align: center;
  position: relative;
  z-index: 10;
}

.tourism-intro p {
  font-size: 1.5rem;
  line-height: 2;
  color: var(--sand-light);
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.6) 0%, rgba(42, 36, 22, 0.6) 100%);
  padding: 2.5rem 3rem;
  border-radius: 20px;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.tourism-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 3rem;
  position: relative;
  z-index: 10;
}

.tourism-card {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.85) 0%, rgba(42, 36, 22, 0.85) 100%);
  border: 3px solid var(--gold-primary);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s ease;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.tourism-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(212, 175, 55, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.tourism-card:hover::before {
  opacity: 1;
}

.tourism-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--gold-light);
  box-shadow: 0 25px 60px rgba(212, 175, 55, 0.4),
              0 0 50px rgba(212, 175, 55, 0.3);
}

.tourism-image {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.tourism-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.tourism-card:hover .tourism-image img {
  transform: scale(1.15);
}

.tourism-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 17, 40, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}

.tourism-overlay i {
  font-size: 5rem;
  color: var(--gold-primary);
  opacity: 0.3;
  transition: all 0.5s ease;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
}

.tourism-card:hover .tourism-overlay i {
  opacity: 0.8;
  transform: scale(1.3) rotate(10deg);
}

.tourism-content {
  padding: 2.5rem;
  position: relative;
  z-index: 2;
}

.tourism-content h3 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tourism-content h3 i {
  color: var(--gold-primary);
  font-size: 1.5rem;
}

.tourism-content p {
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--sand-light);
  margin-bottom: 2rem;
  text-align: justify;
}

.tourism-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tourism-highlights span {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.05rem;
  color: var(--gold-light);
  padding: 0.8rem 1.2rem;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 10px;
  border-right: 3px solid var(--gold-primary);
  transition: all 0.3s ease;
}

.tourism-highlights span:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: translateX(-5px);
}

.tourism-highlights span i {
  color: var(--gold-primary);
  font-size: 0.9rem;
}

.site-footer {
  background: linear-gradient(180deg, var(--stone-darker) 0%, var(--night-sky) 100%);
  padding: 4rem 0 2rem;
  border-top: 3px solid var(--gold-primary);
  position: relative;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-divider {
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-primary) 50%, transparent 100%);
  margin: 0 auto 2rem;
}

.footer-text {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.footer-text i {
  margin: 0 1rem;
  color: var(--gold-primary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-link {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 100%);
  border-radius: 50%;
  color: var(--stone-darker);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid var(--gold-light);
}

.footer-link:hover {
  transform: scale(1.2) rotate(15deg);
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.6);
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .typing-text {
    font-size: 1.3rem;
  }

  .pharaoh-character-img {
    max-width: 220px;
  }

  .pharaoh-icon {
    font-size: 4rem;
  }

  .content-section {
    padding: 5rem 0;
  }

  .arts-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .audio-control {
    width: 50px;
    height: 50px;
    top: 1rem;
    left: 1rem;
  }

  .audio-control i {
    font-size: 1.2rem;
  }

  .tourism-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .tourism-intro p {
    font-size: 1.2rem;
    padding: 2rem;
  }

  .tourism-content h3 {
    font-size: 1.6rem;
  }

  .tourism-content p {
    font-size: 1.05rem;
  }

  .tourism-image {
    height: 220px;
  }

  .tourism-highlights span {
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
