/* =============================================
   FINCAN - Design System & Core Styles
   ============================================= */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Primary Colors */
  --gold-accent: #C8A464;
  --gold-accent-rgb: 200, 164, 100;
  --espresso: #2F2622;
  --espresso-rgb: 47, 38, 34;

  /* Background Colors */
  --bg-light: #F5EFE6;
  --bg-dark: #2F2622;
  --card-bg-light: #FFFFFF;
  --card-bg-dark: #3C322E;

  /* Text Colors */
  --text-primary-light: #2F2622;
  --text-primary-dark: #F5EFE6;
  --text-secondary: #A08C83;
  --milky-coffee: #A08C83;
  --latte-foam: #F5EFE6;

  /* Theme Colors */
  --love-color: #E3667F;
  --career-color: #19647E;
  --health-color: #4CAF50;

  /* Spacing */
  --spacing-xxxs: 4px;
  --spacing-xxs: 8px;
  --spacing-xs: 12px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 40px;
  --spacing-xxl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 4px 20px rgba(200, 164, 100, 0.3);

  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.3s ease-out;
  --transition-slow: 0.5s ease-out;

  /* Default to dark theme (matches inline <style> in index.html) */
  --bg-primary: var(--bg-dark);
  --bg-card: var(--card-bg-dark);
  --text-primary: var(--text-primary-dark);
}

/* Hero Phone Theme Screenshots */
.hero-screen-light,
.hero-screen-dark,
.step-screen-light,
.step-screen-dark {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark screenshots visible, light hidden */
.hero-screen-light,
.step-screen-light { display: none; }
.hero-screen-dark,
.step-screen-dark { display: block; }

/* =============================================
   Base Reset & Typography
   ============================================= */

*,
*::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: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--gold-accent);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

/* =============================================
   Layout Components
   ============================================= */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xxl) 0;
}

/* =============================================
   Navigation
   ============================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--spacing-sm) 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(var(--espresso-rgb), 0.1);
  border-bottom: 1px solid rgba(var(--gold-accent-rgb), 0.1);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(var(--espresso-rgb), 0.85);
  box-shadow: var(--shadow-md);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo span {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo svg {
  width: 36px;
  height: 36px;
  fill: var(--gold-accent);
}

/* App Icon Gold Border */
.app-icon-border {
  border: 2px solid var(--gold-accent);
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(200, 164, 100, 0.3);
}

/* Download Button in Nav */
.nav-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #D4AF37 0%, #C8A464 100%);
  color: #2F2622 !important;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(200, 164, 100, 0.3);
}

.nav-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 164, 100, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: var(--spacing-xxs) var(--spacing-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--gold-accent);
  opacity: 1;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xxs);
  background: rgba(var(--gold-accent-rgb), 0.1);
  border: 1px solid rgba(var(--gold-accent-rgb), 0.2);
  border-radius: var(--radius-sm);
  padding: var(--spacing-xxs) var(--spacing-xs);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  background: rgba(var(--gold-accent-rgb), 0.2);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + var(--spacing-xxs));
  right: 0;
  background: var(--bg-card);
  border: 1px solid rgba(var(--gold-accent-rgb), 0.15);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  padding: var(--spacing-xxs);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 9999;
}

.lang-selector:hover .lang-dropdown,
.lang-selector:focus-within .lang-dropdown,
.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  width: 100%;
  padding: var(--spacing-xxs) var(--spacing-sm);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.lang-option:hover {
  background: rgba(var(--gold-accent-rgb), 0.1);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xxs);
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1512;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: var(--spacing-lg);
    z-index: 9999;
    display: none;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
    display: block;
    text-align: center;
    color: var(--text-primary);
  }

  .nav-links .nav-download-btn {
    margin-top: 0.5rem;
  }

  /* Mobile controls — visible on mobile, hidden on desktop */
  .mobile-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
  }
}

@media (min-width: 769px) {
  .mobile-controls {
    display: none !important;
  }
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xxs);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--gold-accent);
  color: var(--espresso);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200, 164, 100, 0.4);
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(var(--gold-accent-rgb), 0.3);
}

.btn-secondary:hover {
  border-color: var(--gold-accent);
  background: rgba(var(--gold-accent-rgb), 0.1);
  opacity: 1;
}

.btn-glass {
  background: rgba(var(--gold-accent-rgb), 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid rgba(var(--gold-accent-rgb), 0.2);
}

.btn-glass:hover {
  background: rgba(var(--gold-accent-rgb), 0.2);
  opacity: 1;
}

.btn-large {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 1.1rem;
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* =============================================
   Cards
   ============================================= */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-glass {
  background: rgba(var(--gold-accent-rgb), 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--gold-accent-rgb), 0.1);
}

/* =============================================
   Form Elements
   ============================================= */

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xxs);
}

.form-input {
  width: 100%;
  padding: var(--spacing-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: rgba(var(--espresso-rgb), 0.05);
  border: 1px solid rgba(var(--gold-accent-rgb), 0.2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(var(--gold-accent-rgb), 0.1);
}

.form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.form-input.error {
  border-color: var(--love-color);
}

.form-error {
  color: var(--love-color);
  font-size: 0.85rem;
  margin-top: var(--spacing-xxxs);
}

/* =============================================
   Hero Section
   ============================================= */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-content {
  text-align: center;
  z-index: 10;
  max-width: 800px;
  padding: var(--spacing-md);
}

.hero-icon {
  font-size: 5rem;
  color: var(--gold-accent);
  margin-bottom: var(--spacing-md);
  filter: drop-shadow(0 0 30px rgba(var(--gold-accent-rgb), 0.5));
}

.hero-title {
  margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
}

/* =============================================
   Features Section
   ============================================= */

.features {
  background: linear-gradient(180deg, transparent 0%, rgba(var(--gold-accent-rgb), 0.03) 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.feature-card {
  text-align: center;
  padding: var(--spacing-lg);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--gold-accent-rgb), 0.1);
  border-radius: var(--radius-lg);
  color: var(--gold-accent);
  font-size: 1.75rem;
}

.feature-title {
  margin-bottom: var(--spacing-xs);
}

.feature-desc {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* =============================================
   Download Section
   ============================================= */

.download {
  text-align: center;
}

.download-badge {
  display: inline-block;
  margin-top: var(--spacing-lg);
  transition: transform var(--transition-fast);
}

.download-badge:hover {
  transform: scale(1.05);
}

.download-badge img {
  height: 54px;
  width: auto;
}

/* =============================================
   Footer
   ============================================= */

.footer {
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  border-top: 1px solid rgba(var(--gold-accent-rgb), 0.1);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-logo--with-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.footer-brand-divider {
  display: inline-block;
  width: 1px;
  height: 24px;
  margin: 0 0.5rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(var(--gold-accent-rgb), 0.6) 50%,
    transparent 100%
  );
}

.tanzi-mark {
  display: inline-block;
  height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
  vertical-align: middle;
  transition: opacity var(--transition-fast);
}

.tanzi-mark:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .tanzi-mark {
    height: 24px;
  }
  .footer-brand-divider {
    height: 20px;
    margin: 0 0.35rem;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold-accent);
  opacity: 1;
}

.footer-copyright {
  width: 100%;
  text-align: center;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(var(--gold-accent-rgb), 0.1);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* =============================================
   Auth Pages
   ============================================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.auth-icon {
  font-size: 4rem;
  color: var(--gold-accent);
  margin-bottom: var(--spacing-md);
}

.auth-card {
  padding: var(--spacing-lg);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-md) 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(var(--gold-accent-rgb), 0.2);
}

.auth-footer {
  text-align: center;
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* =============================================
   User Dashboard (After Login)
   ============================================= */

.dashboard {
  padding-top: 100px;
  min-height: 100vh;
}

.user-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--gold-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--espresso);
}

.user-info h2 {
  margin-bottom: var(--spacing-xxxs);
}

.user-stats {
  display: flex;
  gap: var(--spacing-lg);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tabs {
  display: flex;
  gap: var(--spacing-sm);
  border-bottom: 1px solid rgba(var(--gold-accent-rgb), 0.2);
  margin-bottom: var(--spacing-lg);
}

.tab {
  padding: var(--spacing-sm) var(--spacing-md);
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  color: var(--gold-accent);
  border-bottom-color: var(--gold-accent);
}

.fortune-list {
  display: grid;
  gap: var(--spacing-md);
}

.fortune-card {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
}

.fortune-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xxs);
}

.fortune-preview {
  color: var(--text-primary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fortune-symbols {
  display: flex;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
  color: var(--gold-accent);
  font-size: 1.1rem;
}

.fortune-indicator {
  width: 4px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.fortune-indicator.love {
  background: var(--love-color);
}

.fortune-indicator.career {
  background: var(--career-color);
}

.fortune-indicator.health {
  background: var(--health-color);
}

.fortune-indicator.general {
  background: var(--gold-accent);
}

/* Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--spacing-md);
}

.badge-item {
  text-align: center;
  padding: var(--spacing-md);
}

.badge-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-sm);
  background: rgba(var(--gold-accent-rgb), 0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.badge-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.badge-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--spacing-xxxs);
}

.badge-locked {
  opacity: 0.4;
  filter: grayscale(1);
}

/* =============================================
   Legal Pages
   ============================================= */

.legal-page {
  padding-top: 100px;
  padding-bottom: var(--spacing-xxl);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: var(--spacing-lg);
}

.legal-content h2 {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.legal-content p {
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}

.legal-content ul {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

.legal-content li {
  margin-bottom: var(--spacing-xs);
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

/* =============================================
   Utility Classes
   ============================================= */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-gold {
  color: var(--gold-accent);
}

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

.text-secondary {
  color: var(--text-secondary);
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* Loading Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(var(--gold-accent-rgb), 0.2);
  border-top-color: var(--gold-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* =============================================
   Responsive Breakpoints
   ============================================= */

@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--spacing-xl) 0;
  }

  .hero {
    padding-top: 100px;
  }

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

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .user-header {
    flex-direction: column;
    text-align: center;
  }

  .user-stats {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .btn-large {
    width: 100%;
  }

  .hero-cta {
    flex-direction: column;
  }
}

/* RTL Support for Arabic */
[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .fortune-card {
  flex-direction: row-reverse;
}

/* =============================================
   BLOG — Premium Styling
   ============================================= */

/* Blog Layout */
.blog-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-top: 80px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    color: var(--text-secondary, #8B7B6E);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--gold-accent, #C8A464);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--gold-accent, #C8A464);
    text-decoration: underline;
}

.breadcrumb .sep {
    color: var(--text-secondary, #8B7B6E);
    opacity: 0.5;
}

/* Blog Hero */
.blog-hero {
    padding: 3rem 0 2rem;
    text-align: center;
}

.blog-hero .blog-category {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-accent, #C8A464);
    background: rgba(200, 164, 100, 0.1);
    border: 1px solid rgba(200, 164, 100, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.blog-hero h1 {
    font-family: 'Lora', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary, #F5E6D3) 0%, var(--gold-accent, #C8A464) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    color: var(--text-secondary, #8B7B6E);
    flex-wrap: wrap;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Featured Image */
.blog-featured-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 1.25rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color, rgba(200, 164, 100, 0.15));
}

/* Article Content */
.blog-article {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary, #C4B5A5);
}

.blog-article h2 {
    font-family: 'Lora', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary, #F5E6D3);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(200, 164, 100, 0.15);
}

.blog-article h3 {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #F5E6D3);
    margin: 2rem 0 0.75rem;
}

.blog-article p {
    margin-bottom: 1.25rem;
}

.blog-article ul,
.blog-article ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.blog-article li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.blog-article strong {
    color: var(--text-primary, #F5E6D3);
    font-weight: 600;
}

.blog-article a {
    color: var(--gold-accent, #C8A464);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.blog-article a:hover {
    color: var(--gold-accent, #C8A464);
}

.blog-article blockquote {
    border-left: 3px solid var(--gold-accent, #C8A464);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(200, 164, 100, 0.05);
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    color: var(--text-secondary, #C4B5A5);
}

/* Info Box */
.blog-info-box {
    background: var(--bg-card, rgba(200, 164, 100, 0.05));
    border: 1px solid rgba(200, 164, 100, 0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.blog-info-box h4 {
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gold-accent, #C8A464);
    margin-bottom: 0.75rem;
}

.blog-info-box p,
.blog-info-box ul {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* CTA Box */
.blog-cta {
    text-align: center;
    padding: 2.5rem 2rem;
    margin: 3rem 0;
    background: linear-gradient(135deg, rgba(200, 164, 100, 0.1) 0%, rgba(200, 164, 100, 0.02) 100%);
    border: 1px solid rgba(200, 164, 100, 0.2);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
}

.blog-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-accent, #C8A464), transparent);
}

.blog-cta h3 {
    font-family: 'Lora', serif;
    font-size: 1.35rem;
    color: var(--text-primary, #F5E6D3);
    margin-bottom: 0.75rem;
}

.blog-cta p {
    color: var(--text-secondary, #C4B5A5);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.blog-cta .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, var(--gold-accent, #C8A464) 0%, #A67C3D 100%);
    color: var(--bg-primary, #1a1512);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(200, 164, 100, 0.3);
}

.blog-cta .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 164, 100, 0.4);
}

/* Related Posts */
.related-posts {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color, rgba(200, 164, 100, 0.15));
}

.related-posts h3 {
    font-family: 'Lora', serif;
    font-size: 1.35rem;
    color: var(--text-primary, #F5E6D3);
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.related-card {
    background: var(--bg-card, rgba(200, 164, 100, 0.05));
    border: 1px solid var(--border-color, rgba(200, 164, 100, 0.15));
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(200, 164, 100, 0.35);
    box-shadow: 0 8px 24px rgba(200, 164, 100, 0.1);
}

.related-card h4 {
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #F5E6D3);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-card p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    color: var(--text-secondary, #8B7B6E);
    line-height: 1.5;
}

/* Blog Listing Page */
.blog-listing-hero {
    padding: 6rem 0 3rem;
    text-align: center;
    margin-top: 60px;
}

.blog-listing-hero h1 {
    font-family: 'Lora', serif;
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary, #F5E6D3) 0%, var(--gold-accent, #C8A464) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.blog-listing-hero p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    color: var(--text-secondary, #8B7B6E);
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.75rem;
    padding-bottom: 4rem;
}

.blog-card {
    background: var(--bg-card, rgba(200, 164, 100, 0.05));
    border: 1px solid var(--border-color, rgba(200, 164, 100, 0.15));
    border-radius: 1.25rem;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 164, 100, 0.35);
    box-shadow: 0 12px 40px rgba(200, 164, 100, 0.12);
}

.blog-card-body {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-accent, #C8A464);
    margin-bottom: 0.75rem;
}

.blog-card h2 {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary, #F5E6D3);
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.blog-card p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: var(--text-secondary, #8B7B6E);
    line-height: 1.6;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    color: var(--text-secondary, #8B7B6E);
}

.blog-card-read {
    color: var(--gold-accent, #C8A464);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Blog CTA — App Store Badge */
.blog-cta .store-button-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.blog-cta .app-store-badge {
    height: 44px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    transition: transform 0.3s, filter 0.3s;
}

.blog-cta .store-button-wrapper:hover .app-store-badge {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Blog Responsive */
@media (max-width: 768px) {
    .blog-container {
        padding: 0 1rem;
    }

    .blog-hero {
        padding: 2rem 0 1.5rem;
    }

    .blog-article {
        font-size: 0.98rem;
    }

    .blog-article h2 {
        font-size: 1.35rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .blog-cta {
        padding: 2rem 1.25rem;
    }
}

/* =============================================
   Smart App Banner — Mobile only
   Amazon-style top bar that promotes app download
   ============================================= */
.smart-app-banner {
  display: none; /* Desktop'ta gizli */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  background: var(--bg-dark, #2F2622);
  border-bottom: 1px solid rgba(var(--gold-accent-rgb, 200, 164, 100), 0.2);
  padding: 8px 12px;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.smart-app-banner .sab-close {
  background: none;
  border: none;
  color: var(--text-secondary, rgba(245, 240, 232, 0.6));
  font-size: 18px;
  padding: 4px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.smart-app-banner .sab-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.smart-app-banner .sab-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.smart-app-banner .sab-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #F5F0E8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-app-banner .sab-subtitle {
  font-size: 11px;
  color: var(--text-secondary, rgba(245, 240, 232, 0.6));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-app-banner .sab-cta {
  background: var(--gold-accent, #C8A464);
  color: var(--espresso, #2F2622);
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.2s;
}

.smart-app-banner .sab-cta:hover {
  opacity: 0.9;
}

/* Mobilde göster */
@media (max-width: 768px) {
  .smart-app-banner {
    display: flex;
  }

  /* Banner varken navbar ve içerik aşağı kaymalı */
  body.has-smart-banner .navbar {
    top: 56px;
  }

  body.has-smart-banner {
    padding-top: 56px;
  }
}

/* Banner kapatıldıysa gizle */
.smart-app-banner.hidden {
  display: none !important;
}