/* ==========================================================================
   DESIGN SYSTEM & UNIVERSAL STYLES (style.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --primary-color: #4f46e5;      /* Indigo */
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --secondary-color: #0d9488;    /* Teal */
  --secondary-hover: #0f766e;
  --secondary-light: #ccfbf1;
  --text-dark: #0f172a;          /* Slate 900 */
  --text-medium: #475569;        /* Slate 600 */
  --text-light: #94a3b8;         /* Slate 400 */
  --bg-light: #f8fafc;           /* Slate 50 */
  --bg-white: #ffffff;
  --border-color: #e2e8f0;       /* Slate 200 */
  --error-color: #ef4444;        /* Red 500 */
  --success-color: #22c55e;      /* Green 500 */
  
  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Shadow & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s ease;
  
  /* Layout Constraints */
  --max-width: 1280px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--text-dark);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.85rem;
  margin-top: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-medium);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

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

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

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text-medium);
}

li {
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

code {
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 0.9em;
  background-color: rgba(15, 23, 42, 0.05);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  color: var(--primary-color);
  word-break: break-word;
  white-space: pre-wrap;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

header {
  background-color: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--bg-white);
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  color: var(--text-medium);
  font-size: 0.925rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: block;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(79, 70, 229, 0.08);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  position: relative;
  width: 1.5rem;
  height: 1.1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text-dark);
  transition: all var(--transition-normal);
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
  top: calc(100% - 2px);
}

/* ==========================================================================
   AD UNITS
   ========================================================================== */

.ad-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f1f5f9;
  border: 1px dashed var(--text-light);
  border-radius: var(--radius-md);
  margin: 1.5rem auto;
  overflow: hidden;
  color: var(--text-medium);
  font-size: 0.8rem;
  font-weight: 500;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  max-width: 100%;
  box-sizing: border-box;
}

.ad-container * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.ad-container::before {
  content: 'ADVERTISEMENT';
  position: absolute;
  top: 0.25rem;
  left: 0.5rem;
  font-size: 0.65rem;
  color: var(--text-light);
}

/* Specific Sizes */
.ad-header {
  width: 728px;
  height: 90px;
}

.ad-skyscraper {
  width: 300px;
  height: 600px;
  margin: 0;
}

.ad-in-content {
  width: 100%;
  max-width: 728px;
  height: 90px;
}

/* ==========================================================================
   HERO / MAIN CALCULATOR LAYOUT
   ========================================================================== */

.hero-section {
  position: relative;
  background-color: #f8fafc;
  padding: 4rem 0;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  top: -50px;
  left: -50px;
  z-index: 1;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  bottom: -100px;
  right: -50px;
  z-index: 1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
  position: relative;
  z-index: 2;
}

.calculator-wrapper {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.04), 0 10px 15px -5px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.calculator-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 35px -5px rgba(79, 70, 229, 0.08), 0 10px 15px -5px rgba(0, 0, 0, 0.02);
}

.calculator-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.calculator-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix, .input-suffix {
  position: absolute;
  color: var(--text-light);
  font-weight: 500;
  pointer-events: none;
}

.input-prefix {
  left: 1rem;
}

.input-suffix {
  right: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.125rem;
  font-family: var(--font-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  background-color: var(--bg-light);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.input-with-prefix {
  padding-left: 2rem;
}

.input-with-suffix {
  padding-right: 2rem;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-normal);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--border-color);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background-color: #cbd5e1;
  transform: translateY(-1px);
}

/* Calculator Results */
.results-wrapper {
  margin-top: 1.75rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-weight: 500;
  color: var(--text-medium);
  font-size: 0.95rem;
}

.result-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-dark);
}

.result-value.highlight {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.btn-copy-all {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.btn-copy-all:hover {
  background-color: var(--secondary-light);
  border-color: var(--secondary-color);
  color: var(--secondary-hover);
}

.btn-copy-all.copied {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: var(--bg-white);
}

/* ==========================================================================
   LONG FORM CONTENT & COMMON LAYOUTS
   ========================================================================== */

main {
  flex: 1;
}

.content-section {
  padding: 3rem 0;
}

.article-body p, .rates-intro {
  text-align: justify;
  text-justify: inter-word;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 6rem;
}

.article-body, .calculator-container, .sidebar {
  min-width: 0;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-white);
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th {
  background-color: #f1f5f9;
  color: var(--text-dark);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-medium);
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) {
  background-color: var(--bg-light);
}

/* ==========================================================================
   ACCORDION (FAQ)
   ========================================================================== */

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0;
}

.faq-item {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  outline: none;
}

.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  position: relative;
  transition: transform var(--transition-normal);
}

.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--text-medium);
  transition: transform var(--transition-normal);
}

/* Horizontal line */
.faq-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  margin-top: -1px;
}

/* Vertical line */
.faq-icon::after {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  margin-left: -1px;
}

.faq-item.active .faq-icon {
  transform: rotate(90deg);
}

.faq-item.active .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: var(--text-medium);
  font-size: 0.95rem;
}

/* ==========================================================================
   BLOG LANDING & CARDS
   ========================================================================== */

.blog-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #0d9488 100%);
  color: var(--bg-white);
  padding: 4rem 0;
  text-align: center;
  position: relative;
}

.blog-hero h1 {
  color: var(--bg-white);
}

.blog-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto;
}

.search-bar-container {
  max-width: 500px;
  margin: 2rem auto 0 auto;
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.blog-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.blog-card-image {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.blog-card-image span {
  padding: 1rem;
  text-align: center;
}

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

.blog-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  line-height: 1.35;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.blog-readmore {
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
}

/* Pagination / Filter Stats */
.blog-stats {
  margin-bottom: 1.5rem;
  font-weight: 500;
  color: var(--text-medium);
}

/* ==========================================================================
   BLOG POST DETAIL
   ========================================================================== */

.article-header {
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.article-hero-image {
  width: 100%;
  height: 350px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.toc-box {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0 2.5rem 0;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.toc-list {
  list-style: none;
  padding-left: 0;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

h2[id], h3[id] {
  scroll-margin-top: 6.5rem;
}

.toc-list a {
  display: inline-block;
  color: var(--text-medium);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--transition-fast);
  word-break: break-word;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.toc-list a::before {
  content: '→';
  color: var(--primary-color);
  font-weight: 700;
}

/* Accordion in Blog Post */
.article-faq {
  margin-top: 3rem;
}

/* ==========================================================================
   STATIC PAGES (Contact, About, Privacy)
   ========================================================================== */

.contact-form {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.rates-intro {
  margin-bottom: 2rem;
}

.rates-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.rates-search {
  flex: 1;
  min-width: 250px;
}

.rates-filter {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.rates-table-wrapper {
  overflow-x: auto;
}

.btn-use-rate {
  background-color: var(--secondary-color);
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-heading);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.btn-use-rate:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

/* ==========================================================================
   FOOTER (4 Columns, no Ads)
   ========================================================================== */

footer {
  background-color: var(--text-dark);
  color: var(--text-light);
  padding: 4rem 0 2rem 0;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--bg-white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.footer-col p {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.footer-logo {
  color: var(--bg-white);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.footer-logo:hover {
  opacity: 0.9;
}

.footer-links {
  list-style: none;
  padding-left: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--bg-white);
  padding-left: 2px;
}

.footer-contact {
  list-style: none;
  padding-left: 0;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background-color: #1e293b;
  border-radius: 50%;
  color: #94a3b8;
  transition: all var(--transition-normal);
}

.social-icon:hover {
  background-color: var(--primary-color);
  color: var(--bg-white);
  transform: translateY(-3px);
}

.social-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
  display: block;
}

/* ==========================================================================
   BLOG POST CTA BOX & REDIRECT BUTTONS
   ========================================================================== */

.calculator-cta-box {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.calculator-cta-box h3 {
  margin-top: 0;
  color: var(--text-dark);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.calculator-cta-box p {
  margin-bottom: 1.5rem;
  color: var(--text-medium);
  font-size: 0.95rem;
}

.btn-cta {
  padding: 0.65rem 1.75rem;
  font-size: 0.95rem;
  background-color: var(--primary-color);
  color: var(--bg-white);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.btn-cta:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--bg-white);
}

/* ==========================================================================
   STEP CARD COMPONENTS (FOR PROFESSIONAL HOW TO USE PAGE)
   ========================================================================== */

.step-card {
  display: flex;
  gap: 1.5rem;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  border-bottom: none;
  padding-bottom: 0;
}

.step-content p {
  margin-bottom: 0;
  font-size: 0.925rem;
  color: var(--text-medium);
}

/* ==========================================================================
   SIDEBAR CTA CARD
   ========================================================================== */

.calculator-sidebar-cta {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  text-align: center;
}

.calculator-sidebar-cta h3 {
  color: var(--bg-white);
  margin-top: 0;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: none;
  padding-bottom: 0;
}

.calculator-sidebar-cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.calculator-sidebar-cta .btn {
  background-color: var(--bg-white);
  color: var(--primary-color);
  border: none;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  width: 100%;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.calculator-sidebar-cta .btn:hover {
  background-color: var(--bg-light);
  transform: translateY(-1px);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
}

.footer-bottom p {
  margin-bottom: 0;
}

/* ==========================================================================
   QUICK GUIDES SIDEBAR CARD
   ========================================================================== */
.quick-guides-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.quick-guides-card h3 {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-dark);
  border-bottom: none;
  padding-bottom: 0;
  font-weight: 700;
}

.quick-guides-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-guides-card li {
  margin: 0;
  padding: 0;
}

.quick-guides-card li a {
  color: var(--text-medium);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  display: block;
}

.quick-guides-card li a:hover {
  color: var(--primary-color);
}

/* ==========================================================================
   TESTIMONIALS SECTION
   ========================================================================== */
.testimonials-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 5rem;
}

.testimonials-header {
  text-align: center;
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.testimonials-badge {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
}

.testimonials-section h2 {
  text-align: center;
  border-bottom: none;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  font-size: 2rem;
}

.testimonials-subtitle {
  text-align: center;
  color: var(--text-medium);
  margin-bottom: 0;
  font-size: 1.05rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 4px -1px rgba(15, 23, 42, 0.02);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.testimonial-card::after {
  content: '“';
  position: absolute;
  top: -0.5rem;
  right: 1.5rem;
  font-size: 7.5rem;
  font-family: Georgia, serif;
  color: rgba(79, 70, 229, 0.05);
  line-height: 1;
  font-weight: 800;
  pointer-events: none;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 70, 229, 0.25);
  box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.08), 0 10px 10px -5px rgba(79, 70, 229, 0.04);
}

.testimonial-rating {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.star-icon {
  width: 1.15rem;
  height: 1.15rem;
  color: #f59e0b;
  fill: currentColor;
}

.testimonial-text {
  font-size: 0.975rem;
  color: var(--text-medium);
  font-style: normal;
  margin-bottom: 1.75rem;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

.testimonial-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.avatar-sj {
  background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.18);
}

.avatar-dc {
  background: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.18);
}

.avatar-mv {
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

.avatar-er {
  background: linear-gradient(135deg, #7c3aed 0%, #c084fc 100%);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.18);
}

.testimonial-meta h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.testimonial-meta span {
  font-size: 0.8rem;
  color: var(--text-medium);
  display: block;
  margin-top: 0.15rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .calculator-wrapper {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .ad-skyscraper {
    width: 300px;
    height: 250px; /* Reflow on smaller screen */
    margin: 1.5rem auto;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    margin-top: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  /* Hamburger Menu positioned absolutely on the right side of the navbar */
  .hamburger {
    display: flex;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .nav-menu {
    position: fixed;
    top: 4.5rem;
    left: -100%;
    right: auto;
    width: 100%;
    height: calc(100vh - 4.5rem);
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: center; /* Revert back to centered mobile menu design */
    padding: 3rem 1.5rem;
    gap: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    transition: left var(--transition-normal);
    overflow-y: auto;
    z-index: 99;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .hamburger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem; /* Reduce side margins on smaller screens to maximize space */
  }

  .hamburger {
    right: 1rem; /* Align to the 1rem padding container edge */
  }

  /* Force ads to fit within mobile/tablet bounds */
  .ad-container {
    max-width: 100%;
    overflow: hidden;
  }

  .ad-header {
    width: 320px;
    max-width: 100%;
    height: auto;
    min-height: 100px;
  }
  
  .ad-skyscraper {
    width: 300px;
    max-width: 100%;
    height: auto;
    min-height: 250px;
  }

  .ad-in-content {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 100px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .calculator-wrapper {
    padding: 1.5rem;
  }
  
  .form-actions {
    grid-template-columns: 1fr;
  }
  
  .article-hero-image {
    font-size: 1.5rem;
    min-height: 200px;
    height: auto;
    padding: 2rem 1.5rem;
  }

  /* Force grids to single column on mobile / tablet to prevent overflow */
  .blog-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 500px) {
  /* Shorten navbar brand on phone screens */
  .logo span {
    font-size: 1.05rem;
  }
  .logo-text-desktop {
    display: none;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Stack step cards vertically on mobile */
  .step-card {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  /* Expand rates search & filter controls to full width */
  .rates-search, .rates-filter {
    width: 100%;
    flex: none;
  }

  /* Stack logo icon above title on mobile card to avoid flex wrap runoff */
  .calculator-title {
    display: block;
    text-align: center;
  }

  .calculator-title .logo-icon {
    margin: 0 auto 0.5rem auto;
  }

  /* Optimize card space on small screens */
  .calculator-wrapper {
    padding: 1.25rem;
  }

  .calculator-cta-box {
    padding: 1.25rem;
  }

  /* Negative margins to pull ads to full screen width on mobile */
  .ad-container {
    margin: 1.5rem -1rem;
    width: calc(100% + 2rem) !important;
    max-width: 100vw !important;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }
}

@media (max-width: 360px) {
  /* Prevent header overflow on extremely narrow viewports */
  .logo span {
    font-size: 0.95rem;
  }
  h1 {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   RELATED ARTICLES SECTION
   ========================================================================== */
.related-posts-section {
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  padding-top: 3rem;
}

.related-posts-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2rem;
  font-family: var(--font-heading);
}

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

.related-post-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.related-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.related-post-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
  font-family: var(--font-heading);
  transition: color var(--transition-fast);
}

.related-post-card:hover .related-post-title {
  color: var(--primary-color);
}

.related-post-excerpt {
  font-size: 0.875rem;
  color: var(--text-medium);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  flex-grow: 1;
}

.related-post-date {
  font-size: 0.775rem;
  color: var(--text-light);
  display: block;
}
