/* ======= GLOBAL VARIABLES ======= */
:root {
    --primary-color: #1e2a3a;  /* Dark navy blue from the logo */
    --primary-dark: #17202b;
    --secondary-color: #f3f4f6;
    --text-color: #374151;
    --text-light: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --border-color: #e5e7eb;
    --accent-color: #3b82f6;
}

/* ======= GLOBAL RESET & BASE STYLES ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9fafb;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3, h4 {
    color: #1f2937;
    margin-bottom: 20px;
}

/* ======= COMMON CARD STYLES ======= */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.card h2 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* ======= HEADER STYLES ======= */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: white;
    margin-bottom: 0;
}

.subtitle {
    color: #e5e7eb;
    font-size: 1rem;
    font-weight: normal;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
}

/* Logo Styling */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 65px;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 2.2rem;
    margin: 0;
    color: white;
    letter-spacing: 1px;
}

/* Navigation */
nav {
    margin-left: 25px;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 12px;
}

nav ul li {
    margin: 0;
    white-space: nowrap;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.header-bottom {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ======= FOOTER STYLES ======= */
.footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px 0;
    color: white;
    font-size: 0.9rem;
    background-color: var(--primary-color);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
}

.footer-links a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ======= ALERT/INFO COMPONENTS ======= */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    background-color: #fff8e6;
    border-left: 4px solid var(--warning-color);
}

.info-banner {
    background-color: var(--secondary-color);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 6px;
    text-align: center;
}

/* ======= FEATURE BANNER ======= */
.feature-banner {
    background-color: var(--secondary-color);
    padding: 40px 0;
    margin-bottom: 30px;
    text-align: center;
}

.feature-banner h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-banner p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-light);
}

/* ======= RESPONSIVE STYLES FOR COMMON ELEMENTS ======= */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .logo img {
        height: 55px;
    }
    
    nav ul {
        margin-top: 10px;
        gap: 5px;  /* Reduced from 12px */
        flex-wrap: wrap;  /* Allow items to wrap if needed */
    }
    
    nav ul li {
        margin-left: 0;
        margin-right: 5px;  /* Reduced from 15px */
    }
    
    nav ul li a {
        padding: 8px 10px;  /* Reduced from 10px 14px */
        font-size: 0.9rem;  /* Slightly smaller text */
    }

    .footer .container {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Fix for menu bar covering text on mobile */
    .header-bottom {
        padding-top: 110px !important;  /* Reduced from 100px */
        margin-top: 0;
    }
    
    header {
        min-height: 190px;  /* Reduced from 180px */
    }
    
    .header-top {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10;
        background-color: var(--primary-color);
    }
}

/* ======= HOME PAGE SPECIFIC STYLES (index.html) ======= */
/*
 * The following components are only used on the home page:
 * - Tax calculator form with inputs
 * - Results display with tabs
 * - Tax breakdown tables
 * - State coverage map
 */

/* Calculator Layout */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
}

/* Form Components */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-full {
    grid-column: 1 / -1;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

select, input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    width: 100%;
}

button:hover {
    background-color: var(--primary-dark);
}

/* Currency Input with Dollar Sign */
.currency-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 15px;
    font-size: 16px;
    color: var(--text-color);
    z-index: 1;
}

.currency-input-container input {
    padding-left: 30px;
}

/* Results Display with Cards */
.results {
    background-color: white;
}

.results h3 {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.results h3:first-child {
    margin-top: 0;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.result-item {
    padding: 15px;
    background-color: var(--secondary-color);
    border-radius: 6px;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Summary Box with Border */
.result-summary {
    background-color: #f0f9ff;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 6px;
    margin-top: 25px;
}

.result-summary h3 {
    color: var(--primary-color);
    border-bottom: none;
    margin: 0 0 15px 0;
    padding: 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-item.total {
    font-weight: 600;
    font-size: 1.1rem;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #cce5ff;
}

/* Tax Breakdown Tables */
.tax-breakdown {
    margin: 20px 0;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.breakdown-table th, .breakdown-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-table th {
    background-color: var(--secondary-color);
    font-weight: 600;
}

.breakdown-table tr:last-child td {
    border-bottom: none;
}

/* Tab Navigation System */
.tab-group {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab.active {
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Utility Classes for Calculator */
.chart-container {
    height: 200px;
    margin-top: 20px;
}

.income-source {
    display: none;
}

.hidden {
    display: none;
}

/* Map Container for State Coverage */
.map-container {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
}

.map-title {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.map-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Service Hours Box (if needed) */
.service-hours {
    margin-top: 40px;
    background-color: #f0f9ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.service-hours h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.hours-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hours-item {
    display: flex;
    justify-content: space-between;
}

.day {
    font-weight: 600;
}

/* ======= CONTACT PAGE SPECIFIC STYLES (contact.html) ======= */
/*
 * The following components are only used on the contact page:
 * - Contact cards with contact methods
 * - Cryptocurrency donation section
 * - Two-column layout for contact and donation
 */

/* Contact Section Layout */
.contact-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* Contact Cards with Hover Effects */
.contact-card {
    background-color: var(--secondary-color);
    padding: 25px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.contact-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-card h3 svg {
    margin-right: 10px;
}

.contact-card p {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.contact-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.contact-card a:hover {
    color: #4B5563;
}

.contact-intro {
    margin-bottom: 30px;
}

/* Contact Methods with Icons */
.contact-method {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.contact-method svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.contact-method a, .contact-method span {
    line-height: 1.4;
}

/* Credentials Section (if needed) */
.credentials {
    margin-top: 10px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
}

.credentials h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.credentials ul {
    list-style-type: none;
}

.credentials li {
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.credentials li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
}

/* Bitcoin Donation Section */
.donation-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.donation-section h2 {
    color: var(--primary-color);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.crypto-donation {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.crypto-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.crypto-address {
    font-family: monospace;
    padding: 12px 15px;
    background-color: #f0f9ff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    margin: 15px 0;
    width: 100%;
    text-align: center;
    word-break: break-all;
}

.support-note {
    font-style: italic;
    color: var(--text-light);
    text-align: center;
    margin-top: 15px;
}

/* Advisor Badge (if needed) */
.advisor-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 10px;
    vertical-align: middle;
}

/* Two-Column Layout for Contact & Donation */
.contact-donation-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .contact-donation-container {
        grid-template-columns: 1fr;
    }
}

/* ======= REFERENCE PAGE SPECIFIC STYLES (reference.html) ======= */
/*
 * The following components are only used on the reference page:
 * - Reference section containers
 * - Reference item cards with hover effects
 * - Grid layout for reference items
 * - Link styling for reference links
 */

/* Reference Section Container */
.reference-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.reference-section h2 {
    color: var(--primary-color);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

/* Reference Categories */
.reference-category {
    margin-bottom: 30px;
}

.reference-category h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* Reference Items Grid Layout */
.reference-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Reference Item Cards with Hover Effects */
.reference-item {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reference-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reference-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.reference-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Reference Links Styling */
.reference-links {
    margin-top: 10px;
}

.reference-links a {
    display: block;
    color: #2563eb;
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 0.9rem;
    word-break: break-all;
}

.reference-links a:hover {
    text-decoration: underline;
}