/***** deterrent only — hurts UX; optional *****/
html, body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea {
  -webkit-user-select: text;
  user-select: text;
}
:root {
    --brand: #6c5ce7;
    --muted: #6c757d;
    --brand-1: #000000;
    --brand-2: #005501af;
}

/* ✅ fixed selector + hard stop for horizontal overflow */
html,
body {
    overflow-x: clip;
    /* stricter than hidden, avoids 1-2px “sliver” */
    height: 100%;
    width: 100%;
}

body {
    font-family: Inter, system-ui, Segoe UI, Roboto, Arial;
    margin: 0;
    color: #222;
    --contact-bar-height: 40px;
    --nav-height: 60px;
}

/* Adjust heights for different screens */
@media (max-width: 768px) {
    body {
        --contact-bar-height: 55px;
        --nav-height: 70px;
    }
}

@media (max-width: 576px) {
    body {
        --contact-bar-height: 50px;
        --nav-height: 60px;
    }
}

/* ---------- Contact Bar ---------- */
.contact-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
    backdrop-filter: blur(8px);
    background: rgba(0, 87, 10, 0.664);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 6px 15px;
    /* height: var(--contact-bar-height); */
}

.contact-bar .container {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.contact-bar .link {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.contact-bar .link:hover {
    color: rgb(181, 181, 181);
}

@media (max-width: 576px) {
    .contact-bar .link {
        font-size: 0;
        padding: 6px 8px;
    }

    .contact-bar .link i {
        font-size: 1.2rem;
        margin-right: 0;
    }

    .contact-bar .container {
        justify-content: center;
        gap: 10px;
    }
}

/* ======= Navbar ======= */
.navbar {
    position: fixed;
    top: var(--contact-bar-height);
    min-height: var(--nav-height);
    left: 0;
    width: 100%;
    z-index: 1030;
    backdrop-filter: blur(10px);
    background: rgba(0, 87, 10, 0.664);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    filter: brightness(0) invert(1);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.navbar-toggler {
    border: 0;
}

.navbar-toggler-icon {
    filter: invert(1) grayscale(100%);
}

.brand-dot {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, purple, rgba(0, 128, 0, 0.505));
    border-radius: 9999px;
    display: inline-block;
}

.btn-pill {
    border-radius: 9999px;
    padding: 0.55rem 1rem;
    font-weight: 700;
}

.navbar .navbar-nav .nav-link {
    color: white;
    font-weight: 700;
}

.navbar .navbar-nav .nav-link:hover {
    color: rgb(205, 205, 205);
}

.btn-brand {
    background: linear-gradient(60deg, #000, #027b2e);
    color: #fff;
    padding: 10px;
    border-radius: 20px 0px 20px 0px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-brand:hover {
    background: linear-gradient(135deg, #006950, #2e2e2e);
    transform: scale(1.05);
    box-shadow:
        0 15px 30px rgba(50, 93, 69, 0.35),
        0 10px 20px rgba(0, 0, 0, 0.25),
        inset 0 -2px 5px rgba(10, 64, 36, 0.5);
    border: 2px solid #fff;
    color: white;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 9999px;
    background: #ff4757;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .navbar-collapse {
        background: rgba(0, 87, 10, 0.8);
        padding: 10px;
        margin-top: 10px;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: center;
    }

    .nav-item {
        margin: 5px 0;
    }

    .btn-brand,
    #navCartBtn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Images of Subjects */
.option-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    display: block;
    margin: 0 auto 10px auto;
}

.option-title {
    display: block;
    text-align: center;
    font-size: 1rem;
    color: #000000;
    font-weight: 800;
}

.option-price {
    display: block;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .option-image {
        width: 120px;
        height: 120px;
    }

    .option-title {
        font-size: 0.9rem;
    }

    .option-price {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .option-image {
        width: 100px;
        height: 100px;
    }

    .option-title {
        font-size: 0.8rem;
    }

    .option-price {
        font-size: 0.7rem;
    }
}

/* Purchase Section */
.hero {
    padding: 80px 0 40px;
    background: linear-gradient(90deg, #fff 0%, #f8f9ff 100%);
    text-align: center;
    margin-top: 50px;
    animation: fadeIn 1.5s ease-in-out;
}

.purchase-section {
    padding: 20px 0;
}

.note-card {
    background: linear-gradient(135deg, #ffffff, #e6f3ff);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(33, 33, 33, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.note-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 87, 10, 0.2);
}

.note-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.note-card:hover .note-img {
    opacity: 0.9;
}

.note-body {
    padding: 16px;
}

.price {
    background: linear-gradient(90deg, #ffecb3, #ffd7a6);
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.note-title {
    margin: 10px 0 6px;
    font-size: 18px;
    color: #027b2e;
}

.note-meta {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.buy-btn {
    background: linear-gradient(60deg, #000, #027b2e);
    color: #fff;
    padding: 10px;
    border-radius: 20px 0px 20px 0px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background: linear-gradient(135deg, #006950, #2e2e2e);
    transform: scale(1.05);
    box-shadow:
        0 15px 30px rgba(50, 93, 69, 0.35),
        0 10px 20px rgba(0, 0, 0, 0.25),
        inset 0 -2px 5px rgba(10, 64, 36, 0.5);
    border: 2px solid #fff;
}

@media (max-width: 992px) {
    .hero {
        padding: 60px 0 30px;
    }

    .note-img {
        height: 150px;
    }

    .note-body {
        padding: 12px;
    }

    .note-title {
        font-size: 16px;
    }

    .note-meta {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 40px 0 20px;
    }

    .note-img {
        height: 120px;
    }

    .note-body {
        padding: 10px;
    }

    .price {
        font-size: 0.9rem;
        padding: 4px 8px;
    }

    .note-title {
        font-size: 14px;
        margin: 8px 0 4px;
    }

    .note-meta {
        font-size: 11px;
    }

    .buy-btn {
        width: 100%;
        font-size: 0.9rem;
        padding: 8px;
    }
}

/* Course Page */
.course-page {
    display: none;
    padding: 100px 0;
    margin-top: 50px;
    /* background: linear-gradient(180deg, #f0faff, #e0f7e9); */
    animation: slideUp 1s ease-out;
}

.subject-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    background: linear-gradient(45deg, #ffffff, #006e1477  );
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subject-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 87, 10, 0.15);
}

.option-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.option-btn {
    flex: 1;
    min-width: 180px;
    padding: 10px;
    background: linear-gradient(90deg, #0273357c, #d9f2e6);
    border: 1px solid #00542e;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background: linear-gradient(90deg, #d9f2e6, #0273357c);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgb(0, 0, 0);
    border: 1px solid #00542e;
}

@media (max-width: 992px) {
    .course-page {
        padding: 80px 0;
    }

    .subject-card {
        padding: 12px;
    }

    .option-btn {
        min-width: 140px;
    }
}

@media (max-width: 576px) {
    .course-page {
        padding: 50px 0;
    }

    .subject-card {
        padding: 8px;
    }

    .option-btn {
        min-width: 100px;
        padding: 8px;
    }
}

/* Breadcrumbs */
.crumbs {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 14px;
}

.crumbs a {
    color: #006950;
    font-size: 1rem;
    font-weight: 600;
}

.crumbs a:hover {
    color: #006950;
    font-weight: 700;
}

@media (max-width: 576px) {
    .crumbs {
        font-size: 12px;
    }

    .crumbs a {
        font-size: 0.9rem;
    }
}

/* Purchase Modal - Centered Adjustment with Consistent Border Radius and Hover Border */
.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - var(--contact-bar-height) - var(--nav-height));
    margin-top: calc(var(--contact-bar-height) + var(--nav-height));
}

.modal-dialog-centered {
    justify-content: center;
}

.modal-content {
    margin: auto;
    width: 100%;
    max-width: 500px; /* Optional: Limit max width for better centering */
}

.modal-header {
    border-bottom: 1px solid #d1e7dd;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    background: #f8fffb;
    color: #222;
}

.modal-footer {
    border-top: 1px solid #d1e7dd;
}

#confirm-purchase,
#buy-now {
    background: #006950; /* Different color */
    color: #fff;
    padding: 10px;
    border-radius: 20px 0px 20px 0px; /* Matching border radius */
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

#confirm-purchase:hover,
#buy-now:hover {
    background: #004d3d; /* Different hover color */
    transform: scale(1.05);
    box-shadow:
        0 15px 30px rgba(50, 93, 69, 0.35),
        0 10px 20px rgba(0, 0, 0, 0.25),
        inset 0 -2px 5px rgba(10, 64, 36, 0.5);
    border: 2px solid #fff; /* Matching hover border */
    color: white;
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        min-height: calc(100% - var(--contact-bar-height) - var(--nav-height));
    }

    .modal-content {
        margin: 0;
        width: 90%;
    }

    .modal-body {
        padding: 10px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .purchase-btn-primary,
    #buy-now {
        width: 100%;
    }
}

/* Global Cart Modal - Centered Adjustment with Consistent Border Radius and Hover Border */
#navCartModal .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - var(--contact-bar-height) - var(--nav-height));
    margin-top: calc(var(--contact-bar-height) + var(--nav-height));
}

#navCartModal .modal-dialog-centered {
    justify-content: center;
}

#navCartModal .modal-content {
    margin: auto;
    width: 100%;
    max-width: 700px; /* Slightly larger for cart */
}

#navCartModal .modal-header {
    border-bottom: 1px solid #d1e7dd;
}

#navCartModal .modal-title {
    font-weight: 700;
}

#navCartModal .modal-body {
    background: #f0fff4;
    color: #222;
}

#navCartModal .modal-footer {
    border-top: 1px solid #d1e7dd;
}

#nav-cart-clear,
#navCartModal .btn-secondary,
#navCartModal .btn-success {
    background: #dc3545; /* Different color for clear */
    color: #fff;
    padding: 10px;
    border-radius: 20px 0px 20px 0px; /* Matching border radius */
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

#navCartModal .btn-secondary {
    background: #6c757d; /* Different color for secondary */
}

#navCartModal .btn-success {
    background: #28a745; /* Different color for success */
}

#nav-cart-clear:hover,
#navCartModal .btn-secondary:hover,
#navCartModal .btn-success:hover {
    background: #c82333; /* Different hover color for clear */
    transform: scale(1.05);
    box-shadow:
        0 15px 30px rgba(50, 93, 69, 0.35),
        0 10px 20px rgba(0, 0, 0, 0.25),
        inset 0 -2px 5px rgba(10, 64, 36, 0.5);
    border: 2px solid #fff; /* Matching hover border */
    color: white;
}

#navCartModal .btn-secondary:hover {
    background: #5a6268; /* Different hover color for secondary */
}

#navCartModal .btn-success:hover {
    background: #218838; /* Different hover color for success */
}

@media (max-width: 768px) {
    #navCartModal .modal-dialog {
        margin: 0.5rem;
        min-height: calc(100% - var(--contact-bar-height) - var(--nav-height));
    }

    #navCartModal .modal-content {
        margin: 0;
        width: 90%;
    }

    #navCartModal .modal-body {
        padding: 10px;
    }

    #navCartModal .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    #nav-cart-clear,
    #navCartModal .btn-secondary,
    #navCartModal .btn-success {
        width: 100%;
    }
}

/* Footer */
.footer {
    background: linear-gradient(160deg, var(--brand-1), var(--brand-2));
    color: #fff;
}

.footer a {
    color: #e6f3ff;
    text-decoration: none;
}

.footer a:hover {
    color: #fff;
}

.fw-bold img {
    filter: brightness(0) invert(1);
}

@media (max-width: 992px) {
    .footer .row {
        flex-direction: column;
        text-align: center;
    }

    .footer .col-md-4,
    .footer .col-md-2,
    .footer .col-md-3 {
        margin-bottom: 20px;
    }
}

.policy-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.policy-content h2 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 10px;
    color: #027b2e;
}

.policy-content ul {
    list-style-type: disc;
    padding-left: 20px;
}

.policy-content p,
.policy-content ul {
    margin-bottom: 15px;
}

@media (max-width: 576px) {
    .policy-content {
        font-size: 0.9rem;
    }

    .policy-content h2 {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}