/* 
    YourCalc Global Design System
    Centralized styles for all calculator pages.
*/

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

:root {
    --bg: #0d0f14;
    --surface: #161921;
    --border: #252836;
    --accent: #f5a623;
    --accent-light: rgba(245, 166, 35, 0.15);
    --accent2: #3ecf8e;
    --text: #e8eaf0;
    --text-dim: #9ca3af;
    --muted: #6b7280;
    --error: #ef4444;
    --header-height: 120px;
    --sidebar-width: 0px;
    --glass: rgba(22, 25, 33, 0.7);
}

[data-theme="light"] {
    --bg: #f8f9fa;
    --surface: #ffffff;
    --border: #e9ecef;
    --text: #212529;
    --muted: #6c757d;
    --accent2: #2f855a;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased; 
}

/* Layout */
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

main {
    flex: 1;
    margin-left: 0;
    padding: 160px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.sidebar {
    width: 100% !important;
    height: var(--header-height) !important;
    background: rgba(13, 15, 20, 0.8) !important;
    backdrop-filter: blur(24px) saturate(180%);
    display: flex !important;
    flex-direction: column !important;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.8) !important;
}

.nav-top-row {
    display: flex;
    width: 100%;
    height: 64px;
    padding: 0 24px;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}

.nav-bottom-row {
    display: flex;
    width: 100%;
    height: 56px;
    padding: 0 40px;
    align-items: center;
}

@media (max-width: 768px) {
    :root { --header-height: 56px; }
    .sidebar { height: auto !important; }
    .nav-top-row { height: 56px !important; padding: 0 16px; justify-content: space-between; }
    .nav-bottom-row { display: none !important; }
    main { padding: 24px 16px 100px !important; padding-top: calc(var(--header-height) + 16px) !important; }
}

@media (min-width: 1200px) {
    main { padding: 48px 80px 120px !important; padding-top: calc(var(--header-height) + 48px) !important; }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: rgba(13, 15, 20, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 3000;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    align-items: center;
    padding: 0 8px;
    scrollbar-width: none;
}
.mobile-bottom-nav::-webkit-scrollbar { display: none; }

@media (max-width: 768px) {
    .mobile-bottom-nav { 
        display: flex; 
        background: rgba(13, 15, 20, 0.85);
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    body { padding-bottom: 72px !important; }
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 72px;
    height: 100%;
}
.bnav-item svg { width: 20px; height: 20px; stroke-width: 2; color: var(--bnav-color, rgba(255,255,255,0.5)); transition: color 0.2s; }
.bnav-item span { color: var(--bnav-color, rgba(255,255,255,0.5)); transition: color 0.2s; }
.bnav-item.active svg, .bnav-item.active span { color: var(--bnav-color, var(--accent)); opacity: 1; }
.bnav-item:active { transform: scale(0.9); }

.container {
    max-width: 1200px;
    width: 100%;
}

/* Common Typography */
h1 { 
    font-size: clamp(32px, 8vw, 56px); 
    font-weight: 700; 
    margin-bottom: 12px; 
    letter-spacing: -0.04em; 
    line-height: 1.05;
}

@media (max-width: 768px) {
    h1 { text-align: center; }
}

.subtitle { 
    color: var(--muted); 
    margin-bottom: 32px; 
    font-size: 16px; 
    line-height: 1.6; 
}

@media (max-width: 768px) {
    .subtitle { font-size: 14px; text-align: center; margin-bottom: 24px; }
}

/* Typography for Info Pages (About, Privacy, etc.) */
.page-h1 { font-size: 42px; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 16px; }
.page-h2 { font-size: 24px; font-weight: 600; color: var(--accent); margin: 40px 0 20px; letter-spacing: -0.01em; }
.page-h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; }
.page-p { font-size: 16px; line-height: 1.8; color: var(--text); margin-bottom: 20px; opacity: 0.9; }

/* Components */
.highlight-box {
    background: rgba(245, 166, 35, 0.07);
    border: 1px solid rgba(245, 166, 35, 0.2);
    border-radius: 16px;
    padding: 24px 28px;
    margin: 32px 0;
}
.highlight-box p { margin-bottom: 0; }

.info-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    width: 100%;
}

@media (max-width: 768px) {
    .info-section { padding: 24px; border-radius: 20px; margin-bottom: 32px; }
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* Footer */
.site-footer {
    margin-top: 80px;
    padding: 60px 0 40px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    width: 100%;
}

.footer-links {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, opacity 0.2s;
}

.footer-links a:hover {
    color: var(--text);
    opacity: 1;
}

.footer-copy {
    opacity: 0.6;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .footer-links { gap: 16px; }
    .site-footer { padding: 40px 16px; }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 32px;
    margin-top: 40px;
}

/* Tabs */
.tabs { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 32px; 
    overflow-x: auto; 
    padding-bottom: 8px; 
    border-bottom: 1px solid var(--border); 
}

.tab-btn { 
    background: none; 
    border: none; 
    color: var(--muted); 
    padding: 10px 16px; 
    font-family: 'Outfit'; 
    font-size: 14px; 
    cursor: pointer; 
    white-space: nowrap; 
    transition: all 0.2s; 
    border-radius: 8px; 
}

.tab-btn:hover { 
    color: var(--text); 
    background: var(--surface); 
}

.tab-btn.active { 
    color: var(--accent); 
    background: rgba(245, 166, 35, 0.1); 
}

/* Calculator Containers */
.calc-container { 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: 24px; 
    padding: 40px; 
    display: none; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); 
}

@media (max-width: 768px) {
    .calc-container { padding: 24px; border-radius: 20px; }
}

.calc-container.active { 
    display: block; 
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}

/* Form Elements */
.input-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 24px; 
    margin-bottom: 32px; 
}

@media (max-width: 768px) {
    .input-grid { grid-template-columns: 1fr; gap: 16px; }
}

.input-group { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.input-group label { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 12px; 
    font-weight: 600; 
    color: var(--muted); 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
}

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

.input-wrapper input, 
.input-wrapper select, 
.input-wrapper textarea { 
    width: 100%; 
    height: 56px; 
    background: var(--bg); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 0 20px; 
    color: var(--text); 
    font-family: 'DM Mono', monospace; 
    font-size: 16px; 
    transition: all 0.2s; 
}

.input-wrapper textarea {
    height: 120px;
    padding: 20px;
    font-family: 'Outfit', sans-serif;
    resize: none;
}

.input-wrapper input:focus, 
.input-wrapper select:focus, 
.input-wrapper textarea:focus { 
    outline: none; 
    border-color: var(--accent); 
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.1); 
}

@media (max-width: 768px) {
    .input-wrapper input, 
    .input-wrapper select { height: 48px; font-size: 16px; } /* Prevent iOS zoom */
}

.btn-calculate { 
    width: 100%; 
    height: 60px; 
    background: var(--accent); 
    color: #000; 
    border: none; 
    border-radius: 12px; 
    font-family: 'Outfit'; 
    font-weight: 700; 
    font-size: 18px; 
    cursor: pointer; 
    transition: all 0.2s; 
    margin-top: 12px; 
}

.btn-calculate:hover { 
    background: #ffb84d; 
    transform: translateY(-2px); 
    box-shadow: 0 10px 20px rgba(245, 166, 35, 0.2); 
}

@media (max-width: 768px) {
    .btn-calculate { height: 56px; font-size: 16px; margin-top: 8px; }
}

/* Results */
.result-panel { 
    margin-top: 40px; 
    padding-top: 40px; 
    border-top: 1px solid var(--border); 
    display: none; 
}

.result-panel.visible { 
    display: block; 
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
}

.result-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 24px; 
}

@media (max-width: 768px) {
    .result-grid { grid-template-columns: 1fr; gap: 16px; }
}

.result-item { 
    padding: 20px; 
    background: rgba(255,255,255,0.02); 
    border-radius: 16px; 
    border: 1px solid var(--border); 
}

.result-label { 
    font-size: 11px; 
    color: var(--muted); 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    margin-bottom: 8px; 
    display: block; 
}

.result-value { 
    font-family: 'DM Mono', monospace; 
    font-size: 28px; 
    font-weight: 600; 
    color: var(--accent2); 
}

/* Sections */
.seo-section { 
    margin-top: 64px; 
    width: 100%;
}

.seo-section h2 { 
    font-size: 28px; 
    font-weight: 600; 
    margin-bottom: 24px; 
    letter-spacing: -0.01em; 
}

.info-block { 
    display: none; 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: 24px; 
    padding: 40px; 
    margin-top: 32px; 
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}

.info-block.active { 
    display: block; 
}

.info-block h2 { 
    font-size: 24px; 
    margin-bottom: 16px; 
}

.info-block h3 { 
    font-size: 18px; 
    margin-bottom: 12px; 
}

.info-block p, .info-block li {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.info-block p:last-child {
    margin-bottom: 0;
}

/* Feedback & Comments */
.feedback-section { 
    margin-top: 64px; 
}

.feedback-section > div {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
}

.feedback-section h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.feedback-section p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.comment-thread {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
}

/* Ads & Compliance */
.ad-top {
    width: 100%;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-bottom {
    width: 100%;
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Desktop Gutter Ads (AdSense vertical units) */
.ad-gutter {
    position: fixed;
    top: 160px;
    width: 160px;
    height: 600px;
    display: none; /* Hidden by default, shown on desktop */
    z-index: 10;
}

.ad-gutter-left {
    left: 40px;
}

.ad-gutter-right {
    right: 40px;
}

@media (min-width: 1400px) {
    .ad-gutter {
        display: block;
    }
}

@media (max-width: 1399px) {
    .ad-gutter {
        display: none !important;
    }
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    main { padding: 100px 16px 40px !important; }
    .ad-top { margin-bottom: 24px; }
}

@media (max-width: 768px) {
    h1 { font-size: 32px; }
    .input-grid, .result-grid { grid-template-columns: 1fr; }
    .calc-container { padding: 24px; }
    .info-block { padding: 24px; }
    .feedback-section > div { padding: 24px; }
}

@keyframes fadeIn { 
    from { opacity: 0; transform: scale(0.98); } 
    to { opacity: 1; transform: scale(1); } 
}

@keyframes slideUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* Ads */
.ad-unit {
    width: 100%;
    margin: 16px 0;
    min-height: 90px;
    background: rgba(255,255,255,0.05);
    text-align: center;
    border-radius: 8px;
}

.ad-top { border-bottom: 1px solid var(--border); }
.ad-below-results { border-top: 1px solid var(--border); margin-top: 12px; }

.ad-label {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

/* SEO Content */
.seo-content {
    background: var(--surface);
    border-left: 4px solid var(--accent);
    padding: 20px 24px;
    margin-bottom: 24px;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
}

/* Static Page Typography */
.page-h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; color: var(--text); }
.page-h2 { font-size: 24px; font-weight: 600; color: var(--accent); margin: 48px 0 16px; }
.page-h3 { font-size: 18px; font-weight: 600; margin: 32px 0 12px; color: var(--text); }
.page-p { font-size: 16px; line-height: 1.8; color: var(--muted); margin-bottom: 16px; }
.page-list { padding-left: 24px; margin-bottom: 24px; color: var(--muted); }
.page-list li { margin-bottom: 10px; font-size: 15px; line-height: 1.7; }
.effective-date { color: var(--muted); font-size: 14px; margin-bottom: 48px; }
.effective-date span { color: var(--accent); font-weight: 600; }

.highlight-box {
    background: rgba(245, 166, 35, 0.05);
    border: 1px solid rgba(245, 166, 35, 0.15);
    border-radius: 20px;
    padding: 32px;
    margin: 40px 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
}

/* Site Footer */
.site-footer {
    margin-top: auto;
    padding: 60px 0;
    width: 100%;
    border-top: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
    z-index: 10;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--muted);
    font-size: 13px;
    opacity: 0.8;
}


/* Email Capture Widget */
.yc-capture-widget {
  margin-top: 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px 24px;
  position: relative;
  animation: slideUp 0.3s ease;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  z-index: 100;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.yc-capture-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
}

.yc-capture-headline {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 4px;
}

.yc-capture-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.yc-capture-form {
  display: flex;
  gap: 8px;
}

.yc-capture-form input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

.yc-capture-form button {
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.yc-capture-legal {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 10px;
}

.yc-capture-legal a {
  color: var(--muted);
  text-decoration: underline;
}
/* Editorial Content Blocks (AdSense Optimization) */
.editorial-section {
    margin: 64px 0;
    width: 100%;
}

.editorial-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.editorial-tag {
    background: rgba(62, 207, 142, 0.1);
    color: var(--accent2);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
}

.editorial-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
}

/* Premium Editorial Content Block */
.content-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.content-block h3 {
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    color: var(--text);
    font-weight: 600;
}

.content-block h4 {
    font-size: 18px;
    margin: 32px 0 12px;
    color: var(--accent);
    font-weight: 600;
}

.content-block p {
    color: var(--muted);
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

[data-theme="light"] .content-block p {
    color: #444;
}

.content-block .use-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.content-block .use-tags span {
    background: rgba(245, 166, 35, 0.08);
    border: 1px solid rgba(245, 166, 35, 0.15);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 6px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Premium FAQ Block */
.faq-section {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    padding-top: 48px;
}

.faq-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 24px 32px;
    margin-bottom: 16px;
    border-radius: 0 16px 16px 0;
    transition: transform 0.2s;
}

.faq-block:hover {
    transform: translateX(4px);
}

.faq-block dt {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text);
}

.faq-block dd {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
}

[data-theme="light"] .faq-block dd {
    color: #444;
}

@media (max-width: 768px) {
    .content-block { padding: 24px; border-radius: 20px; }
    .faq-block { padding: 20px 24px; }
    .content-block h3 { font-size: 19px; }
}
