/* Modern Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --primary: #0066FF;
    /* Vibrant Blue */
    --primary-dark: #005ce6;
    --primary-light: #e5f0ff;
    --text-dark: #0f172a;
    --text-secondary: #64748b;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 12px;
    --radius-lg: 24px;
}

html,
body {
    font-family: 'Lexend', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-page);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
}

.logo img {
    height: 48px;
    width: auto;
}

/* Center Toggle in Header */
.toggle-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-page);
    padding: 4px;
    border-radius: 99px;
    display: flex;
    border: 1px solid var(--border-color);
}

.toggle-btn {
    padding: 8px 24px;
    border-radius: 99px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.toggle-btn:hover:not(.active) {
    color: var(--text-dark);
}

/* Base Nav */
.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.hamburger {
    display: none;
}

/* Layout */
.content-wrapper {
    margin-top: 80px;
    /* Header height */
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 4rem;
}

/* Hero Section */
.billing-hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}

.billing-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.billing-hero h1 span {
    color: var(--primary);
}

.billing-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Main Card */
.billing-container {
    width: 100%;
    max-width: 1000px;
    padding: 0 1.5rem;
}

.billing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3.5rem;
    border: 1px solid #fff;
    width: 100%;
}

.billing-form {
    display: none;
    animation: fadeIn 0.4s ease;
}

.billing-form.active {
    display: block;
}

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

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

.form-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
}

.form-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-group input::placeholder {
    color: #cbd5e1;
}

/* Amount Input Specifics */
.amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-input-wrapper .currency-symbol {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.amount-input-wrapper input {
    padding-left: 32px;
}

/* Summary Box */
.billing-summary {
    background: var(--bg-page);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-label {
    color: var(--text-secondary);
}

.summary-value {
    font-weight: 500;
    color: var(--text-dark);
}

.summary-row.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.summary-row.total .summary-label,
.summary-row.total .summary-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* Right Side - Payment Methods */
.payment-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.payment-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-option:hover {
    border-color: #94a3b8;
}

.payment-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-icon {
    font-size: 1.5rem;
}

.payment-label {
    font-weight: 500;
    color: var(--text-dark);
}

.payment-option.selected .payment-label {
    color: var(--primary-dark);
}

/* Active Indicator Circle */
.payment-option::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-left: auto;
    transition: all 0.2s;
}

.payment-option.selected::after {
    border-color: var(--primary);
    border-width: 6px;
}


/* Submit Button */
.checkout-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 102, 255, 0.2);
}

.checkout-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(0, 102, 255, 0.3);
}

.checkout-btn:active {
    transform: translateY(0);
}

.secure-badge {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.secure-badge svg {
    color: #10b981;
}

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15vh 5vh 5vw 5vw;
    background: linear-gradient(180deg, rgba(217, 217, 217, 0) 0%, rgba(1, 122, 255, 0.25) 100%);
    font-family: 'Lexend', sans-serif;
    gap: 5vh;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    width: 100vw;
    align-items: flex-start;
    padding: 0 5vw;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
}

.footer-section h3 {
    font-size: 1.5vw;
    margin-bottom: 1vh;
    font-weight: normal;
}

.footer-section a,
.footer-section p {
    text-decoration: none;
    color: #000;
    font-size: 1.1vw;
}

.footer-section.cta {
    border-right: 3px solid #000;
    padding-right: 2vw;
}

.footer-section.cta h2 {
    font-size: 2vw;
    color: #017AFF;
    text-align: center;
    font-weight: normal;
}

.footer-section.cta .button {
    background-color: #017AFF;
    color: #fff;
    padding: 1.5vh 2vw;
    border-radius: 0.5vw;
    text-align: center;
    font-size: 1.2vw;
    transition: transform 0.3s ease;
}

.footer-section.cta .button:hover {
    transform: scale(1.05);
}

.social-links {
    display: flex;
    gap: 1vw;
}

.social-links img {
    width: 2vw;
    height: 2vw;
    opacity: 1;
    /* Reset opacity from new design */
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;
    padding-top: 3vh;
    width: 100%;
    border-top: none;
    /* Reset border from new design */
    margin: 0;
    /* Reset margin */
}

.footer-logo img {
    height: 10vh;
}

.copyright {
    font-size: 1vw;
    color: #000;
    /* Reset color */
}

/* Original Footer Responsive Styles */
@media (max-width: 768px) {
    .footer {
        padding: 5vh 8vw 8vw 8vw;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 6vh 6vw;
        padding: 0;
        width: 100%;
        max-width: none;
        /* Reset max-width */
    }

    .footer-section.cta {
        grid-column: 1 / -1;
        border-right: none;
        padding-right: 0;
        text-align: center;
    }

    .footer-section {
        text-align: left;
        width: 100%;
    }

    .footer-section h3 {
        font-size: 5vw;
        margin-bottom: 2vh;
    }

    .footer-section a,
    .footer-section p {
        font-size: 4vw;
    }

    .footer-section.cta h2 {
        font-size: 8vw;
    }

    .footer-section.cta .button {
        font-size: 4vw;
        padding: 2vh 6vw;
        border-radius: 2vw;
        max-width: 60vw;
        margin: 0 auto;
    }

    .social-links {
        justify-content: flex-start;
        gap: 4vw;
    }

    .social-links img {
        width: 8vw;
        height: 8vw;
    }

    .footer-logo img {
        height: 10vh;
    }

    .copyright {
        font-size: 3.5vw;
        text-align: center;
    }
}


/* Responsive & Mobile Menu */
@media (max-width: 1024px) {
    .form-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        height: 64px;
        padding: 0 1.5rem;
    }

    .content-wrapper {
        margin-top: 64px;
        min-height: calc(100vh - 64px);
    }

    .logo img {
        height: 32px;
    }

    /* Mobile Nav */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 1002;
    }

    .hamburger span {
        width: 24px;
        height: 2px;
        background-color: var(--text-dark);
        transition: all 0.3s ease;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        /* Partial width for better UX */
        max-width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 8rem 2rem;
        gap: 2rem;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
        color: var(--text-dark);
    }

    /* Adjust Toggle for Mobile */
    .toggle-container {
        position: absolute;
        left: 50%;
        transform: translateX(-50%) scale(0.85);
        /* Slightly smaller */
        top: 14px;
        /* Vertically centered-ish relative to 64px header */
        margin: 0;
        border: 1px solid var(--border-color);
    }

    .billing-card {
        padding: 2rem 1.5rem;
    }

    .billing-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 1rem;
    }

    .billing-hero {
        padding: 3rem 1rem 2rem;
    }

    .billing-hero h1 {
        font-size: 1.75rem;
    }

    .billing-card {
        padding: 1.5rem;
    }

    .toggle-container {
        /* On very small screens, maybe move it or just shrink more */
        transform: translateX(-50%) scale(0.75);
    }

    /* Stack summary rows on very small screens if needed, or just smaller font */
    .summary-row {
        font-size: 0.9rem;
    }
}