/* ============================================
   Finance Blog - Professional Styling
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1e40af;
  --secondary-color: #0f766e;
  --accent-color: #dc2626;
  --light-gray: #f8fafc;
  --medium-gray: #e2e8f0;
  --dark-gray: #475569;
  --text-color: #1e293b;
  --border-color: #cbd5e1;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #ffffff;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo:hover {
  opacity: 0.9;
}

nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
  font-size: 15px;
}

nav a:hover {
  opacity: 0.8;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .header-container {
    padding: 0 15px;
  }

  nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--primary-color);
    flex-direction: column;
    gap: 0;
    padding: 20px;
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .logo {
    font-size: 22px;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 50%, var(--secondary-color) 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.95;
  line-height: 1.5;
}

.cta-button {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 14px 36px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: 2px solid var(--accent-color);
  font-size: 16px;
  cursor: pointer;
}

.cta-button:hover {
  background: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.cta-secondary {
  background: transparent;
  margin-left: 15px;
}

.cta-secondary:hover {
  background: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 18px;
  }

  .cta-secondary {
    display: block;
    margin-left: 0;
    margin-top: 10px;
  }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  margin: 40px 0;
}

.main-content {
  flex: 1;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (max-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .sidebar {
    order: -1;
  }
}

/* ============================================
   BLOG GRID
   ============================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.blog-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.blog-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-4px);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.blog-card-content {
  padding: 20px;
}

.blog-category {
  display: inline-block;
  background: var(--light-gray);
  color: var(--secondary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.blog-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-color);
  line-height: 1.4;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--dark-gray);
  margin-bottom: 15px;
}

.blog-card p {
  font-size: 14px;
  color: var(--dark-gray);
  margin-bottom: 15px;
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.3s;
}

.read-more:hover {
  color: var(--secondary-color);
}

/* ============================================
   BLOG POST PAGE
   ============================================ */

.post-header {
  background: var(--light-gray);
  padding: 40px 20px;
  margin-bottom: 30px;
}

.post-title {
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-color);
}

.post-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--dark-gray);
  flex-wrap: wrap;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
}

.post-content h2 {
  font-size: 28px;
  margin: 30px 0 15px 0;
  color: var(--text-color);
}

.post-content h3 {
  font-size: 22px;
  margin: 25px 0 12px 0;
  color: var(--text-color);
}

.post-content h4 {
  font-size: 18px;
  margin: 20px 0 10px 0;
  color: var(--text-color);
}

.post-content p {
  margin-bottom: 18px;
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 30px;
}

.post-content li {
  margin-bottom: 10px;
}

.post-content strong {
  color: var(--primary-color);
  font-weight: 600;
}

.highlight-box {
  background: var(--light-gray);
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  margin: 25px 0;
  border-radius: 4px;
}

.highlight-box h4 {
  margin-top: 0;
  color: var(--primary-color);
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-section {
  margin: 40px 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-toggle {
  font-size: 20px;
  transition: transform 0.3s;
}

.faq-toggle.active {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding-top: 15px;
  color: var(--dark-gray);
  line-height: 1.6;
}

.faq-answer.active {
  display: block;
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */

.sidebar-widget {
  background: var(--light-gray);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-color);
  padding-bottom: 15px;
  border-bottom: 2px solid var(--primary-color);
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-widget li:last-child {
  border-bottom: none;
}

.sidebar-widget a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.sidebar-widget a:hover {
  color: var(--secondary-color);
}

/* Newsletter Widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
  color: white;
  padding: 25px;
  border-radius: 8px;
}

.newsletter-widget h3 {
  color: white;
  border-color: rgba(255,255,255,0.2);
}

.newsletter-widget p {
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.newsletter-widget input {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 14px;
}

.newsletter-widget button {
  width: 100%;
  padding: 12px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 14px;
}

.newsletter-widget button:hover {
  background: #b91c1c;
}

/* ============================================
   ADENSE PLACEMENT AREAS
   ============================================ */

.ad-container {
  background: var(--light-gray);
  border: 1px dashed var(--border-color);
  padding: 20px;
  margin: 30px 0;
  text-align: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--dark-gray);
  font-size: 12px;
}

.ad-container.top {
  min-height: 90px;
}

.ad-container.sidebar {
  min-height: 250px;
}

/* ============================================
   PAGES (ABOUT, CONTACT, ETC)
   ============================================ */

.page-content {
  max-width: 900px;
  margin: 40px auto;
}

.page-content h1 {
  font-size: 42px;
  margin-bottom: 30px;
  color: var(--text-color);
}

.page-content h2 {
  font-size: 28px;
  margin: 30px 0 15px 0;
  color: var(--text-color);
}

.page-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 18px;
  color: var(--dark-gray);
}

/* Contact Form */
.contact-form {
  background: var(--light-gray);
  padding: 30px;
  border-radius: 8px;
  margin: 40px 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-group button {
  background: var(--primary-color);
  color: white;
  padding: 12px 36px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.form-group button:hover {
  background: #1e3a8a;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--text-color);
  color: white;
  padding: 50px 20px 30px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h4 {
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.mt-30 {
  margin-top: 30px;
}

.mb-30 {
  margin-bottom: 30px;
}

.hidden {
  display: none;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
