/* static/css/styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(145deg, #0a2f4d 0%, #136b63 55%, #4a1d6e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    position: relative;
}

/* main container - refined responsive grid with balanced proportions */
.poster {
    max-width: 1280px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 30px 55px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 360px;
    transition: all 0.2s ease;
}

/* LEFT PANEL — main content */
.left {
    background: #ffffff;
    padding: 2rem 2rem 2rem 2rem;
    position: relative;
    z-index: 2;
}

/* header area */
.top {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.logo-marker {
    width: 68px;
    height: 68px;
    background: linear-gradient(125deg, #0b3b66, #2b5b8b);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 12px 22px -8px rgba(11, 59, 102, 0.4);
    letter-spacing: -0.5px;
}

.top h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: #0b3b66;
    line-height: 1.2;
    letter-spacing: -0.3px;
    margin: 0;
}

.tag {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c6979;
    margin-top: 6px;
    letter-spacing: 0.2px;
    border-left: 3px solid #d6a51a;
    padding-left: 12px;
}

/* section title */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #0b3b66;
    margin: 0.75rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* university grid — fully responsive desktop grid */
.univ-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 1.25rem;
}

.univ-item {
    background: #f8faff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    transition: all 0.2s;
    border: 1px solid #eef2f9;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.univ-item:hover {
    background: #ffffff;
    border-color: #cbdff2;
    transform: translateY(-1px);
}

.cap {
    width: 36px;
    height: 36px;
    background: linear-gradient(125deg, #d6a51a, #e9bc3b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #2c2c2c;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.univ-item div:last-child {
    font-weight: 600;
    color: #1f3b4c;
    font-size: 0.9rem;
}

/* NSFAS block */
.nsfas {
    background: #eef5fa;
    padding: 0.9rem 1.2rem;
    border-radius: 20px;
    margin: 1rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border-left: 5px solid #178f86;
}

.nsfas strong {
    color: #0b3b66;
}

/* services card */
.services {
    background: #fefaf0;
    border-radius: 20px;
    padding: 1.2rem 1.2rem;
    margin: 1rem 0;
    border: 1px solid #f3e5c7;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.services ul {
    list-style: none;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.services li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e4e;
}

.check {
    background: #0b3b66;
    width: 26px;
    height: 26px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Pricing Table Styles */
.pricing-table {
    margin: 20px 0 10px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    border: 2px solid #eef2f6;
    transition: all 0.2s;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.pricing-card.featured {
    border-color: #d6a51a;
    background: linear-gradient(180deg, #fff, #fffcf5);
}

.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #d6a51a;
    color: #1a2f3f;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.pricing-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: #0b3b66;
    margin-bottom: 10px;
}

.pricing-card .price {
    font-size: 2rem;
    font-weight: 800;
    color: #0b3b66;
    margin: 10px 0;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
}

.pricing-card li {
    font-size: 0.85rem;
    padding: 6px 0;
    color: #4a5568;
}

.pricing-cta {
    background: #0b3b66;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.pricing-cta:hover {
    background: #178f86;
}

/* Package Options */
.package-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0 20px;
}

.package-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.package-option:hover {
    border-color: #178f86;
    background: #f0f9f7;
}

.package-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.package-option div {
    flex: 1;
}

.package-option strong {
    display: block;
    color: #0b3b66;
    font-size: 1rem;
}

.package-detail {
    font-size: 0.75rem;
    color: #64748b;
}

.package-option.selected {
    border-color: #178f86;
    background: #f0f9f7;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin: 1.2rem 0 0.5rem;
    background: #ffffff;
    border-top: 2px dashed #e2e8f0;
    padding-top: 1.2rem;
}

.price .amount {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.7rem;
    font-weight: 800;
    color: #0b3b66;
    line-height: 1;
    letter-spacing: -1px;
}

.cta {
    background: linear-gradient(95deg, #e9b12e, #d6a51a);
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #1a2f3f;
    cursor: pointer;
    box-shadow: 0 10px 18px -6px rgba(214, 165, 26, 0.5);
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.cta:hover {
    transform: scale(1.02);
    background: linear-gradient(95deg, #f0bc3c, #e2ae2a);
    box-shadow: 0 14px 22px -8px rgba(214, 165, 26, 0.6);
}

/* RIGHT SIDEBAR — refined for desktop */
.right {
    background: #fafcff;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-left: 1px solid #e2edf7;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.02);
}

.card {
    background: white;
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 8px 18px rgba(11, 59, 102, 0.06);
    border: 1px solid #eef2f6;
    transition: 0.1s;
}

.contact .row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.icon {
    width: 40px;
    height: 40px;
    background: #178f86;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.big {
    font-weight: 700;
    color: #0b3b66;
    font-size: 0.9rem;
}

.small {
    font-size: 0.7rem;
    color: #5d6f83;
    letter-spacing: 0.2px;
}

.accent-strip {
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #0b3b66, #d6a51a, #178f86, #6b2d90);
    grid-column: 1 / -1;
}

/* MODAL styles - fully responsive */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 32px;
    padding: 2rem 1.8rem;
    box-shadow: 0 35px 55px rgba(0, 0, 0, 0.3);
    font-family: 'Open Sans', sans-serif;
}

.modal-content h3 {
    font-family: 'Montserrat', sans-serif;
    color: #0b3b66;
    font-size: 1.7rem;
    margin-bottom: 1rem;
}

.modal input, .modal select {
    width: 100%;
    padding: 12px 14px;
    margin: 8px 0 18px;
    border: 1.5px solid #e0e9f0;
    border-radius: 16px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fefefe;
    transition: 0.2s;
}

.modal input:focus, .modal select:focus {
    outline: none;
    border-color: #178f86;
    box-shadow: 0 0 0 3px rgba(23, 143, 134, 0.2);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 12px 0 18px;
    max-height: 260px;
    overflow-y: auto;
    padding: 1rem;
    background: #f9fbfe;
    border-radius: 20px;
    border: 1px solid #eef2f8;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 5px;
}

.modal button {
    background: #0b3b66;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    transition: 0.2s;
}

.modal button.close-btn {
    background: #94a3b8;
    margin-top: 8px;
}

.modal button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: #0b3b66;
    color: white;
    padding: 14px 28px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    transition: opacity 0.25s ease, visibility 0.25s;
    pointer-events: none;
    white-space: nowrap;
}

/* Success Popup Styles */
#successPopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 3000;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px; /* ensures some top/bottom spacing on small screens */
}

#successPopup > div {
    background: white;
    max-width: 450px;
    width: 100%;
    border-radius: 28px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 25px 45px rgba(0,0,0,0.3);
    animation: popIn 0.3s ease-out;
    max-height: calc(100vh - 64px); /* allow inner scrolling on small viewports */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#successPopup h3 {
    color: #0b3b66;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 12px;
}

#closePopupBtn {
    background: linear-gradient(95deg, #e9b12e, #d6a51a);
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    color: #1a2f3f;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: 0.2s;
}

#closePopupBtn:hover {
    transform: scale(1.02);
    background: linear-gradient(95deg, #f0bc3c, #e2ae2a);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive: tablet & desktop breakpoints */
@media (max-width: 960px) {
    .poster {
        grid-template-columns: 1fr;
        border-radius: 1.5rem;
    }
    .right {
        border-left: none;
        border-top: 1px solid #e2edf7;
        order: 2;
    }
    .left {
        order: 1;
    }
    .top h1 {
        font-size: 1.6rem;
    }
    .univ-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 620px) {
    body {
        padding: 1rem;
    }
    .univ-grid {
        grid-template-columns: 1fr;
    }
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    .price-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .cta {
        width: 100%;
        text-align: center;
    }
    .toast {
        white-space: normal;
        text-align: center;
        width: 90%;
        font-size: 0.8rem;
    }
}

/* small improvements */
.small-text-note {
    font-size: 0.7rem;
    text-align: center;
    margin-top: 1rem;
    color: #64748b;
}

#uniCountDisplay {
    margin: 10px 0;
    font-size: 13px;
    color: #178f86;
    font-weight: 600;
}

/* Left-column card typography — match site styles */
.left .card {
    font-size: 0.95rem;
    color: #1f3b4c;
    line-height: 1.45;
    background: linear-gradient(135deg, #fff9f0, #fff5e6);
    border: 1px solid #ffe6b3;
    margin: 1.5rem 0;
    padding: 16px;
}

.left .card .card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0b3b66;
    margin: 0;
}

.left .card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.left .card .emoji {
    font-size: 1.6rem;
    line-height: 1;
}

.left .card .cao-note {
    background: #e8f0fe;
    border-left: 4px solid #0b3b66;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    color: #173a58;
    font-weight: 600;
}

.left .card .important-note {
    margin-bottom: 12px;
    color: #5a3e0b;
    background: #fef3d6;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.left .card .univ-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

.left .card .fee {
    font-size: 0.85rem;
    color: #6b6b6b;
    font-weight: 600;
}

.left .card .cao-list {
    margin-top: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ffe6b3;
}

.left .card .cao-badges .pill {
    background: #eef2f7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-right: 8px;
}

.left .card .cao-note-small {
    font-size: 0.8rem;
    margin-top: 8px;
    color: #666;
}

.left .card .card-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #e6d5b8;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.left .card .card-footer .muted {
    font-size: 0.85rem;
    color: #4b4b4b;
}

.left .card .card-footer .confirm {
    font-size: 0.85rem;
    font-weight: 600;
    color: #d6a51a;
}