html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', sans-serif !important;
}

/* Extracted from index.blade.php */

/* Popup Start */
#popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
    /* Hidden by default */
}

/* Popup image */
#popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 15px #fff
}

/* Close button */
#popupClose {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Popup Ends */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list li {
    padding: 5px 10px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.news-list li a {
    text-decoration: none;
    color: #cc1616;
}

@media (max-width: 768px) {
    .news-section {
        height: auto !important;
    }

    .news-list {
        font-size: 12px;
    }
}

/* Modern Cards Styles */
.modern-event-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #fff;
    height: 340px;
    display: flex;
    flex-direction: column;
}

.modern-event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.card-header-gradient-1 {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.card-header-gradient-2 {
    background: linear-gradient(135deg, #cc1616, #8b0000);
}

.card-header-gradient-3 {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.modern-event-header {
    padding: 15px 20px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.modern-event-header i {
    font-size: 1.3rem;
    margin-right: 10px;
}

.modern-event-body {
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.modern-event-body::-webkit-scrollbar {
    display: none;
}

.modern-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modern-news-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.modern-news-list li:last-child {
    border-bottom: none;
}

.modern-news-list li:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.modern-news-list li a {
    display: flex;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    align-items: center;
    line-height: 1.4;
    font-weight: 500;
}

.modern-news-list li a i {
    color: #cc1616;
    margin-right: 12px;
    font-size: 12px;
    transition: 0.2s ease;
}

.modern-news-list li:hover a i {
    transform: translateX(3px);
}

/* Image Cards Styles */
.image-card-modern {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.image-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.image-card-img-wrapper {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
}

.image-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.image-card-modern:hover .image-card-img-wrapper img {
    transform: scale(1.1);
}

.image-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.badge-upcoming {
    background: linear-gradient(135deg, #0f2027, #203a43);
}

.badge-latest {
    background: linear-gradient(135deg, #cc1616, #8b0000);
}

.badge-notice {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.image-card-body {
    padding: 25px 20px;
    text-align: left;
}

.image-card-date {
    color: #cc1616;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.image-card-date i {
    margin-right: 6px;
}

.image-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.image-card-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    text-decoration: none;
    transition: color 0.3s;
}

.image-card-link i {
    margin-left: 8px;
    transition: transform 0.3s;
}

.image-card-link:hover {
    color: #cc1616;
}

.image-card-link:hover i {
    transform: translateX(5px);
}

/* Placement Card Styles (Compact) */
.mySwiper .swiper-slide {
    width: 300px;
    height: auto;
}

.material-user-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
    height: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.material-user-card:hover {
    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
}

.material-card-header {
    position: relative;
    height: 240px;
    background-color: #f5f5f5;
}

.material-card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.material-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #2e7d32;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.material-card-content {
    padding: 16px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.material-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #212121;
    margin-bottom: 4px;
}

.material-course {
    font-size: 0.85rem;
    color: #757575;
    margin-bottom: 16px;
}

.material-company {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: #d32f2f;
    display: inline-block;
    padding: 6px 16px;
    background: #ffebee;
    border-radius: 20px;
}

.material-company i {
    margin-right: 6px;
}


/* Achievement Cards */
.achievement-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    position: relative;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.achievement-card img {
    transition: transform 0.6s ease;
}

.achievement-card:hover img {
    transform: scale(1.08);
}

.achievement-btn {
    background: transparent;
    color: #cc1616;
    border: 2px solid #cc1616;
    border-radius: 30px;
    padding: 8px 25px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.achievement-btn i {
    margin-left: 8px;
    transition: transform 0.3s;
}

.achievement-btn:hover {
    background: #cc1616;
    color: #fff;
}

.achievement-btn:hover i {
    transform: translateX(4px);
}

.portal-hero-section {
    background-color: #f8f9fa;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/* Carousel Full Width Styling */
.portal-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 70vh;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.portal-carousel-wrapper .carousel-item img {
    width: 100%;
    height: 70vh;
    object-fit: cover;
}

/* Custom Slide Buttons */
.custom-slide-btn {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.4);
    /* Semi-transparent dark background */
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.6);
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 10;
}

.custom-slide-btn:hover {
    background-color: #cc1616;
    /* Brand red on hover */
    border-color: #cc1616;
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
    /* Slight pop effect */
}

.carousel-control-prev.custom-slide-btn {
    left: 20px;
}

.carousel-control-next.custom-slide-btn {
    right: 20px;
}

/* Notice Board / Right Side Styling */
.notice-board-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 550px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notice-header {
    background: linear-gradient(135deg, #cc1616, #8b0000);
    color: #fff;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.notice-header i {
    margin-right: 10px;
    font-size: 1.3rem;
}

.notice-body {
    flex-grow: 1;
    padding: 0;
    overflow: hidden;
    background-color: #fafafa;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-list li {
    border-bottom: 1px dashed #e0e0e0;
    padding: 15px 20px;
    transition: background-color 0.2s;
}

.notice-list li:hover {
    background-color: #fff;
}

.notice-list a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    line-height: 1.4;
}

.notice-list a:hover {
    color: #cc1616;
}

.notice-date {
    font-size: 0.75rem;
    color: #888;
    display: block;
    margin-top: 5px;
}

.badge-new {
    background-color: #ffc107;
    color: #000;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 991px) {
    .portal-carousel-wrapper {
        height: 400px;
        margin-bottom: 1rem;
    }

    .portal-carousel-wrapper .carousel-item img {
        height: 400px;
    }

    .notice-board-card {
        height: 400px;
    }

    .custom-slide-btn {
        width: 40px;
        height: 40px;
    }

    /* Smaller arrows on mobile */
}

.announcements-section {
    background-color: #fcfcfc;
    padding: 3rem 0;
    font-family: 'Poppins', sans-serif;
}

/* Modern App-Like Card Styling */
.info-widget-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    height: 320px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Flush Gradient Headers */
.widget-header {
    padding: 1rem 1.25rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-upcoming {
    background: linear-gradient(135deg, #1e293b, #334155);
}

/* Slate */
.header-latest {
    background: linear-gradient(135deg, #cc1616, #991b1b);
}

/* Crimson */
.header-notices {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Emerald */

/* Seamless Scrolling Area */
.widget-body {
    flex-grow: 1;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    /* Hides content outside the box */
    padding: 0;
}

/* CSS Animation for smooth scrolling */
.scrolling-wrapper {
    position: absolute;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    animation: scrollVertical 15s linear infinite;
}

.widget-body:hover .scrolling-wrapper {
    animation-play-state: paused;
    /* Pauses on hover for reading */
}

@keyframes scrollVertical {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(-100%);
    }
}

/* List Item Styling */
.scrolling-wrapper li {
    padding: 12px 20px;
    border-bottom: 1px dashed #f0f0f0;
    transition: background-color 0.2s;
}

.scrolling-wrapper li:hover {
    background-color: #f8f9fa;
}

.scrolling-wrapper a {
    text-decoration: none;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.scrolling-wrapper a:hover {
    color: #cc1616;
}

.scrolling-wrapper a i {
    color: #cc1616;
    font-size: 0.85rem;
    margin-top: 2px;
}

body {
    background-color: #ffffff;
}

.gallery-container {
    max-width: 1100px;
    margin: 50px auto;
    text-align: center;
}

.gallery-title {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 10px;
}

.gallery .img-large {
    grid-column: span 2;
    grid-row: span 2;
}

.show-more-btn {
    background-color: #d21404;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 20px;
    margin-top: 20px;
}

.show-more-btn:hover {
    background-color: darkred;
}

.achievements-section {
    background-color: #ffffff;
    padding: 2.5rem 0;
    font-family: 'Poppins', sans-serif;
}

.section-header-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #222;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.achievement-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(204, 22, 22, 0.15);
}

.achievement-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    height: 150px;
}

.achievement-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.achievement-card:hover .achievement-img-wrapper img {
    transform: scale(1.08);
}

/* Subtle gradient overlay to make images look richer */
.achievement-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    opacity: 0.6;
}

.achievement-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.achievement-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.achievement-btn {
    background: transparent;
    color: #cc1616;
    border: 2px solid #cc1616;
    border-radius: 30px;
    padding: 5px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    /* Pushes button to bottom if titles vary in length */
}

.achievement-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.achievement-btn:hover {
    background: #cc1616;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(204, 22, 22, 0.2);
}

.achievement-btn:hover i {
    transform: translateX(5px);
}

.stats-institutional-section {
    background-color: #f8f9fa;
    /* Matches the Top Placements background */
    padding: 2.5rem 0;
    font-family: 'Poppins', sans-serif;
}

/* Section Header Matching the Theme */
.stats-header-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #222;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Clean White Cards */
.stat-clean-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Subtle red top border accent */
.stat-clean-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #cc1616;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-clean-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(204, 22, 22, 0.08);
    border-color: rgba(204, 22, 22, 0.1);
}

.stat-clean-card:hover::before {
    transform: scaleX(1);
}

/* Soft Icon Wrappers */
.stat-icon-wrap {
    width: 75px;
    height: 75px;
    background: rgba(204, 22, 22, 0.08);
    /* Very soft red background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-icon-wrap i {
    font-size: 2rem;
    color: #cc1616;
    transition: color 0.3s ease;
}

.stat-clean-card:hover .stat-icon-wrap {
    background: #cc1616;
    transform: scale(1.1);
}

.stat-clean-card:hover .stat-icon-wrap i {
    color: #ffffff;
}

/* Typography */
.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e293b;
    /* Dark slate */
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.stat-number .stat-suffix {
    font-size: 1.8rem;
    color: #cc1616;
    font-weight: 700;
    vertical-align: top;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    /* Muted slate */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

@media (max-width: 768px) {
    .stat-clean-card {
        padding: 2rem 1rem;
    }

    .stat-number {
        font-size: 2.4rem;
    }

    .stat-icon-wrap {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .stat-icon-wrap i {
        font-size: 1.5rem;
    }
}

.portal-hero-section {
    background-color: #f8f9fa;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/* Carousel Full Width Styling */
.portal-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 70vh;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.portal-carousel-wrapper .carousel-item img {
    width: 100%;
    height: 70vh;
    object-fit: cover;
}

/* Custom Slide Buttons */
.custom-slide-btn {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.4);
    /* Semi-transparent dark background */
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.6);
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 10;
}

.custom-slide-btn:hover {
    background-color: #cc1616;
    /* Brand red on hover */
    border-color: #cc1616;
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
    /* Slight pop effect */
}

.carousel-control-prev.custom-slide-btn {
    left: 20px;
}

.carousel-control-next.custom-slide-btn {
    right: 20px;
}

/* Notice Board / Right Side Styling */
.notice-board-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 550px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notice-header {
    background: linear-gradient(135deg, #cc1616, #8b0000);
    color: #fff;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.notice-header i {
    margin-right: 10px;
    font-size: 1.3rem;
}

.notice-body {
    flex-grow: 1;
    padding: 0;
    overflow: hidden;
    background-color: #fafafa;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-list li {
    border-bottom: 1px dashed #e0e0e0;
    padding: 15px 20px;
    transition: background-color 0.2s;
}

.notice-list li:hover {
    background-color: #fff;
}

.notice-list a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    line-height: 1.4;
}

.notice-list a:hover {
    color: #cc1616;
}

.notice-date {
    font-size: 0.75rem;
    color: #888;
    display: block;
    margin-top: 5px;
}

.badge-new {
    background-color: #ffc107;
    color: #000;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 991px) {
    .portal-carousel-wrapper {
        height: 400px;
        margin-bottom: 1rem;
    }

    .portal-carousel-wrapper .carousel-item img {
        height: 400px;
    }

    .notice-board-card {
        height: 400px;
    }

    .custom-slide-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .portal-carousel-wrapper {
        height: auto !important;
        aspect-ratio: 16 / 9;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .portal-carousel-wrapper .carousel-item img {
        height: auto !important;
        aspect-ratio: 16 / 9;
        object-fit: cover !important;
    }

    .notice-board-card {
        height: 350px;
        border-radius: 12px;
    }
}

.announcements-section {
    background-color: #fcfcfc;
    padding: 3rem 0;
    font-family: 'Poppins', sans-serif;
}

/* Modern App-Like Card Styling */
.info-widget-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    height: 320px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Flush Gradient Headers */
.widget-header {
    padding: 1rem 1.25rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-upcoming {
    background: linear-gradient(135deg, #1e293b, #334155);
}

/* Slate */
.header-latest {
    background: linear-gradient(135deg, #cc1616, #991b1b);
}

/* Crimson */
.header-notices {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Emerald */

/* Seamless Scrolling Area */
.widget-body {
    flex-grow: 1;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    /* Hides content outside the box */
    padding: 0;
}

/* CSS Animation for smooth scrolling */
.scrolling-wrapper {
    position: absolute;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    animation: scrollVertical 15s linear infinite;
}

.widget-body:hover .scrolling-wrapper {
    animation-play-state: paused;
    /* Pauses on hover for reading */
}

@keyframes scrollVertical {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(-100%);
    }
}

/* List Item Styling */
.scrolling-wrapper li {
    padding: 12px 20px;
    border-bottom: 1px dashed #f0f0f0;
    transition: background-color 0.2s;
}

.scrolling-wrapper li:hover {
    background-color: #f8f9fa;
}

.scrolling-wrapper a {
    text-decoration: none;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.scrolling-wrapper a:hover {
    color: #cc1616;
}

.scrolling-wrapper a i {
    color: #cc1616;
    font-size: 0.85rem;
    margin-top: 2px;
}

body {
    background-color: #ffffff;
}

.gallery-container {
    max-width: 1100px;
    margin: 50px auto;
    text-align: center;
}

.gallery-title {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 10px;
}

.gallery .img-large {
    grid-column: span 2;
    grid-row: span 2;
}

.show-more-btn {
    background-color: #d21404;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 20px;
    margin-top: 20px;
}

.show-more-btn:hover {
    background-color: darkred;
}

.achievements-section {
    background-color: #ffffff;
    padding: 2.5rem 0;
    font-family: 'Poppins', sans-serif;
}

.section-header-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #222;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.achievement-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(204, 22, 22, 0.15);
}

.achievement-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    height: 150px;
}

.achievement-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.achievement-card:hover .achievement-img-wrapper img {
    transform: scale(1.08);
}

/* Subtle gradient overlay to make images look richer */
.achievement-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    opacity: 0.6;
}

.achievement-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.achievement-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.achievement-btn {
    background: transparent;
    color: #cc1616;
    border: 2px solid #cc1616;
    border-radius: 30px;
    padding: 5px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    /* Pushes button to bottom if titles vary in length */
}

.achievement-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.achievement-btn:hover {
    background: #cc1616;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(204, 22, 22, 0.2);
}

.achievement-btn:hover i {
    transform: translateX(5px);
}

.stats-institutional-section {
    background-color: #f8f9fa;
    /* Matches the Top Placements background */
    padding: 2.5rem 0;
    font-family: 'Poppins', sans-serif;
}

/* Section Header Matching the Theme */
.stats-header-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #222;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Clean White Cards */
.stat-clean-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Subtle red top border accent */
.stat-clean-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #cc1616;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-clean-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(204, 22, 22, 0.08);
    border-color: rgba(204, 22, 22, 0.1);
}

.stat-clean-card:hover::before {
    transform: scaleX(1);
}

/* Soft Icon Wrappers */
.stat-icon-wrap {
    width: 75px;
    height: 75px;
    background: rgba(204, 22, 22, 0.08);
    /* Very soft red background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-icon-wrap i {
    font-size: 2rem;
    color: #cc1616;
    transition: color 0.3s ease;
}

.stat-clean-card:hover .stat-icon-wrap {
    background: #cc1616;
    transform: scale(1.1);
}

.stat-clean-card:hover .stat-icon-wrap i {
    color: #ffffff;
}

/* Typography */
.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e293b;
    /* Dark slate */
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.stat-number .stat-suffix {
    font-size: 1.8rem;
    color: #cc1616;
    font-weight: 700;
    vertical-align: top;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    /* Muted slate */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

@media (max-width: 768px) {
    .stat-clean-card {
        padding: 2rem 1rem;
    }

    .stat-number {
        font-size: 2.4rem;
    }

    .stat-icon-wrap {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .stat-icon-wrap i {
        font-size: 1.5rem;
    }
}

/* =========================================
   MODERN NAVBAR & HEADER STYLES
   ========================================= */

/* Topbar */
.modern-topbar {
    background: linear-gradient(120deg, #000000 0%, #000000 25%, #cc1616 25%, #cc1616 100%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modern-topbar a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
}

.modern-topbar a:hover {
    color: #ffffff;
}

/* Main Header Gradient */
#header {
    background: linear-gradient(120deg, #000000 0%, #000000 12%, #cc1616 12%, #cc1616 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transition: all 0.3s ease-in-out;
}

#header.fixed-top {
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

/* Navbar Links */
.navbar {
    padding: 0;
}

.navbar ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
}

.navbar a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0px;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    white-space: nowrap;
}

/* First item border */
.navbar>ul>li:first-child>a {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar a i {
    margin-left: 3px;
    font-size: 11px;
}

.navbar>ul>li>a:hover,
.navbar>ul>li>.active {
    background: #cc1616;
    color: #ffffff;
}

/* Dropdown Menu UP Scholarship Style */
.navbar .dropdown ul {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 0;
    background: #ffffff;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-radius: 0;
    z-index: 999;
    min-width: 260px;
    border-top: 3px solid #cc1616;
}

.navbar .dropdown:hover>ul {
    opacity: 1;
    visibility: visible;
}

.navbar .dropdown ul li {
    position: relative;
    border-bottom: 1px solid #eeeeee;
}

.navbar .dropdown ul li:last-child {
    border-bottom: none;
}

.navbar .dropdown ul a {
    color: #333333;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background 0.2s ease;
    border-right: none;
}

.navbar .dropdown ul a:hover {
    background: #cc1616;
    color: #ffffff;
    padding-left: 16px;
}

.navbar .dropdown ul .dropdown ul {
    top: 0;
    left: 100%;
    margin-left: 0;
}

.navbar .dropdown ul .dropdown:hover>ul {
    transform: none;
}

.dropdown-menu-left {
    left: auto !important;
    right: 100% !important;
}

/* Middle Branding Area */
.modern-middle-section {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.modern-brand-title {
    font-size: 1.8rem;
    color: #cc1616;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modern-brand-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

/* Responsive Desktop & Mobile Styles */
@media (max-width: 1450px) {
    .navbar a {
        padding: 8px 4px;
        font-size: 10.2px;
        letter-spacing: -0.2px;
    }

    .navbar a i {
        margin-left: 1px;
        font-size: 8px;
    }
}

@media (max-width: 1366px) {
    .navbar a {
        padding: 8px 3px;
        font-size: 9.5px;
        letter-spacing: -0.3px;
    }

    .navbar a i.bi-chevron-down {
        display: none !important;
    }

    /* Target only the chevrons, keeping the home icon visible */
}

@media (max-width: 1200px) {
    .navbar a {
        padding: 8px 2px;
        font-size: 8.8px;
        letter-spacing: -0.4px;
    }
}

@media (max-width: 1080px) {
    .navbar a {
        padding: 8px 1.5px;
        font-size: 8.2px;
        letter-spacing: -0.5px;
    }
}

@media (max-width: 991px) {
    #header {
        display: none !important;
    }
}

@media (max-width: 375px) {
    .mobile-brand-title {
        font-size: 11px !important;
    }

    .mobile-brand-sub {
        font-size: 9px !important;
    }
}

/* Seamless CSS Marquee */
.css-marquee {
    position: relative;
    overflow: hidden;
}

.css-marquee .notice-list {
    animation: scroll-up 20s linear infinite;
}

.css-marquee:hover .notice-list {
    animation-play-state: paused;
}

@keyframes scroll-up {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

/* Modern Admission Button in Sub-navbar */
.modern-admission-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #cc1616 0%, #a81111 100%);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(204, 22, 22, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    animation: pulse-red 2s infinite;
}

.modern-admission-btn i {
    margin-left: 6px;
    font-size: 13px;
    transition: transform 0.3s ease;
}

.modern-admission-btn:hover {
    background: #ffffff;
    color: #cc1616 !important;
    box-shadow: 0 6px 15px rgba(204, 22, 22, 0.4);
    transform: translateY(-2px);
}

.modern-admission-btn:hover i {
    transform: rotate(180deg);
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(204, 22, 22, 0.6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(204, 22, 22, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(204, 22, 22, 0);
    }
}



/* Compact Admission Button in Sub-navbar */
.modern-admission-btn {
    display: inline-flex;
    align-items: center;
    color: #fca5a5 !important;
    font-size: 0.75rem;
    /* Very small */
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid rgba(204, 22, 22, 0.4);
    text-decoration: none;
    line-height: 1.2;
}

.modern-admission-btn i {
    margin-left: 3px;
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.modern-admission-btn:hover {
    background: #cc1616;
    color: #ffffff !important;
    border-color: #cc1616;
}

.modern-admission-btn:hover i {
    transform: translateY(2px);
}

/* MacBook specific compactness */
@media (max-width: 1440px) {
    .w-head h2 {
        font-size: 1.4rem;
    }

    .w-head h5 {
        font-size: 1rem;
    }

    .w-head h6 {
        font-size: 0.8rem;
    }

    .w-logo {
        max-width: 90px;
    }
}

/* =========================================
   SOCIAL MEDIA SECTION STYLES
   ========================================= */
.social-media-feed-section {
    font-family: 'Poppins', sans-serif;
}

.social-feed-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.social-feed-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.social-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.profile-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-badge {
    color: #0095f6;
    font-size: 0.9rem;
}

.post-time {
    font-size: 0.75rem;
    color: #64748b;
}

.social-platform-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.facebook-card .social-platform-icon {
    color: #1877f2;
}

.instagram-card .social-platform-icon {
    color: #e1306c;
}

.linkedin-card .social-platform-icon {
    color: #0a66c2;
}

.social-feed-card:hover .social-platform-icon {
    transform: scale(1.2) rotate(8deg);
}

.social-card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-text {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 1rem;
}

.post-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 12px;
    margin-top: auto;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.social-feed-card:hover .post-image {
    transform: scale(1.05);
}

.social-card-footer {
    margin-top: 1.25rem;
}

.interactions {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.view-post-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cc1616;
    transition: color 0.2s;
}

.view-post-btn:hover {
    color: #991b1b;
}

.follow-us-bar a {
    transition: transform 0.2s, box-shadow 0.2s;
}

.follow-us-bar a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}