/* ===== Global Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #F4F6F8;
    --card-bg: #ffffff;
    --text-main: #0A192F;
    --text-sub: #555;
    --header-dark: #0A192F;
    --green: #00BFA6;
    --green-hover: #008f7a;
    --hero-gradient: linear-gradient(135deg, #0A192F 0%, #00BFA6 60%, #38EF7D 100%);
    --border: rgba(0, 0, 0, 0.1);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg: #050d1a;
    --card-bg: #112240;
    --text-main: #ffffff;
    --text-sub: #a8b2d1;
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    transition: 0.3s ease;
}

/* ===== UNIFIED HEADER ===== */
header {
    background: var(--header-dark);
    padding: 15px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    max-height: 50px;
}

.header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 15px;
    transition: 0.3s;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--green);
}

.dark-mode-toggle {
    background: var(--green);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    margin-left: 10px;
}

/* ===== HAMBURGER STYLES ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== Hero Banner ===== */
.finance-hero {
    background: var(--hero-gradient);
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ===== Main Container ===== */
.finance-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

/* ===== Tool Card ===== */
.tool-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 45px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    width: 100%;
    text-align: center;
}

.tool-card h2 {
    color: var(--green);
    margin-bottom: 10px;
    font-size: 2rem;
    font-weight: 800;
}

/* ===== Converter Grid ===== */
.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 30px;
    position: relative;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.currency-input,
.currency-select {
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text-main);
    transition: 0.3s;
    font-weight: 600;
}

.currency-input:focus,
.currency-select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.1);
}

.result-input {
    background: rgba(0, 191, 166, 0.05);
    border-color: var(--green);
    font-weight: 700;
    color: var(--green);
    font-size: 1.3rem;
}

/* ===== Swap Button ===== */
.swap-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--green);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 191, 166, 0.3);
    z-index: 10;
    font-weight: 700;
}

.swap-btn:hover {
    background: var(--green-hover);
    transform: translate(-50%, -50%) rotate(180deg);
    box-shadow: 0 8px 20px rgba(0, 191, 166, 0.4);
}

.swap-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* ===== Exchange Rate Display ===== */
.exchange-rate-display {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 191, 166, 0.05);
    border-radius: 12px;
    border: 2px solid var(--green);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Info Cards ===== */
.info-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    width: 100%;
    text-align: left;
}

.info-card h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--green);
    font-weight: 800;
    font-size: 1.8rem;
}

.info-card ul {
    margin-left: 20px;
    margin-top: 15px;
}

.info-card ul li {
    margin-bottom: 12px;
    color: var(--text-sub);
    line-height: 1.7;
}

.info-card ul li strong {
    color: var(--green);
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item strong {
    display: block;
    color: var(--green);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-sub);
    line-height: 1.7;
}

/* ===== Additional Tools Links ===== */
.tool-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.tool-link-btn {
    display: inline-block;
    background: var(--green);
    color: #fff !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.2s ease;
    border: 2px solid var(--green);
}

.tool-link-btn:hover {
    background: var(--green-hover);
    transform: translateY(-1px);
}

/* ===== Footer ===== */
footer {
    background: var(--header-dark);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-top: 50px;
}

footer a,
footer a:visited {
    color: var(--green) !important;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 600;
    transition: 0.3s;
}

footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }

    .header-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--header-dark);
        padding: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        gap: 15px;
        text-align: center;
    }

    .header-nav.active {
        display: flex;
    }

    .dark-mode-toggle {
        margin: 10px 0 0 0;
        width: fit-content;
        align-self: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .tool-card {
        padding: 30px 20px;
    }

    .converter-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .swap-btn {
        position: static;
        transform: none;
        margin: 0 auto;
        grid-column: 1;
        order: 2;
    }

    .swap-btn:hover {
        transform: rotate(90deg);
    }

    .input-group:nth-child(1) {
        order: 1;
    }

    .input-group:nth-child(2) {
        order: 3;
    }

    .input-group:nth-child(4) {
        order: 4;
    }

    .input-group:nth-child(5) {
        order: 5;
    }
}

/* Hamburger Animation */
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
