/* ============================================
   BASE RESET & VARIABLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:           #F4F6F9;
    --surface:      #FFFFFF;
    --surface-2:    #F8FAFC;
    --border:       #E2E8F0;
    --border-light: #EEF2F7;
    --text-primary: #0F172A;
    --text-sec:     #64748B;
    --text-muted:   #94A3B8;

    --accent:       #E85D04;
    --accent-dark:  #C84B03;
    --accent-light: rgba(232, 93, 4, 0.08);

    --success:      #059669;
    --error:        #DC2626;
    --error-bg:     #FEF2F2;

    --radius-sm:    6px;
    --radius-md:    10px;
    --radius-lg:    16px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);

    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: 0.2s ease;
}

/* ============================================
   BODY & PAGE
   ============================================ */
body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0 0 5rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   PAGE HEADER (outside the box)
   ============================================ */
.page-header {
    max-width: 820px;
    margin: 4rem auto 2.5rem;
    padding: 0 1.25rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.2;
}

.page-header p {
    font-size: 16px;
    color: var(--text-sec);
    max-width: 560px;
    margin: 0 auto 1rem;
}

.page-header small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 99px;
}

.page-header small::before {
    content: "ℹ";
    font-size: 11px;
    opacity: 0.7;
}

/* ============================================
   CALCULATOR WRAPPER
   ============================================ */
.calculator-wrapper {
    max-width: 1080px;
    margin: 0 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

@media (min-width: 1120px) {
    .calculator-wrapper {
        margin: 0 auto;
    }
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.calc-main {
    padding: 2rem 2.5rem 2.5rem;
}

/* ============================================
   CONTROLS: MODE & UNIT TOGGLES
   ============================================ */
.controls-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.toggle-group {
    display: flex;
    flex-wrap: wrap;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
    width: 100%;
}

.toggle-btn {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-sec);
    cursor: pointer;
    transition: all var(--transition);
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.toggle-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(0,0,0,0.04);
}

.toggle-btn.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--shadow-xs);
}

/* ============================================
   FORM & RESULTS GRID
   ============================================ */
.form-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ============================================
   FORM SECTION
   ============================================ */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.form-field {
    flex: 1 1 calc(50% - 0.5rem);
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sec);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field select {
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-field input::placeholder {
    color: var(--text-muted);
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-field input.invalid,
.form-field select.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
    background: var(--error-bg);
}

.error-message {
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    font-weight: 500;
}

/* ============================================
   MULTI-SECTION
   ============================================ */
.multi-section {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.multi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.multi-section-header h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-remove-section {
    background: none;
    border: none;
    color: var(--error);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background var(--transition);
    font-family: var(--font);
}

.btn-remove-section:hover {
    background: var(--error-bg);
}

.add-section-btn {
    width: 100%;
    margin-bottom: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.btn-primary,
.btn-secondary {
    height: 48px;
    padding: 0 1.5rem;
    font-size: 14.5px;
    font-weight: 600;
    font-family: var(--font);
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    flex: 2;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232,93,4,0.3);
}

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

.btn-secondary {
    background: var(--surface);
    color: var(--text-sec);
    border: 1.5px solid var(--border);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--surface-2);
    border-color: #CBD5E1;
    color: var(--text-primary);
}

/* ============================================
   RESULTS SECTION
   ============================================ */
.calc-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1.5rem;
}

/* Primary Result Card */
.primary-result {
    background: linear-gradient(135deg, var(--accent) 0%, #c84b03 100%);
    color: #fff;
    padding: 1.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.primary-result::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.primary-result::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.primary-result .res-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 1;
    display: block;
}

.primary-result .val {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.primary-result .val span {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.85;
    margin-left: 4px;
}

/* Secondary Result Cards */
.secondary-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.result-card {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.1rem 1rem;
    text-align: center;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.result-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}

.result-card .res-title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.45rem;
    display: block;
}

.result-card .res-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.result-card .res-val span {
    font-size: 12px;
    color: var(--text-sec);
    font-weight: 500;
}

/* Results Notes */
.results-notes {
    padding: 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

/* ============================================
   HIDDEN UTILITY
   ============================================ */
.hidden {
    display: none !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeSlideIn 0.3s ease-out forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .calc-main {
        padding: 1.75rem 2rem 2rem;
    }

    .form-results-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1.5rem 1rem 4rem;
    }

    .calc-main {
        padding: 1.5rem;
    }

    .form-results-grid {
        grid-template-columns: 1fr;
    }

    .calc-results {
        position: static;
    }

    .form-field {
        flex: 1 1 100%;
    }

    .controls-section {
        flex-direction: column;
        align-items: stretch;
    }

    .toggle-group {
        width: 100%;
        justify-content: stretch;
    }

    .toggle-btn {
        flex: 1;
        text-align: center;
    }

    .primary-result .val {
        font-size: 34px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        flex: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .secondary-results-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 24px;
    }

}

/* ============================================
   LONG FORM CONTENT (SEO Content below Calculator)
   ============================================ */
.page-content {
    max-width: 820px;
    margin: 4rem auto;
    padding: 0 1.25rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.page-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.page-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content p {
    font-size: 16px;
    color: var(--text-sec);
    margin-bottom: 1.5rem;
}

.page-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   INTERACTIVE ELEMENTS
   ============================================ */

/* Quick Estimate Widget */
.interactive-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; margin: 2rem 0; }
.widget-header { font-weight: 700; font-size: 15px; color: var(--text-primary); display: flex; align-items: center; gap: 8px; margin-bottom: 1.25rem; }
.quick-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.quick-stat { text-align: center; padding: 1rem 0.5rem; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border-light); }
.qs-num { display: block; font-size: 24px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.qs-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.widget-hint { font-size: 12px !important; color: var(--text-muted) !important; text-align: center; margin: 1rem 0 0 !important; }

/* Interactive Steps */
.interactive-steps { display: flex; align-items: center; gap: 0; margin: 2rem 0; overflow-x: auto; padding: 0.5rem 0; }
.step-card { display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.85rem 1.1rem; flex-shrink: 0; transition: all var(--transition); }
.step-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.step-body { display: flex; flex-direction: column; }
.step-body strong { font-size: 13px; color: var(--text-primary); }
.step-body span { font-size: 11px; color: var(--text-muted); }
.step-connector { width: 24px; height: 2px; background: var(--border); flex-shrink: 0; }

/* Mode Comparison */
.compare-table { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.compare-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.compare-head { padding: 0.85rem 1rem; font-weight: 700; font-size: 14px; text-align: center; }
.simple-head { background: var(--surface-2); color: var(--text-sec); }
.advanced-head { background: var(--accent); color: #fff; }
.compare-list { list-style: none; padding: 1rem; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.compare-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-primary); }
.compare-muted { opacity: 0.5; }

/* Calculation Flow */
.calc-flow-diagram { display: flex; align-items: center; justify-content: center; gap: 0; margin: 2rem 0; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow-x: auto; }
.flow-node { text-align: center; padding: 1rem; min-width: 90px; }
.flow-icon { font-size: 28px; margin-bottom: 4px; }
.flow-label { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.flow-formula { font-size: 12px; color: var(--text-muted); font-family: monospace; background: var(--surface-2); padding: 2px 8px; border-radius: 4px; margin-top: 4px; display: inline-block; }
.flow-arrow { font-size: 20px; color: var(--accent); font-weight: 700; padding: 0 6px; }

/* Shape Formula Cards */
.formula-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.formula-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; text-align: center; transition: all var(--transition); }
.formula-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.shape-icon { font-size: 32px; color: var(--accent); margin-bottom: 0.5rem; }
.formula-card h4 { font-size: 14px; margin: 0 0 0.5rem; color: var(--text-primary); }
.formula-card code { font-size: 15px; font-weight: 700; color: var(--accent); background: var(--accent-light); padding: 4px 12px; border-radius: 6px; }

/* Thickness Guide */
.thickness-guide-visual { margin: 2rem 0; display: flex; flex-direction: column; gap: 0.75rem; }
.tg-row { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0; }
.tg-bar-wrap { flex: 1; height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border-light); }
.tg-bar { height: 100%; background: linear-gradient(90deg, var(--accent), #F59E0B); border-radius: 99px; transition: width 1s ease; }
.tg-info { min-width: 180px; display: flex; justify-content: space-between; align-items: center; }
.tg-info strong { font-size: 13px; color: var(--text-primary); }
.tg-info span { font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-light); padding: 2px 10px; border-radius: 99px; }

/* Impact Factor Cards */
.impact-factors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin: 2rem 0; }
.impact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 0.75rem; text-align: center; transition: all var(--transition); display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.impact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.impact-icon { font-size: 24px; }
.impact-card strong { font-size: 12px; color: var(--text-primary); }
.impact-level { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.05em; }
.impact-level.high { background: #FEE2E2; color: #DC2626; }
.impact-level.medium { background: #FEF3C7; color: #D97706; }
.impact-level.low { background: #DCFCE7; color: #16A34A; }

/* Mix Type Grid */
.mix-type-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin: 2rem 0; }
.mix-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; transition: all var(--transition); }
.mix-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.mix-badge { font-size: 9px; font-weight: 800; padding: 3px 10px; border-radius: 99px; letter-spacing: 0.08em; color: #fff; }
.mix-badge.hot { background: #EF4444; }
.mix-badge.warm { background: #F59E0B; }
.mix-badge.cold { background: #3B82F6; }
.mix-badge.porous { background: #06B6D4; }
.mix-badge.rap { background: #059669; }
.mix-card strong { font-size: 12px; color: var(--text-primary); }
.mix-density { font-size: 13px; font-weight: 700; color: var(--accent); }
.mix-use { font-size: 10px; color: var(--text-muted); }

/* Cost Breakdown */
.cost-breakdown-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; margin: 2rem 0; }
.cost-bar-stack { display: flex; height: 28px; border-radius: 99px; overflow: hidden; gap: 2px; margin-bottom: 1rem; }
.cost-seg { background: var(--accent); position: relative; transition: flex 0.5s; cursor: pointer; }
.cost-seg.labor { background: #3B82F6; }
.cost-seg.equip { background: #8B5CF6; }
.cost-seg.other { background: #94A3B8; }
.cost-seg:hover { filter: brightness(1.15); }
.cost-seg::after { content: attr(data-label); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 9px; font-weight: 700; color: #fff; white-space: nowrap; opacity: 0; transition: opacity 0.2s; }
.cost-seg:hover::after { opacity: 1; }
.cost-legend { display: flex; align-items: center; gap: 1rem; font-size: 12px; color: var(--text-sec); flex-wrap: wrap; }
.cl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-right: 4px; }
.cl-dot.labor { background: #3B82F6; }
.cl-dot.equip { background: #8B5CF6; }
.cl-dot.other { background: #94A3B8; }

/* FAQ Accordion */
.faq-accordion { margin: 1.5rem 0; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.5rem; overflow: hidden; transition: border-color var(--transition); }
.faq-item.open { border-color: var(--accent); }
.faq-q { display: flex; align-items: center; border: none; width: 100%; text-align: left; font-family: inherit; justify-content: space-between; padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text-primary); background: var(--surface); transition: background var(--transition); gap: 1rem; }
.faq-q:hover { background: var(--surface-2); }
.faq-q .faq-chevron { width: 18px; height: 18px; transition: transform 0.3s; flex-shrink: 0; color: var(--text-muted); }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a-inner { padding: 0 1.25rem 1rem; font-size: 14px; color: var(--text-sec); line-height: 1.7; }

/* Responsive Interactive */
@media (max-width: 768px) {
    .quick-stat-row { grid-template-columns: repeat(2, 1fr); }
    .interactive-steps { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
    .step-connector { display: none; }
    .compare-table { grid-template-columns: 1fr; }
    .calc-flow-diagram { flex-wrap: wrap; }
    .formula-cards { grid-template-columns: 1fr; }
    .impact-factors { grid-template-columns: repeat(3, 1fr); }
    .mix-type-grid { grid-template-columns: repeat(2, 1fr); }
    .tg-info { min-width: 140px; }
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(232, 93, 4, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--accent-dark);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(232, 93, 4, 0.6);
}

@media (max-width: 768px) {
.scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 42px;
        height: 42px;
    }
}

/* ============================================
   GLOBAL NAVIGATION & FOOTER (LIGHT THEME)
   ============================================ */
.site-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.logo-accent {
    color: var(--accent);
    font-weight: 800;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-sec);
    font-size: 14.5px;
    font-weight: 600;
    transition: color var(--transition);
}

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

.mobile-menu-toggle {
    display: none !important;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    z-index: 101;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--surface);
        flex-direction: column;
        padding: 80px 2rem 2rem;
        transition: 0.3s ease-in-out;
        box-shadow: -4px 0 15px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
        font-size: 18px;
        border-bottom: 1px solid var(--border-light);
    }
}

/* ============================================
   SITE FOOTER (LIGHT THEME)
   ============================================ */
.site-footer {
    background: var(--surface);
    color: var(--text-sec);
    padding: 4rem 0 1.5rem;
    font-family: var(--font);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col .footer-title {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    display: block;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-col ul li {
    font-size: 14px;
}

.footer-col ul a {
    text-decoration: none;
    color: var(--text-sec);
    transition: color var(--transition);
}

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

/* Brand Column */
.brand-col .site-logo {
    margin-bottom: 1rem;
    display: block;
}

.brand-col p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 280px;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #FFFFFF;
    text-decoration: none;
    transition: all var(--transition);
    border: none;
}

.social-tw { background-color: #1DA1F2; }
.social-fb { background-color: #3b5998; }
.social-in { background-color: #0077b5; }
.social-pi { background-color: #CB2027; }

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* Contact Column */
.contact-col ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-sec);
}

.contact-col ul li svg {
    color: var(--text-muted);
}

/* Language Column */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.lang-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sec);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: all var(--transition);
}

.lang-grid a:hover {
    border-color: #CBD5E1;
    color: var(--text-primary);
    background: var(--surface-2);
}

.lang-grid a.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* Footer Bottom */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    text-align: center;
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive Footer & Header */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

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