.logo1 {
    position: relative;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center; 
    font-size: 30px;
    color: white;
    z-index: 1000;
    cursor: pointer;
}

.logo1 img {
    padding-top: 6px;;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.decrypt-text {
    line-height: 1; 
    display: inline-block;
    vertical-align: middle;
}

.logo2 {
    position: fixed;
    top: 45%;
    left: 53%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    z-index: -1;
}

.logo2 img {
    width: 90vmin;
    height: 90vmin;
    object-fit: contain;
}

/* Table container */
.faculties-container {
    width: 90%;
    margin: 120px auto;
    margin-top: 60px;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 20;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: auto;
    max-height: none;
    overflow: hidden;
}

@media (min-width: 1800px) {
    .faculties-container {
        width: 70%;
    }
}

.faculties h2 {
    text-align: center;
    color: white;
    margin-bottom: 12px;
    font-size: clamp(18px, 2.2vh, 22px);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.faculties h3 {
    text-align: center;
    color: white;
    margin-bottom: 0px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.03em;
}

/* Modern Clean Table Logic */
.faculties-table {
    width: 100%;
    margin: 0 auto;
    border-collapse: separate; 
    border-spacing: 0 clamp(2px, 0.6vh, 8px); /* Gap between rows */
    color: #e0e0e0;
}

.faculties-table thead th {
    text-align: left;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.faculties-table tbody tr {
    background-color: #0000002f;
    backdrop-filter: blur(3px);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px; /* This works because of separate borders */
}

/* Fix rounded corners on table rows by applying to first/last cells */
.faculties-table td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.faculties-table td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

.faculties-table tbody tr:hover {
    background-color: #000000d9;
    transform: scale(1.02);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.faculties-table td {
    padding: clamp(8px, 1.1vh, 15px) clamp(12px, 1.3vw, 20px);
    border: none;
    vertical-align: middle;
}

/* Column specific styles */
.col-number {
    width: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
}

.col-logo {
    width: 150px;
    text-align: end;
}

.col-logo img {
    width: clamp(36px, 4.8vh, 50px);
    height: clamp(36px, 4.8vh, 50px);
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.15));
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.faculties-table tr:hover .col-logo img {
    transform: scale(1.1);
}

/* Morphing Text Column */
.col-info {
    position: relative;
    height: clamp(36px, 4.8vh, 50px); 
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Keeps expanded items apart */
    overflow: hidden; 
    padding-left: 20px;
    padding-right: 20px;
}

.info-abbr {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    display: block;
    font-size: clamp(18px, 2.4vh, 24px);
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
}

.info-name {
    display: block;
    font-size: clamp(16px, 2.2vh, 22px);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #ccc;
    font-weight: 400;
    letter-spacing: -0.03em;
    /* Animation props - Start hidden on the right or zero width */
    margin-right: 60px;
    opacity: 0;
    transform: translateX(20px); /* Slide in from right */
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    
     /* Push to the far right */
    margin-left: auto;
}

/* Hover Effect: Name expands on the right side */
.faculties-table tr:hover .info-abbr {
    color: #fff;
}

.faculties-table tr:hover .info-name {
    max-width: 600px; /* Expand enough */
    opacity: 1;
    transform: translateX(0);
}

@media (min-width: 769px) {
    body {
        overflow: hidden;
    }
}


@media (max-width: 768px) {
    .logo1 {
        top: 20px;
        left: 20px;
        font-size: 24px;
    }
    .faculties-container {
        padding: 0 15px;
        margin-top: 30px;
        height: auto;
        max-height: none;
        overflow-y: visible;
    }
    
    .faculties h2 {
        font-size: 20px;
        margin-top: 70px;
        margin-bottom: 20px;
    }

    .faculties-table {
        width: 100%; /* Reset width */
        display: block;
        border-spacing: 0;
    }

    .faculties-table thead {
        display: none;
    }

    .faculties-table tbody {
        display: block;
        width: 100%;
    }

    /* Mobile Card Layout using Grid */
    .faculties-table tr {
        display: grid;
        grid-template-columns: 60px 1fr 30px; /* Logo | Info | Number(small) */
        grid-template-areas: 
            "logo info number"; /* One area for info */
        align-items: center;
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background-color: rgba(20, 20, 20, 0.7);
        height: auto;
    }
    
    /* Reset desktop cell styles */
    .faculties-table td {
        padding: 0;
        display: block;
        border-radius: 0 !important;
    }

    /* Assign items to grid areas */
    .col-logo {
        grid-area: logo;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30%;
    }
    
    .col-logo img {
        width: 42px;
        height: 42px;
        filter: none; /* simpler on mobile */
    }

    .col-info {
        grid-area: info;
        display: flex;
        flex-direction: column; /* Stack vertically on mobile */
        align-items: flex-start;
        height: auto;
        padding-left: 10px;
    }

    /* Reset absolute positioning for mobile to show both */
    .info-abbr {
        position: static;
        opacity: 1;
        transform: none;
        font-size: 18px;
        font-weight: 800;
        margin-bottom: 2px;
    }

    .info-name {
        position: static;
        opacity: 1;
        transform: none;
        font-size: 13px;
        color: #ddd;
        line-height: 1.3;
        white-space: normal;
    }

    /* Disable hover interactions on mobile */
    .faculties-table tr:hover .info-abbr { opacity: 1; transform: none; }
    .faculties-table tr:hover .info-name { opacity: 1; transform: none; }
    .faculties-table tr:hover { transform: none; background-color: rgba(20, 20, 20, 0.7); }

    .col-number {
        grid-area: number;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.3);
        align-self: start;
        justify-self: end;
        width: auto;
    }
}
