/* ============================================================
   Pandaz Apps — pandaz.work
   Shared stylesheet
   ============================================================ */

/* ----- Reset & Base ----- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background-color: #fafafa;
  line-height: 1.6;
  padding-top: 60px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #2d5016;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #4a7c2e;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* ----- Utility Container ----- */

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ============================================================
   Navbar
   ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  min-height: 60px;
  display: flex;
  align-items: center;
  padding-block: 0.5rem;
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.navbar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.navbar .lang-switcher {
  margin-inline-start: auto;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #2d5016;
  line-height: 1;
}

.navbar-logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
  width: 100%;
  justify-content: flex-end;
  padding-block-start: 0.375rem;
}

.nav-links li {
  flex-shrink: 0;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #555;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #2d5016;
}

/* ----- Language Switcher ----- */

.lang-switcher {
  position: relative;
}

.lang-switcher select,
.lang-switcher option {
  appearance: none;
  -webkit-appearance: none;
  background-color: #e8f5e9;
  color: #2d5016;
  border: 1px solid #c8e6c9;
  border-radius: 6px;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-switcher option {
  padding: 0.375rem 0.75rem;
}

.lang-switcher select:hover {
  border-color: #4a7c2e;
}

.lang-switcher select:focus {
  border-color: #2d5016;
  box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.15);
}

.lang-switcher::after {
  content: "";
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #2d5016;
  pointer-events: none;
}

/* ============================================================
   Hero Section
   ============================================================ */

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: start;
  min-height: 420px;
  padding: 6rem 1.25rem 4rem;
  background: linear-gradient(135deg, #2d5016 0%, #4a7c2e 50%, #3a6622 100%);
  color: #fff;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 30% 60%,
    rgba(232, 245, 233, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  text-align: center;
}

.hero-tagline {
  text-align: start;
}

@media (min-width: 600px) {
  .hero-tagline {
    text-align: center;
  }
}

.hero-section p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.hero-section .app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin-inline: auto;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   Section (generic content section)
   ============================================================ */

.section {
  padding: 4rem 0;
}

.section .container {
  max-width: 1100px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d5016;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2.5rem;
}

.section--alt {
  background-color: #f2f7f0;
}

/* ============================================================
   About Section
   ============================================================ */

.about-text {
  max-width: 720px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #444;
}

/* ============================================================
   App Cards
   ============================================================ */

.app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(45, 80, 22, 0.1);
}

.app-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.app-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2d5016;
  margin-bottom: 0.5rem;
}

.app-card p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.6;
  flex: 1;
}

.app-card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a7c2e;
  transition: color 0.2s ease;
}

.app-card-link:hover {
  color: #2d5016;
}

/* ============================================================
   Highlights Grid (app landing page)
   ============================================================ */

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.highlight-item {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.25s ease;
}

.highlight-item:hover {
  box-shadow: 0 4px 16px rgba(45, 80, 22, 0.08);
}

.highlight-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2d5016;
  margin-bottom: 0.375rem;
}

.highlight-item p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.55;
}

/* ============================================================
   Media Coverage
   ============================================================ */

.media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.media-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
  transition: box-shadow 0.25s ease;
}

.media-item:hover {
  box-shadow: 0 4px 16px rgba(45, 80, 22, 0.08);
}

.media-item-date {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background-color: #e8f5e9;
  color: #2d5016;
  font-weight: 700;
  line-height: 1.2;
}

.media-item-date .date-month {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.media-item-date .date-day {
  font-size: 1.125rem;
}

.media-item-body {
  flex: 1;
  min-width: 0;
}

.media-item-body h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.media-item-body p {
  font-size: 0.8125rem;
  color: #777;
  line-height: 1.5;
}

.media-item-source {
  font-size: 0.75rem;
  color: #4a7c2e;
  font-weight: 600;
  margin-top: 0.375rem;
  display: inline-block;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease,
    box-shadow 0.2s ease;
}

.btn-primary {
  background-color: #2d5016;
  color: #fff;
}

.btn-primary:hover {
  background-color: #3a6622;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: #e8f5e9;
  color: #2d5016;
}

.btn-secondary:hover {
  background-color: #d5ead6;
  color: #2d5016;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.1);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ============================================================
   Store Badge (Google Play)
   ============================================================ */

.store-badge {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge img {
  height: 52px;
  width: auto;
}

.store-badge:hover {
  transform: scale(1.04);
  opacity: 0.9;
}

/* ============================================================
   Features Layout (sidebar + content)
   ============================================================ */

.features-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  min-height: 420px;
}

/* Feature dropdown (mobile) */

.features-dropdown {
  display: none;
}

.features-dropdown select,
.features-dropdown option {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: #e8f5e9;
  color: #2d5016;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232d5016' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

[dir="rtl"] .features-dropdown select {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background-position: left 0.75rem center;
}

/* Sidebar */

.features-sidebar {
  flex-shrink: 0;
  width: 280px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.5rem 0;
  position: sticky;
  top: 80px;
}

.features-sidebar .feature-tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #555;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease;
  line-height: 1.4;
}

.features-sidebar .feature-tab:hover {
  color: #2d5016;
  background-color: #f6faf4;
}

.features-sidebar .feature-tab.active {
  color: #2d5016;
  font-weight: 600;
  background-color: #e8f5e9;
  border-left-color: #2d5016;
}

/* Content panels */

.features-content {
  flex: 1;
  min-width: 0;
}

.feature-content-panel {
  display: none;
  animation: featureFadeIn 0.3s ease;
}

.feature-content-panel.active {
  display: block;
}

@keyframes featureFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-content-panel h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d5016;
  margin-bottom: 0.75rem;
}

.feature-content-panel p {
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.feature-content-panel img {
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.feature-content-panel ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.feature-content-panel ul li {
  list-style: disc;
  font-size: 0.9375rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 0.25rem;
}

/* ============================================================
   Privacy Policy Content
   ============================================================ */

.privacy-content {
  max-width: 760px;
  margin-inline: auto;
  padding: 3rem 1.25rem 4rem;
  font-size: 1rem;
  color: #444;
  line-height: 1.8;
}

.privacy-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #2d5016;
  margin-bottom: 0.5rem;
}

.privacy-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #333;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.privacy-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.privacy-content p {
  margin-bottom: 1rem;
}

.privacy-content ul,
.privacy-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.privacy-content ul li {
  list-style: disc;
  margin-bottom: 0.375rem;
}

.privacy-content ol li {
  list-style: decimal;
  margin-bottom: 0.375rem;
}

.privacy-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-content .last-updated {
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 2rem;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background-color: #2d5016;
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 0;
  font-size: 0.875rem;
  text-align: center;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-copy {
  opacity: 0.7;
}

/* ============================================================
   RTL Support
   ============================================================ */

[dir="rtl"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
}

[dir="rtl"] .features-sidebar .feature-tab {
  text-align: right;
  border-left: none;
  border-right: 3px solid transparent;
}

[dir="rtl"] .features-sidebar .feature-tab.active {
  border-right-color: #2d5016;
}

[dir="rtl"] .lang-switcher::after {
  right: auto;
  left: 0.625rem;
}

[dir="rtl"] .lang-switcher select {
  padding: 0.375rem 0.75rem 0.375rem 2rem;
}

[dir="rtl"] .feature-content-panel ul,
[dir="rtl"] .privacy-content ul,
[dir="rtl"] .privacy-content ol {
  padding-left: 0;
  padding-right: 1.5rem;
}

[dir="rtl"] .media-item {
  flex-direction: row-reverse;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablets and small desktops */
@media (max-width: 960px) {
  .features-layout {
    flex-direction: column;
  }

  .features-dropdown {
    display: block;
    margin-bottom: 1rem;
  }

  .features-sidebar {
    display: none;
  }

}

/* Tablets portrait */
@media (max-width: 768px) {
  .hero-section {
    min-height: 340px;
    padding: 5rem 1.25rem 3rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .media-list {
    grid-template-columns: 1fr;
  }

  .highlights-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .hero-section {
    min-height: 280px;
    padding: 4.5rem 1rem 2.5rem;
  }

  .hero-section h1 {
    font-size: 1.625rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .section {
    padding: 2.25rem 0;
  }

  .app-cards {
    grid-template-columns: 1fr;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }

  .privacy-content {
    padding: 2rem 1rem 3rem;
  }

  .privacy-content h1 {
    font-size: 1.625rem;
  }
}

/* ============================================================
   Print
   ============================================================ */

@media print {
  .navbar,
  .lang-switcher,
  .store-badge,
  .footer {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .hero-section {
    background: none;
    color: #000;
    min-height: auto;
    padding: 1rem 0;
  }

  .section {
    padding: 1rem 0;
  }

  .app-card,
  .media-item,
  .highlight-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .features-layout {
    display: block;
  }

  .features-sidebar {
    display: none;
  }

  .feature-content-panel {
    display: block;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
