@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@500&display=swap");

body {
    font-family: "Rubik", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eaedf4;
    color: #333;
}

header {
    text-align: center;
    padding: 20px 10px;
    background-color: #00a859;
    color: white;
    transition: background-color 0.3s ease;
}

header h1 {
    font-family: 'Poppins', 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 2.2rem;
    margin: 0 0 15px 0;
}

.network-switcher-container {
    width: 100%;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.network-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px 20px;
}

.network-btn {
    flex: 1;
    max-width: 160px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.network-btn.safaricom {
    background-color: #00a859;
    color: white;
}

.network-btn.airtel {
    background-color: #e82524;
    color: white;
}

.network-btn.telkom {
    background-color: #2596be;
    color: white;
}

.network-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.network-btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.packages-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.packages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding: 20px;
    margin: 0 auto;
}

.card {
    height: 240px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 25px 20px;
    background: white;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.card.safaricom {
    border-top: 4px solid #00a859;
}

.card.airtel {
    border-top: 4px solid #e82524;
}

.card.telkom {
    border-top: 4px solid #2596be;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.card img {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    margin-top: -20px;
    object-fit: contain;
}

.card.telkom img {
    background: #2596be;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card h2 {
    font-size: 18px;
    margin: 10px 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card p {
    font-size: 16px;
    margin: 10px 0;
    font-weight: bold;
}

.cta-button {
    display: block;
    width: 80%;
    margin: 10px auto;
    padding: 10px 15px;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.main-cta {
    width: 200px;
    margin: 30px auto;
    padding: 15px 30px;
    font-size: 16px;
    background-color: #00a859;
}

.main-cta:hover {
    background-color: #008c4d;
}

.get-started-container {
    text-align: center;
    margin: 20px 0;
}

.promo-banner {
    background-color: #007b3c;
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 16px;
    animation: blink 1s infinite;
}

.data-tracker {
    text-align: center;
    margin: 20px auto;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    max-width: 400px;
}

.data-tracker h2 {
    margin-bottom: 15px;
    color: #007b3c;
}

.progress-bar {
    width: 100%;
    background-color: #ddd;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
    margin: 15px 0;
}

.progress {
    height: 100%;
    background-color: #00a859;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

footer {
    text-align: center;
    padding: 20px 10px;
    background-color: #00a859;
    color: white;
    margin-top: 30px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.footer-links button {
    background-color: #007b3c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.footer-links button:hover {
    background-color: #005f2c;
}

.animated-footer {
    animation: blink 1s infinite;
    margin-bottom: 15px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.contact-button, .work-with-us-button {
    margin: 5px;
    padding: 10px 20px;
    background-color: #007b3c;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-button:hover, .work-with-us-button:hover {
    background-color: #005f2c;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-height: 80%;
    overflow: hidden;
    position: relative;
    color: #333;
}

/* Network-specific modal styles */
.modal-content.safaricom-theme {
    border-top: 4px solid #00a859;
}

.modal-content.safaricom-theme h2,
.modal-content.safaricom-theme .confirm-button {
    color: #00a859;
}

.modal-content.airtel-theme {
    border-top: 4px solid #e82524;
}

.modal-content.airtel-theme h2,
.modal-content.airtel-theme .confirm-button {
    color: #e82524;
}

.modal-content.telkom-theme {
    border-top: 4px solid #2596be;
}

.modal-content.telkom-theme h2,
.modal-content.telkom-theme .confirm-button {
    color: #2596be;
}

/* Network-specific confirmation styles */
.confirmation-header.safaricom-theme {
    background-color: #00a859;
}

.confirmation-header.airtel-theme {
    background-color: #e82524;
}

.confirmation-header.telkom-theme {
    background-color: #2596be;
}

.policy-modal .modal-content {
    max-width: 700px;
}

.policy-modal h3 {
    color: #007b3c;
    margin: 20px 0 10px;
}

.policy-modal p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.scrollable-content, .scrollable-modal-content {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding-right: 10px;
}

.scrollable-content::-webkit-scrollbar,
.scrollable-modal-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-thumb,
.scrollable-modal-content::-webkit-scrollbar-thumb {
    background-color: #007b3c;
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-track,
.scrollable-modal-content::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #007b3c;
}

.modal-content label {
    display: block;
    margin: 10px 0 5px;
    font-weight: 500;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.terms-checkbox {
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terms-checkbox input[type="checkbox"] {
    width: auto;
    margin: 4px 0 0;
}

.terms-checkbox label {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.terms-checkbox a {
    color: #007b3c;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.close-button:hover {
    color: #007b3c;
}

.confirm-button {
    background-color: #007b3c;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 10px;
}

.confirm-button:hover {
    background-color: #005f2c;
}

.confirmation-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

.confirmation-header {
    background-color: #00a859;
    color: white;
    padding: 24px;
    border-radius: 16px 16px 0 0;
    text-align: center;
    position: relative;
}

.success-icon {
    background-color: white;
    color: #00a859;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}

.confirmation-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.confirmation-body {
    padding: 24px;
}

.thank-you {
    text-align: center;
    color: #666;
    font-size: 18px;
    margin-bottom: 24px;
}

.order-summary {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.order-summary h3 {
    color: #00a859;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.summary-item .label {
    color: #495057;
    font-weight: 500;
}

.summary-item .value {
    color: #212529;
    font-weight: 600;
}

.next-steps {
    margin-bottom: 24px;
}

.next-steps h3 {
    color: #00a859;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
}

.next-steps ol {
    margin: 0;
    padding-left: 20px;
}

.next-steps li {
    color: #495057;
    margin-bottom: 12px;
    line-height: 1.5;
}

.support-note {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.close-message-button {
    display: block;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
    padding: 12px;
    background-color: #00a859;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.close-message-button:hover {
    background-color: #008c4d;
}

.loading-animation {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    justify-content: center;
    align-items: center;
    z-index: 1002;
    flex-direction: column;
}

.loading-animation p {
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    animation: fadeInText 1.5s ease-in-out infinite;
}

.loading-animation .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #00a859;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInText {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.official-email {
    font-weight: bold;
    font-size: 16px;
    color: #007b3c;
    text-align: center;
    margin: 15px 0;
}

.official-email a {
    color: #007b3c;
    text-decoration: none;
    transition: color 0.3s;
}

.official-email a:hover {
    color: #005f2c;
    text-decoration: underline;
}

/* Update button colors based on network */
.safaricom .cta-button {
    background-color: #00a859;
}

.airtel .cta-button {
    background-color: #e82524;
}

.telkom .cta-button {
    background-color: #2596be;
}

.safaricom .cta-button:hover {
    background-color: #008c4d;
}

.airtel .cta-button:hover {
    background-color: #d41c1b;
}

.telkom .cta-button:hover {
    background-color: #1c7a9e;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .network-switcher {
        padding: 10px 30px;
        gap: 15px;
        margin: 0 30px;
    }

    .network-btn {
        min-width: 100px;
        padding: 10px 15px;
        font-size: 13px;
    }

    .packages {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }

    .card {
        padding: 20px 15px;
        height: 200px;
    }

    .card h2 {
        font-size: 16px;
    }

    .card p {
        font-size: 14px;
    }

    .cta-button {
        padding: 8px 12px;
        font-size: 12px;
    }

    .modal-content {
        padding: 15px;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
    }

    .footer-links button {
        width: 200px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .network-switcher {
        padding: 10px 20px;
        gap: 10px;
        margin: 0 20px;
    }

    .network-btn {
        min-width: 90px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .packages {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .card {
        padding: 15px 10px;
        height: 180px;
    }

    .card img {
        width: 40px;
        margin-top: -15px;
    }

    .card h2 {
        font-size: 14px;
        margin: 8px 0;
    }

    .card p {
        font-size: 12px;
        margin: 8px 0;
    }

    .cta-button {
        padding: 6px 10px;
        font-size: 11px;
    }

    .promo-banner {
        font-size: 14px;
    }

    .main-cta {
        width: 180px;
        padding: 12px 20px;
    }

    .terms-checkbox label {
        font-size: 12px;
    }

    .confirmation-message {
        width: 95%;
    }

    .confirmation-header {
        padding: 20px;
    }

    .confirmation-header h2 {
        font-size: 20px;
    }

    .confirmation-body {
        padding: 20px;
    }

    .thank-you {
        font-size: 16px;
    }

    .order-summary h3,
    .next-steps h3 {
        font-size: 16px;
    }

    .summary-item {
        font-size: 14px;
    }

    .next-steps li {
        font-size: 14px;
    }

    .close-message-button {
        width: calc(100% - 40px);
        margin: 0 20px 20px;
        font-size: 14px;
    }
}