* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

/* Ensure dropdowns are not clipped by parent containers on desktop */
.navbar,
.nav-container,
.nav-menu {
    overflow: visible;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.nav-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    margin: 4px 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Mobile: hide nav by default, show when .open applied */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: transparent;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        padding: 12px 16px;
        width: 100%;
    }
}

/* Caret toggle button for dropdowns */
.dropdown {
    position: relative;
}

.caret-toggle {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    padding: 6px 8px;
    margin-left: 6px;
    cursor: pointer;
}

/* Keep caret inline with nav links on desktop */
.nav-container .dropdown > a,
.nav-container .dropdown .caret-toggle {
    display: inline-flex;
    align-items: center;
}

/* Smaller on mobile */
@media (max-width: 768px) {
    .caret-toggle {
        color: var(--text-color);
        background: transparent;
        margin-left: 0;
    }

    .dropdown .dropdown-menu {
        padding-left: 12px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.site-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    /* border: 2px solid rgba(255, 255, 255, 0.12); */
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); */
}

.logo-text {
    font-weight: 700;
}

.footer-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    vertical-align: middle;
    margin-bottom: 10px;
    /* border: 2px solid rgba(255, 255, 255, 0.08); */
}

/* .nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    overflow-x: auto;
    padding: 0;
} */

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    overflow: visible;
    /* desktop fix */
}


.nav-menu::-webkit-scrollbar {
    height: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--accent-color);
}

/* Dropdown menu for navigation */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    min-width: 180px;
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    list-style: none;
    display: none;
    z-index: 200;
    border: 1px solid var(--border-color);
}

/* Make sure dropdown sits above other elements */
.dropdown-menu {
    z-index: 9999;
    top: calc(100% + 6px);
}

.dropdown-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

.dropdown-menu li a:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary-color);
}

/* Typography: keep dropdown link sizes consistent across devices */
.dropdown-menu li a {
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    .dropdown-menu li a {
        font-size: 0.9rem;
        padding: 10px 14px;
    }
}

/* Show dropdown on hover for desktop */
/*.dropdown:hover>.dropdown-menu {*/
/*    display: block;*/
/*}*/


@media (hover: hover) and (pointer: fine) {
    .dropdown:hover>.dropdown-menu {
        display: block;
    }
}


/* REMOVE hamburger / 3 lines completely */
.menu-toggle,
.hamburger,
.nav-toggle {
    display: none !important;
}

/* Also show when `.open` is added (used for click-to-open on mobile and JS toggles) */
.dropdown.open>.dropdown-menu {
    display: block;
}

/* Mobile: allow dropdown items to flow inline (collapsed behavior) */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        display: none;
    }

    /* If you want the dropdown visible on small screens, allow opening via .open class */
    .dropdown.open>.dropdown-menu {
        display: block;
    }
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Sections */
/* .section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
} */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Table Styles */
.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.rates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.rates-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.rates-table th {
    padding: 18px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.rates-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.rates-table tbody tr:hover {
    background-color: #f9fafb;
    transition: background-color 0.2s ease;
}

.rates-table tbody tr:last-child td {
    border-bottom: none;
}

.type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-fd {
    background-color: #dbeafe;
    color: #1e40af;
}

.type-rd {
    background-color: #dbeafe;
    color: #1e40af;
}

.type-mis {
    background-color: #fef3c7;
    color: #92400e;
}

.type-post {
    background-color: #dcfce7;
    color: #166534;
}

.type-coop {
    background-color: #fecaca;
    color: #7f1d1d;
}

.rate-value {
    font-weight: 700;
    color: var(--success-color);
    font-size: 1.1rem;
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.calculator-card,
.results-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.calculator-card h2,
.results-card h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

input[type="number"],
input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: white;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

input[readonly]:focus {
    border-color: var(--border-color);
    box-shadow: none;
}

/* Button Styles */
.btn-calculate {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-calculate:active {
    transform: translateY(0);
}

/* Results Card */
.results-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.results-content {
    display: space-around;
}

.result-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-value.highlight {
    color: var(--success-color);
    background-color: #f0fdf4;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 120px;
    text-align: right;
}

.result-item.total {
    background-color: #f0fdf4;
    padding: 18px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 2px solid var(--success-color);
}

.result-item.total .result-label {
    color: var(--success-color);
    font-weight: 700;
}

.result-item.total .result-value {
    color: var(--success-color);
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    cursor: pointer;
}

.footer-link:hover {
    opacity: 1;
    color: var(--accent-color);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .footer-links {
        gap: 15px;
    }

    .footer-link {
        font-size: 0.85rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .nav-menu {
        width: 100%;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .section-header h1 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .calculator-card,
    .results-card {
        padding: 20px;
    }

    .table-container {
        overflow-x: auto;
    }

    .rates-table {
        font-size: 0.9rem;
    }

    .rates-table th,
    .rates-table td {
        padding: 12px;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .result-value {
        width: 100%;
        text-align: right;
    }

    .container {
        padding: 20px;
    }

    .section-header {
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .section-header h1 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.85rem;
    }

    .calculator-card,
    .results-card {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .rates-table {
        font-size: 0.8rem;
    }

    .rates-table th,
    .rates-table td {
        padding: 8px;
    }

    .type-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .result-item {
        padding: 10px 0;
    }
}

/* Utility Classes */
.currency {
    font-weight: 700;
    color: var(--success-color);
}

.percentage {
    color: var(--primary-color);
    font-weight: 600;
}

#faq .section-header {
    text-align: center;
}

#faq h4,
#faq p {
    text-align: center;
}

/* .calculator-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.calculator-card {
    max-width: 500px;
    width: 100%;
} */


.page-section {
    display: block;
}

/* =========================
   NAV DROPDOWN FIX (LIVE)
   ========================= */

/* Dropdown container */
.navbar .dropdown-menu {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    border-radius: 8px;
    padding: 8px 0;
    list-style: none;
    border: none;
}

/* Remove bullets */
.navbar .dropdown-menu li {
    list-style: none;
}

/* Dropdown links */
.navbar .dropdown-menu li a {
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 16px;
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Hover */
.navbar .dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Prevent visited link color */
.navbar .dropdown-menu li a:visited {
    color: #ffffff !important;
}

/* Desktop: show on hover */
@media (min-width: 769px) {
    .navbar .dropdown:hover > .dropdown-menu {
        display: block;
    }
}

/* Mobile: dropdown opens via JS (.open class) */
@media (max-width: 768px) {
    .navbar .dropdown-menu {
        position: static;
        background: transparent;
        box-shadow: none;
    }

    .navbar .dropdown-menu li a {
        padding-left: 24px;
    }
}
@media (max-width: 768px) {
    .nav-link {
        font-size: 0.9rem;
        /* smaller text */
        padding: 8px 12px;
        /* less height */
        font-weight: 500;
    }

    .dropdown-menu li a {
        font-size: 0.85rem;
        /* dropdown items smaller */
        font-weight: 500;
        padding: 8px 12px;
    }
}
.affiliate-banner {
    margin: 20px 0;
    text-align: center;
}

.affiliate-banner a {
    display: block;
    /* makes full banner clickable */
    background-color: #ff9900;
    /* Amazon orange */
    color: #000;
    padding: 16px 22px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    animation: pulse 2s infinite;
}

/* Pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.6);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 18px rgba(255, 153, 0, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 153, 0, 0);
    }
}

/* Stop animation on hover */
.affiliate-banner a:hover {
    animation: none;
}

