/* ==========================================================================
   TEDxEmiratesHills — Official Main Website Stylesheet
   Pixel-Perfect Static Reproduction of tedxemirateshills.com
   ========================================================================== */

:root {
  --color-primary: #eb0028;
  --color-primary-dark: #b8001f;
  --color-black: #000000;
  --color-dark: #111115;
  --color-grey-dark: #1f1f25;
  --color-white: #ffffff;
  --color-text-dark: #222222;
  --color-text-muted: #666666;
  --color-text-light: #e0e0e0;
  
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --transition: all 0.3s ease;
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-white);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  background-color: var(--color-black);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  height: 52px;
  width: auto;
}

.preloader-sub {
  color: #ffffff;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.preloader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(235, 0, 40, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: var(--color-black);
  z-index: 1000;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.brand-wrap {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 44px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-dot {
  color: #555555;
  font-size: 0.75rem;
  user-select: none;
}

/* Editions Dropdown Pill Button */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.editions-pill-btn {
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 22px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.editions-pill-btn:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.editions-pill-btn svg {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .editions-pill-btn svg {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background-color: #1a1a20;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 18px;
  color: #e0e0e0;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  padding-left: 22px;
}

.dropdown-item.featured {
  color: var(--color-primary);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item.featured:hover {
  color: #ffffff;
}

/* Mobile Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION (SLIDESHOW OF REAL EVENT PHOTOS)
   ========================================================================== */
.hero-section {
  position: relative;
  margin-top: 80px;
  height: calc(100vh - 140px);
  min-height: 520px;
  max-height: 820px;
  overflow: hidden;
  background-color: var(--color-black);
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-slide.active {
  opacity: 1;
}

/* Hero Bottom Bar */
.hero-bottom-bar {
  position: relative;
  width: 100%;
  background: #000000;
  color: #ffffff;
  text-align: center;
  padding: 16px 20px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   SECTIONS & TYPOGRAPHY
   ========================================================================== */
.section-white {
  background-color: var(--color-white);
  color: var(--color-text-dark);
  padding: 60px 0;
}

.section-black {
  background-color: var(--color-black);
  color: #ffffff;
  padding: 70px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.section-title.text-red {
  color: var(--color-primary);
}

.title-red {
  color: var(--color-primary);
}

.title-dark {
  color: #111115;
}

/* Tribal Divider Ornament */
.tribal-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto 40px;
  width: 100%;
  max-width: 220px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid meet' height='100%25' viewBox='0 0 121 26' fill='%23eb0028'%3E%3Cpath d='M29.6,10.3l2.1,2.2l-3.6,3.3h7v2.9h-7l3.6,3.5l-2.1,1.7l-5.2-5.2h-5.8v-2.9h5.8L29.6,10.3z M70.9,9.6l2.1,1.7l-3.6,3.5h7v2.9h-7l3.6,3.3l-2.1,2.2l-5.2-5.5h-5.8v-2.9h5.8L70.9,9.6z M111.5,9.6l2.1,1.7l-3.6,3.5h7v2.9h-7l3.6,3.3l-2.1,2.2l-5.2-5.5h-5.8v-2.9h5.8L111.5,9.6z M50.2,2.7l2.1,1.7l-3.6,3.5h7v2.9h-7l3.6,3.3l-2.1,2.2L45,10.7h-5.8V7.9H45L50.2,2.7z M11,2l2.1,1.7L9.6,7.2h7V10h-7l3.6,3.3L11,15.5L5.8,10H0V7.2h5.8L11,2z M91.5,2l2.1,2.2l-3.6,3.3h7v2.9h-7l3.6,3.5l-2.1,1.7l-5.2-5.2h-5.8V7.5h5.8L91.5,2z'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  background-size: contain;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-meta {
  text-align: center;
  margin-bottom: 2rem;
}

.about-meta p {
  font-weight: 700;
  font-size: 1.05rem;
  color: #111115;
  margin-bottom: 4px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: #333333;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about-text h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111115;
  margin: 1.5rem 0 0.75rem;
}

.about-visuals {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-img {
  border-radius: 14px;
  width: 100%;
  object-fit: cover;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.about-img-caption {
  text-align: center;
  color: #555555;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   SPEAKERS GRID
   ========================================================================== */
.speakers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1.75rem;
}

.speaker-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.speaker-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.speaker-card:hover .speaker-avatar {
  transform: scale(1.04);
}

.speaker-info {
  flex: 1;
}

.speaker-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111115;
  margin-bottom: 4px;
  line-height: 1.3;
}

.speaker-role {
  font-size: 0.85rem;
  font-style: italic;
  color: #666666;
  line-height: 1.4;
}

/* ==========================================================================
   GUEST & PERFORMERS
   ========================================================================== */
.guest-wrap {
  display: flex;
  justify-content: center;
}

.guest-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 450px;
}

.guest-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.performers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1.75rem;
}

.performer-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* ==========================================================================
   PARTNERS & SPONSORS
   ========================================================================== */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
  align-items: center;
  justify-items: center;
  padding: 10px 0;
}

.partner-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 90px;
  padding: 10px;
}

.partner-logo {
  max-height: 75px;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.partner-logo:hover {
  transform: scale(1.06);
}

/* ==========================================================================
   CORE TEAM
   ========================================================================== */
.team-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 280px;
}

/* ==========================================================================
   TICKETS & REGISTRATION
   ========================================================================== */
.registration-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.ticket-stamp-img {
  max-width: 520px;
  width: 100%;
  margin: 0 auto 1.5rem;
}

.btn-book-seat {
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 44px;
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 15px rgba(235, 0, 40, 0.3);
  transition: var(--transition);
}

.btn-book-seat:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(235, 0, 40, 0.4);
}

.registration-text p {
  color: #333333;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ==========================================================================
   MAP SECTION
   ========================================================================== */
.map-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.map-frame {
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.map-caption {
  text-align: center;
  color: #555555;
  font-weight: 600;
  margin-top: 0.75rem;
}

/* ==========================================================================
   ABOUT TEDx & ABOUT TED (BLACK SECTIONS)
   ========================================================================== */
.about-tedx-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-tedx-text h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.about-tedx-text p {
  color: #d1d5db;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.btn-know-more {
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 6px;
  display: inline-block;
  transition: var(--transition);
}

.btn-know-more:hover {
  background-color: var(--color-primary-dark);
}

.about-tedx-img {
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.about-ted-wrap {
  max-width: 950px;
  margin: 0 auto;
  text-align: center;
}

.about-ted-wrap h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.about-ted-wrap p {
  color: #d1d5db;
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  text-align: justify;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--color-black);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 0 25px;
  color: #cccccc;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  height: 48px;
  margin-bottom: 0.75rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-col p {
  font-size: 0.9rem;
  color: #aaaaaa;
  line-height: 1.6;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  margin-top: 6px;
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #888888;
}

.footer-bottom a {
  color: var(--color-primary);
  font-weight: 600;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   MEDIA GALLERY (media.html)
   ========================================================================== */
.media-hero {
  padding: 120px 0 40px;
  background-color: var(--color-black);
  text-align: center;
  color: #ffffff;
}

.media-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.media-hero p {
  color: #aaaaaa;
  font-size: 1.05rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 40px 0 80px;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: #f0f0f0;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-thumb {
  transform: scale(1.06);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: var(--color-primary);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .speakers-grid,
  .performers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .about-grid,
  .about-tedx-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: #000000;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .main-nav.open {
    display: flex;
  }
  
  .nav-dot {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .speakers-grid,
  .performers-grid,
  .partners-grid {
    grid-template-columns: 1fr;
  }
  
  .team-grid {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .hero-section {
    height: 420px;
  }
  
  .hero-bottom-bar {
    font-size: 0.95rem;
  }
}
