/**
 * EZ Virtual Tools - Marine Calculator Suite
 * Dark theme with ocean blue accent (#0ea5e9)
 */

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --accent-light: rgba(14, 165, 233, 0.1);
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #06b6d4;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-brand span { color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; }

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active { color: var(--accent); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.page-container { padding-top: 1.5rem; padding-bottom: 3rem; }

.breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-separator { margin: 0 0.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.card-header { margin-bottom: 1.5rem; }
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.card-description { color: var(--text-secondary); font-size: 0.875rem; }

.calc-card {
    display: block;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-decoration: none;
    transition: all 0.2s;
}

.calc-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.calc-card h3 { color: var(--text-primary); font-size: 1rem; margin-bottom: 0.5rem; }
.calc-card p { color: var(--text-secondary); font-size: 0.8rem; line-height: 1.5; }

.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.375rem; }

.form-input, .form-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-block { width: 100%; }
.btn-lg { padding: 0.875rem 1.5rem; font-size: 1rem; }

.result-box { background: var(--bg-tertiary); border-radius: 0.5rem; padding: 1rem; }
.result-highlight { background: var(--accent-light); border: 1px solid var(--accent); }
.result-highlight .result-value { color: var(--accent); font-size: 1.5rem; }

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.result-row:last-child { border-bottom: none; }
.result-label { color: var(--text-secondary); font-size: 0.85rem; }
.result-value { color: var(--text-primary); font-weight: 600; font-size: 0.95rem; }

.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
th, td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-tertiary); color: var(--text-secondary); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; }
td.highlight { color: var(--accent); font-weight: 600; }

.alert { padding: 1rem; border-radius: 0.5rem; font-size: 0.85rem; }
.alert-success { background: rgba(34, 197, 94, 0.1); border: 1px solid var(--success); color: var(--success); }
.alert-warning { background: rgba(245, 158, 11, 0.1); border: 1px solid var(--warning); color: var(--warning); }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--error); color: var(--error); }
.alert-info { background: rgba(6, 182, 212, 0.1); border: 1px solid var(--info); color: var(--info); }

.tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; flex-wrap: wrap; }
.tab-btn { padding: 0.5rem 1rem; background: transparent; border: none; color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; border-radius: 0.375rem; transition: all 0.2s; }
.tab-btn:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.tab-btn.active { background: var(--accent); color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.hero { text-align: center; padding: 3rem 0; }
.hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-secondary); font-size: 1rem; max-width: 600px; margin: 0 auto; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; margin-top: 2rem; }
.hero-stat-value { font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); }

.section { margin-top: 2.5rem; }
.section-header { margin-bottom: 1.25rem; }
.section-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.section-description { color: var(--text-secondary); font-size: 0.85rem; }

.footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 1.5rem; text-align: center; margin-top: 3rem; }
.footer p { color: var(--text-muted); font-size: 0.8rem; }
.footer a { color: var(--accent); text-decoration: none; }

.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-secondary); flex-direction: column; padding: 1rem; gap: 0.75rem; border-bottom: 1px solid var(--border); }
    .nav-links.open { display: flex; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.5rem; }
    .hero-stats { gap: 1.5rem; }
    .hero-stat-value { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .card { padding: 1rem; }
    .result-highlight .result-value { font-size: 1.25rem; }
}

/* ============================================================
   UNIFIED FOOTER STYLES
   ============================================================ */
.footer {
    background: var(--bg-secondary, #12121a);
    border-top: 1px solid var(--border, #2a2a35);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary, #f0f0f5);
}

.footer-brand span {
    color: var(--accent, #0ea5e9);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: var(--text-secondary, #a0a0b0);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.footer-link:hover {
    color: var(--accent, #0ea5e9);
    background: rgba(14, 165, 233, 0.1);
}

.footer-link.active {
    color: var(--accent, #0ea5e9);
    font-weight: 500;
}

.footer-copy {
    color: var(--text-muted, #6b6b7b);
    font-size: 0.8rem;
}

.footer-copy a {
    color: var(--accent, #0ea5e9);
    text-decoration: none;
}

.footer-disclaimer {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary, #a0a0b0);
}
