*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

:root {
    --bg-main: #f2f3f7;
    --bg-layer1: #eaeef4;
    --bg-layer2: #dde3ea;
    --bg-glass: rgba(255, 255, 255, 0.15);
    --text-dark: #2b2d30;
    --text-muted: #4c566a;
    --accent-blue: #5b8def;
    --accent-hover: #3d7eff;
    --bg-secondary: #d1d5db;
    --bg-secondary-hover: #b4bac2;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-glass: 0 8px 24px rgba(31, 38, 135, 0.08);
    --font-main: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

section {
    padding: 80px 20px;
}

.hidden {
    display: none;
}

.app-hero {
    text-align: center;
    padding: 60px 20px 35px;
    background: var(--bg-layer1);
    border-bottom: 1px solid #d6dce6;
    box-shadow: var(--shadow-glass);
}

.app-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.app-hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.warning-banner {
    background-color: #fffbeb;
    color: #92400e;
    text-align: center;
    padding: 12px 20px;
    font-weight: 500;
    border-bottom: 1px solid #fde68a;
}

.progress-bar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px auto 60px;
    max-width: 600px;
}

.progress-bar::after,
.progress-bar::before {
    content: '';
    position: absolute;
    top: 30%;
    transform: translateY(-50%);
    height: 4px;
    left: 18px;
    width: calc(100% - 36px);
}

.progress-bar::after {
    background: #ccd4de;
    z-index: 1;
}

.progress-bar::before {
    background: var(--accent-blue);
    width: var(--progress-width, 0%);
    transition: width 0.4s ease;
    z-index: 2;
}

.progress-step {
    position: relative;
    z-index: 3;
    text-align: center;
}

.progress-step .circle {
    width: 36px;
    height: 36px;
    background: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 4px solid #ccd4de;
}

.progress-step p {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-step.active .circle {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.progress-step.completed .circle {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.progress-step.active p,
.progress-step.completed p {
    color: var(--text-dark);
    font-weight: 600;
}

.app-form {
    max-width: 850px;
    margin: 40px auto;
    padding: 40px;
    background: var(--bg-layer1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    border: 1px solid #d4dce6;
}

.app-form h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.form-row {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.two-cols {
    flex-direction: row;
    gap: 20px;
}

.two-cols > div {
    flex: 1;
}

label {
    font-weight: 500;
    color: var(--text-dark);
}

input,
select {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    background: white;
    border: 1px solid #ccd4de;
    border-radius: var(--radius-md);
    transition: border 0.3s ease;
    text-align: center;
}

input:focus,
select:focus {
    border-color: var(--accent-blue);
    outline: none;
}

.phone-group {
    display: flex;
    gap: 10px;
}

.country-code-select {
    flex: 0 0 120px;
}

.error-message {
    color: #c53030;
    font-weight: 500;
    margin-top: 15px;
    text-align: center;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.course-card {
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--bg-layer2);
    border: 2px solid transparent;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    color: var(--text-dark);
}

.course-card:hover {
    background: #e4e9f0;
}

.course-card.selected {
    background: #dce8fd;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.2);
}

.referral-input {
    margin-top: 20px;
    margin-bottom: 10px;
}

.referral-input label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.referral-input input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: white;
    border: 1px solid #ccd4de;
    border-radius: var(--radius-md);
    transition: border 0.3s ease;
}

.referral-input input:focus {
    border-color: var(--accent-blue);
    outline: none;
}

.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 30px;
    gap: 20px;
}
.selection-tip {
    text-align: center;
    padding: 12px;
    margin: 0 auto 24px auto;
    background-color: rgba(0, 123, 255, 0.07);
    border-left: 4px solid #007bff;
    border-radius: 4px;
    max-width: 90%;
}

.selection-tip a {
    font-weight: 600;
    color: #0056b3;
    text-decoration: underline;
}

.price-and-proceed {
    display: flex;
    align-items: center;
    gap: 20px;
}

.price-inline {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.payment-box {
    background: var(--bg-layer2);
    border: 1px solid #ccd4de;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-glass);
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.payment-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.review-details {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ccd4de;
}

.review-details h4 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.review-details p {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.review-details p strong {
    color: var(--text-dark);
}

.course-summary-list {
    list-style: disc;
    padding-left: 20px;
    margin: 10px 0 20px;
    color: var(--text-muted);
}

.payment-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    border-top: 1px dashed #ccc;
    padding-top: 15px;
    color: var(--text-dark);
}

.secure-msg {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.confirmation-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 10px;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
}

.confirmation-check input[type="checkbox"] {
    width: auto;
    flex-shrink: 0;
}

.confirmation-check label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

button,
.btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    text-align: center;
}

.btn--primary {
    background: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(91, 141, 239, 0.2);
}

.btn--primary:hover {
    background: var(--accent-hover);
}

.btn--secondary {
    background: var(--bg-secondary);
    color: var(--text-dark);
    box-shadow: none;
}

.btn--secondary:hover {
    background: var(--bg-secondary-hover);
}

.btn:disabled {
    background-color: var(--bg-secondary);
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn:disabled:hover {
    background-color: var(--bg-secondary);
}

@media (max-width: 768px) {
    .two-cols {
        flex-direction: column;
    }
    .app-hero h1 {
        font-size: 2rem;
    }
    .app-form {
        padding: 24px;
    }
    .action-row {
        flex-direction: column;
        align-items: stretch;
    }
    .price-and-proceed {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .payment-box {
        padding: 24px;
    }
}

/* === CORRECTED FOOTER STYLES START === */
footer {
    background-color: var(--bg-layer1);
    color: var(--text-muted);
    padding: 40px 20px;
    text-align: center; /* This is the key change */
    border-top: 1px solid #d6dce6;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto; /* This centers the container */
}

.footer-center {
    margin-bottom: 15px; /* Adds space between links and copyright */
}

.footer-center ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* This centers the list items */
    gap: 15px 30px;
}

.footer-center a {
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-center a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.copyright {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-center ul {
        flex-direction: column; /* Stacks links on small screens */
        gap: 15px;
    }
}
/* === CORRECTED FOOTER STYLES END === */