/* main.css */
:root {
  --primary: #1a365d;
  --primary-hover: #2a4a7f;
  --secondary: #38b2ac;
  --secondary-hover: #2c7a7b;
  --bg-color: #f7fafc;
  --text-color: #2d3748;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --header-bg: #ffffff;
  --footer-bg: #1a202c;
  --footer-text: #cbd5e0;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset & Typography */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; font-weight: 700; line-height: 1.2; margin-bottom: 0.5em; color: var(--primary); }
a { color: var(--secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary-hover); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 2rem; padding-bottom: 2rem; }
.py-4 { padding-top: 3rem; padding-bottom: 3rem; }
.my-2 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-3 { margin-top: 2.5rem; margin-bottom: 2.5rem; }
.my-4 { margin-top: 4rem; margin-bottom: 4rem; }
.mt-2 { margin-top: 1rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.min-vh-60 { min-height: 60vh; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.75rem 1.5rem; font-weight: 600; font-family: 'Outfit', sans-serif;
  border-radius: var(--radius); text-align: center; cursor: pointer; transition: all 0.2s; border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); color:#fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-hover); transform: translateY(-1px); color:#fff; }

/* Header */
.site-header {
  background: var(--header-bg); box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.logo:hover { color: var(--primary-hover); }
.main-nav a { margin-left: 1.5rem; font-weight: 500; color: var(--text-color); }
.main-nav a:hover { color: var(--secondary); }

/* Dropdown */
.dropdown { position: relative; display: inline-block; margin-left: 1.5rem; }
.dropdown .dropbtn { margin-left: 0; }
.dropdown-content {
  display: none; position: absolute; background-color: var(--header-bg);
  min-width: 160px; box-shadow: var(--shadow); z-index: 101; border-radius: var(--radius);
  top: 100%; left: 0; padding: 0.5rem 0;
}
.dropdown-content a {
  color: var(--text-color); padding: 12px 16px; text-decoration: none;
  display: block; margin: 0; font-size: 0.95rem; border-bottom: 1px solid var(--border-color);
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: #f1f5f9; color: var(--secondary); }
.dropdown:hover .dropdown-content { display: block; }


/* Mobile Menu */
.mobile-menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 0.5rem;
}
.mobile-menu-toggle span {
  display: block; width: 25px; height: 3px; background: var(--primary); margin: 5px 0;
}
@media (max-width: 768px) {
  .main-nav {
    display: none; position: absolute; top: 70px; left: 0; width: 100%;
    background: var(--header-bg); flex-direction: column; padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  }
  .main-nav.active { display: flex; }
  .main-nav a { margin: 0 0 1rem 0; font-size: 1.1rem; }
  .mobile-menu-toggle { display: block; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2a4365 100%);
  color: #fff; padding: 4rem 1rem; text-align: center;
}
.hero h1 { color: #fff; font-size: 2.5rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 2rem; color: #e2e8f0; }
.hero-search { display: flex; max-width: 500px; margin: 0 auto; }
.hero-search input {
  flex: 1; padding: 0.75rem 1rem; border: none; border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1rem; font-family: 'Inter', sans-serif;
}
.hero-search button { border-radius: 0 var(--radius) var(--radius) 0; }
@media (max-width: 480px) {
  .hero-search { flex-direction: column; }
  .hero-search input { border-radius: var(--radius); margin-bottom: 0.5rem; }
  .hero-search button { border-radius: var(--radius); }
}

/* Grid & Cards */
.grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s; overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card-content { padding: 1.5rem; }
.card-title { font-size: 1.25rem; }
.card-title a { color: var(--primary); }
.card-excerpt { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.95rem; }
.read-more { font-weight: 600; font-size: 0.95rem; }

/* Features */
.features { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.feature-box { text-align: center; padding: 2rem; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-icon { font-size: 3rem; margin-bottom: 1rem; }

/* Article & Pages */
.article-container { max-width: 800px; margin: 2rem auto; position: relative; }
.article-header { margin-bottom: 2rem; }
.article-title { font-size: 2.2rem; margin-bottom: 0.5rem; }
.article-meta { color: var(--text-muted); font-size: 0.9rem; }
.article-meta span { margin-right: 1rem; }

.breadcrumbs { font-size: 0.85rem; margin-bottom: 1rem; color: var(--text-muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin: 0 0.5rem; }
.breadcrumbs a { color: var(--text-muted); }

.key-takeaways {
  background: #ebf8ff; border-left: 4px solid var(--secondary);
  padding: 1.5rem; border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
}
.key-takeaways h3 { font-size: 1.1rem; margin-top: 0; }
.key-takeaways p { margin-bottom: 0; color: #2c5282; }

.article-body h2 { font-size: 1.8rem; margin-top: 2.5rem; }
.article-body h3 { font-size: 1.4rem; margin-top: 1.5rem; }
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body table {
  width: 100%; border-collapse: collapse; margin-bottom: 1.5rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--border-color); padding: 0.75rem; text-align: left;
}
.article-body th { background: #f1f5f9; }

/* Social Share (Floating) */
.social-share-floating {
  position: absolute; left: -60px; top: 200px; display: flex; flex-direction: column; gap: 0.5rem;
}
.share-btn {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; color: #fff; font-weight: bold; transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.8; color: #fff; }
.share-btn.tw { background: #000; }
.share-btn.fb { background: #1877f2; }
.share-btn.in { background: #0a66c2; }
@media (max-width: 950px) { .social-share-floating { display: none; } }

/* Social Share (Inline) */
.social-share-inline { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.social-share-inline .share-btn { width: auto; border-radius: var(--radius); padding: 0.5rem 1rem; font-size: 0.9rem; }
.share-btn.copy-link { background: var(--text-muted); }

/* Inline Newsletter */
.inline-newsletter {
  background: var(--card-bg); border: 1px solid var(--border-color); padding: 2rem;
  border-radius: var(--radius); text-align: center;
}
.newsletter-form-inline { display: flex; max-width: 400px; margin: 1rem auto 0; }
.newsletter-form-inline input {
  flex: 1; padding: 0.75rem; border: 1px solid var(--border-color);
  border-radius: var(--radius) 0 0 var(--radius); font-family: inherit;
}
.newsletter-form-inline button { border-radius: 0 var(--radius) var(--radius) 0; }

/* Search Form */
.search-form-large { display: flex; max-width: 600px; margin: 0 auto; }
.search-form-large input {
  flex: 1; padding: 1rem; font-size: 1.1rem; border: 1px solid var(--primary);
  border-radius: var(--radius) 0 0 var(--radius);
}
.search-form-large button { border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.1rem; }
.search-results-list { list-style: none; padding: 0; }
.search-results-list li { margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 4rem 0 1rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2rem; margin-bottom: 3rem; }
.site-footer h3 { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; }
.site-footer p { font-size: 0.9rem; }
.site-footer a { color: var(--footer-text); display: block; margin-bottom: 0.5rem; font-size: 0.9rem; }
.site-footer a:hover { color: #fff; }
.newsletter-form { display: flex; flex-direction: column; gap: 0.5rem; }
.newsletter-form input { padding: 0.5rem; border-radius: var(--radius); border: none; }
.footer-bottom { border-top: 1px solid #2d3748; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* Cookie Banner */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; width: 100%; background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 1000; display: none; padding: 1rem 0;
}
.cookie-banner.show { display: block; }
.cookie-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.cookie-inner p { font-size: 0.9rem; margin: 0; }
.cookie-buttons { display: flex; gap: 1rem; flex-shrink: 0; }
@media (max-width: 600px) {
  .cookie-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .cookie-buttons { width: 100%; }
}

/* Calculator Widget */
.calculator-widget {
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
  transition: transform 0.3s;
}
.calculator-widget:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.calc-form .form-group { display: flex; flex-direction: column; }
.calc-form label { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--text-color); }
.calc-form input, .calc-form select {
  padding: 0.75rem; border: 1px solid var(--border-color); border-radius: var(--radius); font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.calc-form input:focus, .calc-form select:focus {
  outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
}
.calc-form .btn-block { grid-column: 1 / -1; width: 100%; margin-top: 1rem; }
.calc-result {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color);
  text-align: center; animation: slideDown 0.4s ease-out forwards;
}
.calc-result h4 { color: var(--text-muted); font-size: 1rem; }
.total-payment { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin: 0.5rem 0; }
.breakdown { list-style: none; padding: 0; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.breakdown li { font-size: 0.9rem; color: var(--text-muted); }
.breakdown span { font-weight: 600; color: var(--text-color); }

@media (max-width: 600px) {
  .calc-form { grid-template-columns: 1fr; }
}

/* Enhancements: Progress Bar, Animations, Back-to-Top */
.progress-container {
  width: 100%; height: 4px; background: #e2e8f0; position: fixed;
  top: 0; left: 0; z-index: 1000;
}
.progress-bar { height: 4px; background: var(--secondary); width: 0%; }

#backToTopBtn {
  display: none; position: fixed; bottom: 30px; right: 30px; z-index: 99;
  font-size: 1.5rem; border: none; outline: none; background-color: var(--primary);
  color: white; cursor: pointer; padding: 10px 16px; border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: background-color 0.3s, transform 0.3s;
}
#backToTopBtn:hover { background-color: var(--primary-hover); transform: translateY(-3px); }

/* Fade-in Animation Classes */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Hero Gradient */
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero {
  background: linear-gradient(-45deg, var(--primary), #2a4365, #2c7a7b, #1a365d);
  background-size: 400% 400%; animation: gradientBG 15s ease infinite;
}

