/* --- Google Fonts & Global Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #800000;
    /* Maroon */
    --dark-color: #333333;
    /* Dark Grey for Text */
    --light-color: #f7f7f7;
    /* Light Grey for backgrounds */
    --white-color: #FFFFFF;
    --box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--white-color);
    color: var(--dark-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: #a52a2a;
    /* Lighter maroon on hover */
}

ul {
    list-style-type: none;
}

.container {
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 0 2rem;
}

/* --- Header & Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    background: var(--white-color);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.navbar .logo img {
    height: 50px;
}

.navbar .nav-links {
    display: flex;
    /* Keep flex for desktop */
}

.navbar .nav-links li {
    padding: 0 1.2rem;
    position: relative;
}

.navbar .nav-links li a {
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.navbar .nav-links>li>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar .nav-links>li>a:hover::after,
.navbar .nav-links>li>a.active::after {
    width: 100%;
}

/* Hamburger menu icon */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px; /* Space between bars */
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animation for hamburger to 'x' */
.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}


/* --- Hero Section --- */
.hero {
    height: 75vh;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('Images/ITI-Campus.jpeg') no-repeat center center/cover;
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-in-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    animation: fadeInUp 1s ease-in-out 0.5s;
    animation-fill-mode: both;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}


/* --- Utility & General Sections --- */
.section {
    padding: 4rem 0;
}

.section:nth-child(even) {
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    opacity: 0.3;
}

/* New class for general descriptive paragraphs */
.section-description {
    text-align: center;
    max-width: 800px;
    margin: -2rem auto 4rem auto;
}

/* --- Modern Button --- */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white-color) !important;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(128, 0, 0, 0.2);
}

.btn:hover {
    background: #a52a2a;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(128, 0, 0, 0.3);
}

/* --- Updated Cards with Images --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white-color);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-img {
    height: 200px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}


.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.card-content h3 i {
    margin-right: 10px;
}

/* --- Facilities Scroller Styles --- */
.facilities-scroller-container {
    max-width: 100%;
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
    mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

.facilities-scroller {
    display: flex;
    width: max-content;
    gap: 2rem;
    animation: scroll 40s linear infinite;
}

.facilities-scroller-container:hover .facilities-scroller {
    animation-play-state: paused;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.facility-card {
    flex: 0 0 320px;
    /* Card width */
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    border-top: 4px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-color 0.3s ease;
}

.facility-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
}

.facility-card-img {
    height: 200px;
}

.facility-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facility-card-content {
    padding: 1.5rem;
}

.facility-card-content h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.facility-card-content p {
    font-size: 0.9rem;
}

/* --- Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Dropdown Menu Styles --- */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 150%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--white-color);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 220px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: top 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    border-top: 3px solid var(--primary-color);
}

.dropdown:hover .dropdown-menu {
    display: block;
    top: 100%;
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--dark-color);
    font-weight: 400;
}

.dropdown-menu li a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.navbar .nav-links li a .fa-caret-down {
    font-size: 0.8em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown:hover>a .fa-caret-down {
    transform: rotate(180deg);
}

/* --- About Page Styles --- */
#history,
#vision-mission,
#president-desk {
    scroll-margin-top: 100px;
    /* Offset for sticky nav */
}

.about-section-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.about-image {
    flex: 1;
    max-width: 450px;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
}

.president-section-container {
    margin-top: 4rem;
    padding: 3rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
}

.section-subtitle {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.president-card {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.president-photo {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 5px solid var(--white-color);
}

.president-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.president-message {
    flex: 1;
}

.vision-mission-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.vm-card {
    background: var(--white-color);
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-top: 4px solid var(--primary-color);
}

.vm-icon {
    margin: 0 auto 1.5rem auto;
    width: 70px;
    height: 70px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.vm-card:hover .vm-icon {
    transform: scale(1.1) rotate(10deg);
}

.vm-card h4 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* --- Contact & News Page Styles --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-details h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-details p {
    margin-bottom: 2rem;
}

.contact-details ul li {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.contact-details ul li i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
    width: 25px;
    text-align: center;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adjusted minmax for better mobile flow */
    gap: 2rem;
}

.news-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.news-card-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.btn-news {
    display: inline-block;
    margin-top: auto;
    color: var(--primary-color);
    font-weight: 600;
    align-self: flex-start;
}

.btn-news:hover {
    text-decoration: underline;
}

.announcement-list .announcement-item {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 5px solid var(--primary-color);
}

.announcement-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.announcement-item .badge {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 3px 8px;
    font-size: 0.8rem;
    border-radius: 5px;
    margin-left: 10px;
}

/* --- Styles for Committees, Downloads, etc. --- */
.committee-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
    /* Offset for sticky nav */
}

.committee-section h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

/* Responsive Table Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1.5rem;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Ensure table doesn't shrink too much */
    box-shadow: var(--box-shadow);
}

.styled-table thead {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap; /* Prevent text wrapping in table cells */
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: var(--light-color);
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
}

.styled-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 1rem;
}

.styled-list li {
    margin-bottom: 0.5rem;
}

/* --- Downloads Page Styles --- */
.download-item {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    border-left: 5px solid var(--primary-color);
    scroll-margin-top: 100px;
    /* Offset for sticky nav */
}

.download-item:last-child {
    margin-bottom: 0;
}

.download-item h3 {
    font-size: 1.6rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.download-item h3 i {
    color: var(--primary-color);
    margin-right: 1rem;
}

.download-item .btn {
    margin-top: 1rem;
}

/* --- Admission Popup Modal --- */
.popup-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.popup-overlay.active {
    display: flex;
    /* Shown when active */
}

.popup-content {
    position: relative;
    background: var(--white-color);
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: zoomIn 0.3s ease-out;
}

.popup-content img {
    width: 100%;
    height: auto;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.popup-text {
    padding: 1.5rem 2rem;
}

.popup-text h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.popup-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: var(--white-color);
    border: 2px solid var(--white-color);
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 30px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* --- Footer Styles --- */
.footer {
    background: var(--dark-color);
    color: #ccc;
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 3rem;
}

.footer-col {
    padding: 0 1rem;
}

.footer-col h4 {
    color: var(--white-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    background-color: var(--primary-color);
    height: 2px;
    width: 50px;
}

.footer-logo {
    width: 80px;
    margin-bottom: 1rem;
}

.footer-college-name {
    color: var(--white-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-col.footer-about {
    grid-column: span 1;
}

.footer-col.footer-about p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    display: inline-flex;
    height: 40px;
    width: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    margin-right: 10px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    color: var(--white-color);
    transition: all 0.5s ease;
    justify-content: center;
    align-items: center;
}

.social-links a:hover {
    color: var(--white-color);
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 1rem;
}

.footer-links ul li a {
    color: #ccc;
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--white-color);
    padding-left: 5px;
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-contact ul li i {
    color: var(--primary-color);
    margin-right: 1rem;
    font-size: 1.1rem;
    margin-top: 4px;
}

.footer-map-col iframe {
    width: 100%;
    height: 250px;
    border-radius: var(--border-radius);
    border: 0;
}

.footer-bottom {
    background-color: #222;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* --- Footer Credit --- */
.footer-credit {
    background-color: #1a1a1a;
    color: #aaa;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
}

.footer-credit a {
    color: var(--white-color);
    font-weight: 600;
}

.footer-credit a:hover {
    color: var(--primary-color);
}


/* --- Recruiter Logo Card Styles --- */
.recruiter-logo-card {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    background-color: #ffffff;
    /* Ensures a clean background */
    border-top: none;
    /* Removes the top border from the generic card style */
}

.recruiter-logo-card img {
    max-width: 90%;
    max-height: 70px;
    object-fit: contain;
    /* Prevents the logo from stretching */
    filter: grayscale(100%);
    /* Optional: makes logos uniform */
    transition: filter 0.3s ease;
}

.recruiter-logo-card:hover img {
    filter: grayscale(0%);
    /* Optional: adds color on hover */
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .navbar {
        flex-wrap: wrap; /* Allow items to wrap */
        justify-content: space-between;
        padding: 0.8rem 1.5rem;
    }

    .navbar .logo {
        margin-right: auto; /* Push logo to left */
    }

    .navbar .logo span {
        font-size: 1rem; /* Smaller logo text on tablets */
    }

    .menu-toggle {
        display: flex; /* Show hamburger menu */
    }

    .navbar .nav-links {
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Position below header */
        left: 0;
        background: var(--white-color);
        box-shadow: var(--box-shadow);
        overflow: hidden;
        max-height: 0; /* Hidden by default */
        transition: max-height 0.3s ease-out;
    }

    .navbar .nav-links.active {
        max-height: 400px; /* Adjust based on content */
        border-top: 1px solid var(--light-color);
    }

    .navbar .nav-links li {
        padding: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--light-color);
    }

    .navbar .nav-links li:last-child {
        border-bottom: none;
    }

    .navbar .nav-links li a {
        padding: 1rem;
        display: block;
    }

    /* Adjust dropdowns for mobile menu */
    .dropdown-menu {
        position: static; /* Remove absolute positioning */
        transform: none;
        box-shadow: none;
        border-top: none;
        border-radius: 0;
        background-color: var(--light-color);
        padding: 0;
        min-width: unset;
        width: 100%;
        opacity: 1;
        visibility: visible;
        max-height: 0; /* Hide by default */
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .dropdown:hover .dropdown-menu {
        display: block;
        max-height: 200px; /* Adjust based on dropdown content */
    }

    .dropdown-menu li a {
        padding: 0.75rem 2.5rem; /* Indent sub-items */
    }


    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-section-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .vision-mission-container {
        grid-template-columns: 1fr;
    }

    .president-card {
        flex-direction: column;
        text-align: center;
    }

    .president-photo {
        margin-bottom: 1.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer-col.footer-about,
    .footer-map-col {
        grid-column: span 2;
    }
}


@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .navbar .logo img {
        height: 40px;
    }

    .navbar .logo span {
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .section-description {
        margin: -1.5rem auto 3rem auto; /* Adjust margin */
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Smaller min-width for cards */
        gap: 1.5rem;
    }

    .card-content h3 {
        font-size: 1.2rem;
    }

    /* Facilities Scroller adjustments */
    .facility-card {
        flex: 0 0 280px; /* smaller card width on mobile */
    }

    .popup-content {
        max-width: 95%; /* Make popup slightly wider on small screens */
    }
    .popup-text {
        padding: 1rem 1.5rem;
    }
    .popup-text h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    .popup-close {
        top: -8px;
        right: -8px;
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
        line-height: 25px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-bottom: 2rem;
    }

    .footer-col.footer-about,
    .footer-map-col,
    .footer-col.footer-links,
    .footer-col.footer-contact {
        grid-column: span 1;
        padding: 0 1rem;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact ul li {
        justify-content: center;
    }

    .styled-table {
        min-width: 500px; /* Adjust min-width for mobile tables */
    }
}

@media (max-width: 480px) {
    .navbar .logo {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .navbar .logo img {
        height: 35px;
    }

    .navbar .logo span {
        font-size: 0.8rem;
        line-height: 1.2;
        text-align: left;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .about-text h3 {
        font-size: 1.8rem;
    }

    .president-photo {
        width: 140px;
        height: 140px;
    }

    .vm-card h4 {
        font-size: 1.3rem;
    }

    .contact-details ul li {
        font-size: 0.9rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .contact-details ul li i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .news-card-title {
        font-size: 1.1rem;
    }

    .announcement-item h4 {
        font-size: 1rem;
    }
    .announcement-item .badge {
        margin-left: 5px;
        padding: 2px 5px;
        font-size: 0.7rem;
    }

    .download-item h3 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .footer-college-name {
        font-size: 1rem;
    }

    .styled-table {
        min-width: 400px; /* Smallest comfortable width for a basic table */
    }
}