/* === FX-FAQs Modern Theme === */

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --accent: #10b981;
  --dark-bg: #0f172a;
  --card-bg: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #cbd5e1;
  --radius: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --primary: #4f46e5;
    --dark-bg: #ffffff;
    --card-bg: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
}

/* === Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: var(--dark-bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--primary-dark);
}

/* === Navigation === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background-color: rgba(15, 23, 42, 0.9);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.logo-icon {
  font-size: 1.8rem;
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  position: relative;
  padding-bottom: 0.5rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 0.4rem;
}

.mobile-menu-btn span {
  width: 25px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* === Hero Section === */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4rem 2rem;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  opacity: 0.1;
  z-index: -1;
}

.hero-background::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--primary);
  border-radius: 50%;
  top: -100px;
  right: -100px;
  opacity: 0.1;
  filter: blur(100px);
}

.hero-content {
  text-align: center;
  max-width: 700px;
  z-index: 1;
  animation: slideUp 0.8s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.search-box {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.2);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  background: var(--primary);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* === Sections === */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
}

/* === Articles Grid === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
}

.article-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-8px);
}

.card-image {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text);
}

.card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: auto;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Article Card Links === */
.card-image-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-image-link:hover {
  text-decoration: none;
}

.card-title-link {
  text-decoration: none;
  color: inherit;
}

.card-title-link:hover {
  text-decoration: none;
  color: var(--primary);
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  display: inline-block;
  margin-top: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.read-more:hover {
  border-bottom-color: var(--primary);
  transform: translateX(4px);
}

/* === Back to Blog === */
.back-to-blog {
  max-width: 800px;
  margin: 2rem auto 0;
  padding: 0 2rem;
}

.back-link {
  display: inline-block;
  color: var(--primary);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.back-link:hover {
  border-bottom-color: var(--primary);
  transform: translateX(-4px);
}

/* === Post Page === */
.post-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.post-header {
  margin-bottom: 3rem;
}

.post-header-content {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-metadata {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-feature-image {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 500px;
}

.post-feature-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.post-body {
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 3rem;
}

.post-body h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
}

.post-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
}

.post-body p {
  margin-bottom: 1rem;
}

.post-body ul,
.post-body ol {
  margin: 1.5rem 0 1.5rem 2rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body a {
  border-bottom: 2px solid rgba(79, 70, 229, 0.3);
  padding-bottom: 2px;
  transition: var(--transition);
}

.post-body a:hover {
  border-bottom-color: var(--primary);
}

.post-body code {
  background: var(--card-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9em;
  color: var(--accent);
}

.post-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* === Related Posts === */
.related-posts {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 3rem 0;
}

.related-posts h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.related-card {
  background: var(--dark-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-card:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.related-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.related-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

/* === Post Navigation === */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.nav-prev,
.nav-next {
  flex: 1;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  display: block;
}

.nav-prev:hover,
.nav-next:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* === CTA Section === */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 4rem 2rem;
  text-align: center;
}

.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: white;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* === Footer === */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
}

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

.footer-section a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

/* === Animations === */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Responsive === */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }

  .navbar-menu.mobile-open {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

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

  .post-title {
    font-size: 1.8rem;
  }

  .post-navigation {
    flex-direction: column;
  }

  .section-title {
    font-size: 2rem;
  }

  .cta-content h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .navbar-container {
    padding: 0.75rem 1rem;
  }

  .hero {
    min-height: 400px;
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-container {
    padding: 2rem 1rem;
  }

  .post-container {
    padding: 2rem 1rem;
  }
}

/* === Google Ads Styles === */
.ad-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.ad-section ins.adsbygoogle {
  display: block !important;
  margin: 0 auto;
}

.ad-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 4px;
  align-self: flex-start;
}

/* Horizontal Banner Ads */
.ad-banner-top,
.ad-banner-bottom {
  margin: 3rem 0;
}

.ad-banner-top {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(16, 185, 129, 0.05));
}

/* Inline Article Ads */
.ad-inline {
  background: transparent;
  border: none;
  padding: 1.5rem 0;
  min-height: auto;
  margin: 2rem 0;
}

.ad-inline .ad-label {
  align-self: center;
}

/* Article Bottom Ads */
.ad-article-bottom {
  background: var(--card-bg);
  border: 1px solid var(--border);
  margin-top: 3rem;
  padding-bottom: 2rem;
}

/* Ad Responsive Sizing */
@media (max-width: 768px) {
  .ad-section {
    min-height: 200px;
    padding: 1rem;
  }

  .ad-banner-top,
  .ad-banner-bottom {
    margin: 1.5rem 0;
  }

  .ad-inline {
    margin: 1.5rem 0;
  }
}

@media (max-width: 480px) {
  .ad-section {
    min-height: 150px;
    padding: 0.75rem;
  }

  .ad-label {
    font-size: 0.7rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .post-navigation,
  .related-posts,
  .cta-section,
  .ad-section {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
