@media (max-width: 768px) {
    .topbar {
        display: none !important;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

    .topbar-flex {
        justify-content: center;
        text-align: center;
    }

    .top-right {
        display: none;
        /* marquee hide on mobile */
    }

    .header-flex {
        justify-content: center;
        text-align: center;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-primary {
        margin-top: 10px;
    }
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {
    .header-flex {
        text-align: center;
    }

    .nav {
        justify-content: center;
    }

    .btn-primary {
        margin-top: 10px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
        padding: 14px;
    }
}

/* ===== MOBILE MENU FIX ===== */
@media (max-width: 768px) {

    /* hide apply now */
    .btn-primary {
        display: none !important;
    }

    /* hamburger */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 10001;
    }

    .menu-toggle span {
        width: 26px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
    }

    /* overlay */
    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        display: none;
        z-index: 9998;
    }

    .menu-overlay.active {
        display: block;
    }

    /* off-canvas nav */
    .nav {
        position: fixed;
        top: 60px;
        /* header height */
        right: -75%;
        width: 75%;
        height: calc(100vh - 58px);
        background: #1e2a5a;
        display: flex;
        flex-direction: column;
        padding: 30px 20px;
        gap: 22px;
        transition: 0.35s ease;
        z-index: 9999;
        align-items: flex-start;
    }

    .nav.active {
        right: 0;
    }

    .nav a {
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        width: 100%;
    }

    .header-flex {
        justify-content: space-between;
    }
}

/* desktop hide hamburger */
@media (min-width: 769px) {

    .menu-toggle,
    .menu-overlay {
        display: none;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-content p {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .about-cards {
        grid-template-columns: 1fr;
    }

    .about-content h2 {
        font-size: 26px;
    }
}


/* ================= MOBILE OPTIMIZATION ================= */
@media (max-width: 768px) {

    .hero {
        padding: 70px 0 90px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .search-box button {
        display: none;
    }

    /* search box container */
    .search-box {
        max-width: 100%;
        border-radius: 14px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    }

    /* input styling */
    .search-box input {
        width: 100%;
        padding: 16px 18px;
        font-size: 15px;
        text-align: center;
        border-radius: 14px;
    }

    /* placeholder better visibility */
    .search-box input::placeholder {
        color: #888;
        font-size: 14px;
    }
}


@media (max-width: 576px) {
    .phd-card {
        height: 300px;
    }

    .phd-content h3 {
        font-size: 18px;
    }
}



@media (max-width: 768px) {

    .contact-hero-grid,
    .contact-info-grid,
    .contact-main-grid {
        grid-template-columns: 1fr;
    }

    .contact-hero-advanced {
        padding: 80px 0;
    }

    .contact-hero-left h1 {
        font-size: 28px;
    }

    .contact-badges {
        flex-direction: column;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .about-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .about-content h2 {
        font-size: 26px;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .university-hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .university-hero-left h1 {
        font-size: 26px;
        line-height: 1.3;
    }

    /* RIGHT SIDE BOXES FIX */
    .university-hero-right {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        /* 2 cards per row */
        gap: 15px;
    }

    /* last card center */
    .university-hero-right .university-card:last-child {
        grid-column: span 2;
    }

    .university-card {
        padding: 18px 14px;
        border-radius: 12px;
        text-align: center;
    }

    .university-card h3 {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .university-card p {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .ugc-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ugc-layout {
        grid-template-columns: 1fr;
    }

    .ugc-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .ugc-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 992px) {
    .uni-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .uni-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .why-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .why-features {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .why-features {
        grid-template-columns: 1fr;
    }

    .why-content h2 {
        font-size: 26px;
    }
}

/* ===== MOBILE TESTIMONIAL FIX ===== */
@media (max-width: 768px) {

    .testi-wrapper {
        overflow: hidden;
        max-width: 100%;
    }

    .testi-track {
        gap: 0;
    }

    .testi-card {
        flex: 0 0 100%;
        max-width: 100%;
        opacity: 1 !important;
        transform: scale(1) !important;
        padding: 32px 24px;
        border-radius: 18px;
    }

    .testi-card.active {
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
    }

    .testi-text {
        font-size: 15px;
        line-height: 1.8;
    }

    .testi-user img {
        width: 52px;
        height: 52px;
    }
}


/* RESPONSIVE */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .blog-content {
        padding: 24px;
    }

    .blog-img {
        height: 220px;
    }
}

@media (max-width:1200px) {
    .course-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width:768px) {
    .course-layout {
        grid-template-columns: 1fr;
    }

    .course-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .course-btn {
        width: 100%;
        text-align: center;
    }
}

/* MOBILE */
@media (max-width: 991px) {
    .right-sticky-wrapper {
        position: static;
    }
}

/* ===== MOBILE OPTIMIZATION ===== */
@media (max-width: 767px) {

    .detail-hero {
        padding: 45px 0;
    }

    .detail-hero h1 {
        font-size: 24px;
        line-height: 1.3;
    }

    .detail-hero p {
        font-size: 14px;
        margin-top: 8px;
    }

    .badge-tag {
        font-size: 12px;
        padding: 5px 12px;
    }

    .detail-box {
        padding: 20px;
        margin-bottom: 18px;
    }

    .detail-box h2 {
        font-size: 18px;
    }

    .detail-box p {
        font-size: 14px;
    }

    .bullet-list li,
    .number-list li {
        font-size: 14px;
    }

    /* TABLE MOBILE SAFE */
    .custom-table {
        overflow-x: auto;
    }

    .custom-table table {
        min-width: 600px;
    }

    .custom-table thead th,
    .custom-table tbody td {
        font-size: 13px;
        padding: 10px;
    }

    /* RIGHT SIDE */
    .right-sticky-wrapper {
        position: static;
    }

    .side-box {
        padding: 20px;
    }

    .side-box h4 {
        font-size: 18px;
    }

    .info-list li,
    .related-list li {
        font-size: 14px;
    }

    /* FORM */
    .inquiry-form input,
    .inquiry-form select {
        padding: 12px;
        font-size: 14px;
    }

    .inquiry-form button {
        padding: 14px;
        font-size: 15px;
    }
}

/* ===== MOBILE VIEW FIX ===== */
@media (max-width: 767px) {

    .detail-hero {
        padding: 45px 0;
    }

    .detail-hero h1 {
        font-size: 24px;
    }

    .detail-hero p {
        font-size: 14px;
    }

    .detail-box {
        padding: 20px;
    }

    .detail-box h2 {
        font-size: 18px;
    }

    .bullet-list li,
    .number-list li {
        font-size: 14px;
    }

    /* TABLE MOBILE SAFE */
    .custom-table {
        overflow-x: auto;
    }

    .custom-table table {
        min-width: 600px;
    }

    /* REMOVE STICKY ON MOBILE */
    .right-sticky-wrapper {
        position: static;
    }

    .side-box {
        padding: 20px;
    }

    .side-box h4 {
        font-size: 18px;
    }

    .inquiry-form button {
        font-size: 15px;
        padding: 15px;
    }
}

/* MOBILE */
@media (max-width: 768px) {

    .blog-showcase-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .blog-editorial {
        padding: 30px;
    }

    .blog-editorial h2 {
        font-size: 24px;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .blog-detail-hero {
        padding: 70px 0 60px;
    }

    .blog-detail-hero h1 {
        font-size: 26px;
    }

    .blog-subtitle {
        font-size: 15px;
    }

    .blog-article {
        padding: 30px;
    }

    .blog-sidebar {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .detail-box table,
    .detail-box thead,
    .detail-box tbody,
    .detail-box th,
    .detail-box td,
    .detail-box tr {
        display: block;
        width: 100%;
    }

    .detail-box thead {
        display: none;
    }

    .detail-box tbody tr {
        margin-bottom: 15px;
        background: #fff;
        border-radius: 10px;
        padding: 10px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    }

    .detail-box tbody td {
        border: none;
        padding: 8px 0;
    }

    .detail-box tbody td:first-child {
        font-weight: 700;
        color: #0b2c6a;
    }
}