/* ============================================================
   AL GHAZALEEN TEA — SHARED PAGE STYLES
   Used by: about, history, products, gallery pages
   ============================================================ */

/* === PAGE BASE === */
.page-body {
  background: #ffffff;
  color: #000000;
  font-family: 'Cormorant Garamond', Garamond, serif;
  overflow-x: hidden;
  min-height: 100vh;
}

.page-body.rtl {
  direction: rtl;
  font-family: 'Tajawal', sans-serif;
}

/* === SHARED HEADER === */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 5vw;
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header .header-logo img {
  display: block;
  height: 50px;
  width: auto;
}

.page-nav {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.page-nav a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.rtl .page-nav a {
  font-family: 'Tajawal', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
}

.page-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #b22924;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rtl .page-nav a::after {
  left: auto;
  right: 0;
}

.page-nav a:hover::after,
.page-nav a.active::after {
  width: 100%;
}

.page-nav a:hover,
.page-nav a.active {
  color: #b22924;
}

/* Language Toggle */
.lang-toggle {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: #fff;
  background: #b22924;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.lang-toggle:hover {
  background: #8a1e1b;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #000;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* === PAGE HERO BANNER === */
.page-hero {
  padding: 10rem 5vw 5rem;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fecc18, #b22924, #fecc18, transparent);
}

.page-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  color: #000;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.rtl .page-hero h1 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
}

.page-hero .subtitle {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  color: #32373c;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.rtl .page-hero .subtitle {
  font-family: 'Tajawal', sans-serif;
}

/* === CONTENT SECTIONS === */
.content-section {
  padding: 5rem 5vw;
  max-width: 1400px;
  margin: 0 auto;
}

.content-section.alt-bg {
  background: #fafafa;
  max-width: 100%;
  padding: 5rem calc((100% - 1400px) / 2 + 5vw);
}

.content-section.red-bg {
  background: #b22924;
  color: #fff;
  max-width: 100%;
  padding: 5rem calc((100% - 1400px) / 2 + 5vw);
}

.content-section.red-bg h2,
.content-section.red-bg p {
  color: #fff;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: #000;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.rtl .section-title {
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
}

.section-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b22924;
  margin-bottom: 0.75rem;
}

.rtl .section-subtitle {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0.05em;
  text-transform: none;
}

.section-text {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.8;
  color: #32373c;
  max-width: 800px;
}

.rtl .section-text {
  font-family: 'Tajawal', sans-serif;
}

/* === SPLIT LAYOUT (image + text) === */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-row.reverse {
  direction: rtl;
}

.split-row.reverse > * {
  direction: ltr;
}

.rtl .split-row.reverse {
  direction: ltr;
}

.rtl .split-row.reverse > * {
  direction: rtl;
}

.split-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* === STATS BAR === */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  padding: 3rem 0;
}

.stats-bar .stat-item {
  text-align: center;
}

.stats-bar .stat-value {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: #b22924;
  line-height: 1;
}

.stats-bar .stat-label {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #abb8c3;
  margin-top: 0.5rem;
}

.rtl .stats-bar .stat-label {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

/* === DID YOU KNOW CAROUSEL === */
.dyk-section {
  background: #b22924;
  padding: 4rem 5vw;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.dyk-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: #fecc18;
  margin-bottom: 2rem;
}

.rtl .dyk-section h2 {
  font-family: 'Tajawal', sans-serif;
}

.dyk-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.dyk-item {
  min-width: 100%;
  padding: 2rem;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.5;
}

.rtl .dyk-item {
  font-family: 'Tajawal', sans-serif;
}

.dyk-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.dyk-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fecc18;
  background: transparent;
  color: #fecc18;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dyk-nav button:hover {
  background: #fecc18;
  color: #b22924;
}

/* === PRODUCT GRID === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(178, 41, 36, 0.12);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-image img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.08);
}

.product-card-body {
  padding: 1.25rem;
}

.product-card-category {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b22924;
  margin-bottom: 0.4rem;
}

.rtl .product-card-category {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
  font-size: 0.8rem;
}

.product-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.rtl .product-card-name {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
}

.product-card-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.filter-tab {
  padding: 0.6rem 1.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid #e0e0e0;
  background: transparent;
  color: #32373c;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rtl .filter-tab {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}

.filter-tab:hover,
.filter-tab.active {
  border-color: #b22924;
  background: #b22924;
  color: #fff;
}

/* === TIMELINE — vertical single-column (same on all screens) === */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 0 2rem 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #fecc18, #b22924, #fecc18);
  border-radius: 2px;
}

.rtl .timeline {
  padding: 2rem 40px 2rem 0;
}

.rtl .timeline::before {
  left: auto;
  right: 15px;
}

.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 2rem;
}

.rtl .timeline-item {
  padding: 0 2rem 2.5rem 0;
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 0.5rem;
  width: 18px;
  height: 18px;
  background: #b22924;
  border: 3px solid #fecc18;
  border-radius: 50%;
  z-index: 2;
}

.rtl .timeline-dot {
  left: auto;
  right: -33px;
}

.timeline-content {
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-left: 3px solid #b22924;
}

.rtl .timeline-content {
  border-left: none;
  border-right: 3px solid #b22924;
}

.timeline-year {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #b22924;
  margin-bottom: 0.4rem;
}

.rtl .timeline-year {
  font-family: 'Tajawal', sans-serif;
}

.timeline-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.4rem;
}

.rtl .timeline-heading {
  font-family: 'Tajawal', sans-serif;
}

.timeline-text {
  font-size: 0.95rem;
  color: #32373c;
  line-height: 1.6;
}

.rtl .timeline-text {
  font-family: 'Tajawal', sans-serif;
}

/* === GALLERY GRID === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(178, 41, 36, 0.4));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* === FOOTER === */
.page-footer {
  background: #1a1a1a;
  color: #fff;
  padding: 4rem 5vw 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
}

.footer-col h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #fecc18;
}

.rtl .footer-col h3 {
  font-family: 'Tajawal', sans-serif;
}

.footer-col p,
.footer-col a {
  font-size: 0.95rem;
  color: #abb8c3;
  line-height: 1.8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: #fecc18;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #b22924;
  border-color: #b22924;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #666;
  font-size: 0.85rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .page-nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .page-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    gap: 1.2rem;
  }

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

  .split-row.reverse {
    direction: ltr;
  }

  .rtl .split-row.reverse {
    direction: rtl;
  }

  .stats-bar {
    gap: 2rem;
  }

  /* Timeline is already single-column — no mobile override needed */

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

  .page-hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    gap: 0.5rem;
  }

  .filter-tab {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
}

/* ============================================================
   MEDIA GRID (replaces gallery-grid for media page)
   ============================================================ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.media-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.media-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(178, 41, 36, 0.1);
}

.media-card-image {
  aspect-ratio: 16 / 9;
  background: #fafafa;
  overflow: hidden;
  position: relative;
}

.media-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card-embed {
  aspect-ratio: 16 / 9;
}

.media-card-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.media-card-body {
  padding: 1.25rem;
}

.media-card-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.rtl .media-card-type {
  font-family: 'Tajawal', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.type-media {
  background: #b22924;
  color: #fff;
}

.type-blog {
  background: #fecc18;
  color: #000;
}

.type-press {
  background: #32373c;
  color: #fff;
}

.media-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.rtl .media-card-title {
  font-family: 'Tajawal', sans-serif;
}

.media-card-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.rtl .media-card-desc {
  font-family: 'Tajawal', sans-serif;
}

.media-card-date {
  font-size: 0.8rem;
  color: #abb8c3;
  margin-top: 0.5rem;
}

.rtl .media-card-date {
  font-family: 'Tajawal', sans-serif;
}

@media (max-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 480px) {
  .media-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   POPUP OVERLAY
   ============================================================ */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.popup-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.popup-card {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup-overlay.show .popup-card {
  transform: scale(1);
}

.popup-card img {
  width: 100%;
  display: block;
}

.popup-body {
  padding: 2rem;
  text-align: center;
}

.popup-body h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.rtl .popup-body h3 {
  font-family: 'Tajawal', sans-serif;
}

.popup-body p {
  color: #666;
  margin-bottom: 1.5rem;
}

.rtl .popup-body p {
  font-family: 'Tajawal', sans-serif;
}

.popup-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #b22924;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.3s ease;
}

.popup-btn:hover {
  background: #8a1e1b;
}

.rtl .popup-btn {
  font-family: 'Tajawal', sans-serif;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.popup-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* ============================================================
   SOCIAL FEED PLACEHOLDER
   ============================================================ */
.social-feed {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 2rem 0;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #eee;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #000;
}

.social-card:hover {
  border-color: #b22924;
  transform: translateY(-2px);
}

.social-card svg {
  flex-shrink: 0;
}

.rtl .social-card {
  font-family: 'Tajawal', sans-serif;
}
