/* 
 * DolarKaçLira - Premium Styles
 */

:root {
    --primary: #0F172A;
    --secondary: #1E293B;
    --accent: #10B981;
    /* Green for profit/currency */
    --accent-hover: #059669;
    --danger: #EF4444;
    /* Red for loss */
    --text: #334155;
    --text-light: #64748B;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

[data-theme="dark"] {
    --primary: #F8FAFC;
    --secondary: #E2E8F0;
    --accent: #34D399;
    /* Brighter green for dark mode */
    --accent-hover: #10B981;
    --danger: #F87171;
    /* Brighter red for dark mode */
    --text: #CBD5E1;
    --text-light: #94A3B8;
    --bg: #0F172A;
    --white: #1E293B;
    /* Cards background */
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.75em;
    line-height: 1.2;
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo .symbol {
    color: var(--accent);
    font-size: 1.75rem;
}

.logo .highlight {
    color: var(--text-light);
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

/* Main Content */
.site-content {
    flex: 1;
    padding: 2rem 0;
}

/* Cards & Sections */
.rate-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    transition: transform 0.2s;
}

.rate-card:hover {
    transform: translateY(-2px);
}

.current-rate-display {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    margin: 1rem 0;
}

.rate-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
}

.currency-code {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
}

.rate-change {
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.up {
    color: var(--accent);
}

.down {
    color: var(--danger);
}

/* Calculator */
.calc-widget {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    /* Match Market Summary Width */
    width: 100%;
    margin: 2rem 0 3rem;
    border: 1px solid var(--border);
}

.calc-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Proportional Calculator Layout */
.calc-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    /* Wraps gracefully on very small screens */
    align-items: flex-end;
    /* Align inputs and arrow to bottom */
}

.input-group {
    display: flex;
    flex-direction: column;
}

.col-amount {
    flex: 0 0 100px;
    /* Fixed compact width for amount */
}

.col-currency {
    flex: 1;
    min-width: 180px;
    /* Ensure dropdowns have readable width */
}

.col-arrow {
    flex: 0 0 auto;
    padding-bottom: 0.6rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem;
    /* Slightly compact padding */
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border 0.2s;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.calc-result {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
    margin-top: 1rem;
}

/* Content Area */
.content-area article {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.content-area p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: #475569;
}

.faq-section {
    margin-top: 3rem;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.faq-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

/* Footer */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-light);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        padding: 0 1.5rem;
    }

    .main-nav {
        display: none;
        /* Add JS toggle later if needed */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .calc-row {
        flex-direction: column;
    }

    .col-amount,
    .col-currency,
    .col-arrow {
        min-width: 100%;
        flex: 1;
    }

    .col-arrow {
        align-self: center;
        padding: 0.5rem 0;
        transform: rotate(90deg);
        /* Point down on mobile */
    }
}

/* --- New Shared Styles (Refactored from inline) --- */

/* Breadcrumbs */
.breadcrumb-container {
    margin: 1rem 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb-item+.breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: var(--text-light);
    content: "/";
}

.breadcrumb-item a {
    color: var(--text-light);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 500;
}

/* Long Read / Article Content */
.long-read article {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.long-read h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.long-read h2 {
    margin-top: 2rem;
    color: var(--primary);
    font-size: 1.5rem;
}

.long-read h3 {
    margin-top: 1.5rem;
    color: var(--secondary);
    font-size: 1.25rem;
}

.long-read ul,
.long-read ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.long-read li {
    margin-bottom: 0.5rem;
}

/* Currency Content Specifics */
.currency-card-hero {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.result-box {
    margin: 1rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.converted-value {
    color: var(--accent);
}

.update-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.quick-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.quick-links h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--border);
    color: var(--primary);
}

/* Specific Rates Table/Grid */
.rate-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 1rem;
    border: 1px solid var(--border);
}

.rate-table th,
.rate-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.rate-table th {
    background: var(--bg);
    font-weight: 600;
}

/* Currency Detail Boxes */
.main-rate-display {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    justify-content: center;
}

.rate-box {
    flex: 1;
    min-width: 150px;
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
}

.rate-box .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.rate-box .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.rate-box.change.up .value {
    color: var(--accent);
}

.rate-box.change.down .value {
    color: var(--danger);
}

/* Live Update Flash Animations */
@keyframes flashGreen {
    0% {
        background-color: rgba(16, 185, 129, 0.4);
        color: var(--accent);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes flashRed {
    0% {
        background-color: rgba(239, 68, 68, 0.4);
        color: var(--danger);
    }

    100% {
        background-color: transparent;
    }
}

.flash-up {
    animation: flashGreen 1.5s ease-out;
    border-radius: 4px;
    padding: 0 4px;
}

.flash-down {
    animation: flashRed 1.5s ease-out;
    border-radius: 4px;
    padding: 0 4px;
}

/* Chart Error Message Placeholder */
.chart-error-msg {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-style: italic;
    background: var(--bg);
    border-radius: 8px;
    border: 1px dashed var(--border);
    margin-top: 1rem;
}