/* --- Variables --- */
:root {
  --primary: #F7931A;
  /* Bitcoin Orange */
  --secondary: #627EEA;
  /* Ethereum Blue */
  --accent: #00D395;
  /* Crypto Green (bullish) */
  --accent-red: #FF4757;
  /* Crypto Red (bearish) */
  --background: #0A0E27;
  /* Deep Dark Blue */
  --surface: #1A1F3A;
  /* Card Background */
  --text-main: #FFFFFF;
  /* White */
  --text-muted: #B8BCC8;
  /* Light Gray */
  --border: #2A2F4A;
  /* Subtle Border */

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

/* --- Reset & Global --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* --- Navigation --- */
.navbar {
  background: rgba(26, 31, 58, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.025em;
  text-shadow: 0 0 20px rgba(247, 147, 26, 0.3);
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  margin-bottom: 5px;
}

/* --- Main Layout --- */
.main-content {
  display: block;
  /* Remove grid for full width */
  width: 100%;
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}

/* --- Blog Content --- */
.section-header {
  margin-bottom: var(--spacing-md);
}

.section-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  /* Slightly wider for detailed content */
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.blog-card {
  background: rgba(26, 31, 58, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  height: 100%;
  padding: 1.25rem;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

/* Card Header Section */
.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.card-logo {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.card-title-group {
  flex: 1;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.card-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.2rem;
}

/* Content & Highlights */
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.feature-highlight {
  background: #00D395;
  /* Crypto Green */
  color: #0A0E27;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 500;
}

.feature-icon {
  color: #00D395;
  font-size: 0.9rem;
}

/* Action Buttons */
.card-actions {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.75rem;
}

.btn-details {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-details:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-earn {
  background: #1A1F3A;
  border: 1px solid var(--primary);
  color: white;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-earn:hover {
  background: var(--primary);
  box-shadow: 0 0 15px rgba(247, 147, 26, 0.4);
}

/* --- Pagination --- */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(26, 31, 58, 0.5);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(5px);
}

.pagination-btn {
  background: #1A1F3A;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s;
}

.pagination-btn:not(:disabled):hover {
  border-color: var(--primary);
  background: rgba(247, 147, 26, 0.1);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 0.5rem;
}

.page-num {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.page-num:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.page-num.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 10px rgba(247, 147, 26, 0.3);
}

/* --- Details Modal (White Theme) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.details-modal {
  background: #FFFFFF;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  overflow: hidden;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #333333;
  /* Dark text for white background */
}

.modal-overlay.active .details-modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.modal-logo {
  width: 64px;
  height: 64px;
  background: #F8F9FA;
  border-radius: 12px;
  padding: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.modal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-title-wrap {
  flex: 1;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1A1F3A;
  margin: 0;
}

.modal-badge {
  background: #F8F9FA;
  border: 1px solid #E9ECEF;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6C757D;
}

.modal-tagline {
  font-size: 0.85rem;
  color: #6C757D;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modal Content Grid */
.modal-content-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.modal-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #999999;
  letter-spacing: 1px;
}

.modal-highlight-bar {
  background: #D4FFC1;
  /* Light Green background */
  color: #2D6A4F;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.modal-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #444444;
}

.modal-currencies-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.currency-item {
  width: 44px;
  height: 44px;
  border: 1px solid #E9ECEF;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: #F8F9FA;
  transition: all 0.2s;
}

.currency-item:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

/* Modal Footer */
.modal-footer {
  display: flex;
  gap: 1rem;
}

.btn-modal-close {
  flex: 1;
  background: #F8F9FA;
  border: 1px solid #E9ECEF;
  color: #6C757D;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-close:hover {
  background: #E9ECEF;
  color: #333;
}

.btn-modal-action {
  flex: 2;
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-action:hover {
  background: #222;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* --- Sidebar & Widgets --- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  position: sticky;
  /* Optional: Keep sidebar visible while scrolling */
  top: 100px;
}

.widget {
  background: rgba(26, 31, 58, 0.7);
  backdrop-filter: blur(10px);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.widget h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  color: var(--primary);
}

.search-box {
  display: flex;
  gap: 0.5rem;
}

.search-box input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.search-box button {
  padding: 0.5rem 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.about-widget p {
  color: var(--secondary);
  font-size: 0.95rem;
}

.categories-list li {
  margin-bottom: 0.75rem;
}

.categories-list a {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.25rem 0;
}

.categories-list a:hover {
  color: var(--accent);
}

.categories-list span {
  background: var(--background);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  /* Pill shape */
  font-size: 0.75rem;
  color: var(--secondary);
}

/* --- AdSense Placeholders --- */
.ad-widget .ad-placeholder-300x250 {
  width: 100%;
  max-width: 300px;
  height: 250px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 1px dashed #cbd5e1;
}

.mock-ad p {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
}

.ad-label {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: #cbd5e1;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

/* --- Footer --- */
.footer {
  background: #050812;
  /* Darker than main background */
  color: #f8fafc;
  /* Slate 50 */
  padding-top: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid #334155;
}

.footer h3 {
  color: white;
  margin-bottom: 1.25rem;
}

.footer ul li {
  margin-bottom: 0.75rem;
}

.footer a {
  color: #94a3b8;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding: var(--spacing-md) 0;
  color: #64748b;
  font-size: 0.9rem;
}

/* --- Loading Spinner --- */
.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: var(--accent);
  animation: spin 1s linear infinite;
  margin: 2rem auto;
  grid-column: 1 / -1;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    /* Stack sidebar below content */
  }

  .sidebar {
    order: 2;
    /* Move sidebar to bottom (optional) */
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    /* Single column for blog cards */
  }

  .nav-links {
    display: none;
    /* Hide nav links on mobile (would need JS for toggle) */
  }

  .mobile-menu-btn {
    display: block;
    font-size: 1.5rem;
  }

  .section-header h1 {
    font-size: 2rem;
  }

  /* Mobile Article View */
  .article-title {
    font-size: 2rem;
  }
}

/* --- About Page Styles --- */
.about-page {
  display: block !important;
  /* Override generic main grid */
  max-width: 900px;
  margin: 0 auto;
  padding-top: var(--spacing-lg);
}

.about-hero {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.about-hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.about-hero .lead {
  font-size: 1.25rem;
  color: var(--secondary);
  max-width: 700px;
  margin: 0 auto;
}

.content-block {
  margin-bottom: var(--spacing-lg);
}

.content-block h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.content-block p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* About Grid (Categories) */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.about-card {
  background: var(--surface);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border);
}

.about-card i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.about-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.team-member {
  text-align: center;
}

.team-member img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-md);
}

.team-member h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.team-member span {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.social-mini a {
  color: var(--text-muted);
  margin: 0 0.25rem;
  font-size: 1.1rem;
}

.social-mini a:hover {
  color: var(--primary);
}

.contact-block {
  text-align: center;
  background: var(--surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contact-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.contact-btn:hover {
  background: var(--accent);
  color: white;
}


/* --- Related Articles --- */
.related-section {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
}

.related-section h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

/* Reusing blog-card styles but overriding for related context if needed */
.related-grid .blog-card {
  box-shadow: none;
  border: 1px solid var(--border);
}

.related-grid .card-image {
  height: 180px;
}

.related-grid .card-title {
  font-size: 1.25rem;
}

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Ad Banners --- */
.ad-banner-responsive {
  width: 100%;
  margin: 2rem 0;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  min-height: 100px;
  /* Placeholder height */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 500;
}

/* --- Contact Page --- */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.contact-card {
  background: var(--surface);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border);
}

.contact-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.contact-card a {
  color: var(--accent);
  text-decoration: underline;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form .contact-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.form-note {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
}

/* --- Page Loader --- */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.page-loader p {
  margin-top: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* --- Card Badge Styling --- */
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(247, 147, 26, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
}