.labindia-alert {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.labindia-alert.show {
    display: flex;
    opacity: 1;
}

.alert-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: auto;
    position: relative;
    width: 90%;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.checkmark-container {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.checkmark {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    stroke-width: 6;
    stroke: #ff0f39;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #ff0f39;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
    stroke-width: 6;
    stroke-miterlimit: 10;
    stroke: #ff0f39;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    stroke-width: 8;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px transparent;
    }
}

.alert-message {
    margin-top: 20px;
    color: #333;
    font-size: 18px;
}

.resource-type-container {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 10px 0 0 10px;
    z-index: 1000;
}

.link-tab {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.others-link {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.others-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.float-line {
    width: 30px;
    height: 1px;
    background-color: #ff0f39;
    border: none;
    margin: 0;
    opacity: 1;
}

.others-link:hover {
    transform: translateX(-5px);
}

.others-link:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 50px;
    background-color: #ff0f39;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}

.search-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.search-container .input-group {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    background: white;
    overflow: hidden;
}

.search-container input {
    border: none;
    padding-left: 25px;
    height: 50px;
    font-size: 1rem;
}

.search-container input:focus {
    box-shadow: none;
}

.search-container .btn {
    border: none;
    background: white;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-container .btn:hover {
    background: #f8f9fa;
}

.no-results {
    width: 100%;
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
    font-size: 1.2rem;
}

.abe-section {
    width: 100%;
    text-align: center;
    /* border-radius: 10px; */
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 30px;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s;
    color: white;
    font-weight: 500;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tab-button.active {
    background: #ff0f39;
    border-color: #ff0f39;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 15, 57, 0.3);
}

.tab-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.content-resource {
    display: none;
    width: 100%;
}

.content-resource.active {
    display: block;
}

/* Updated Layout */
.container-grid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    margin-top: 15vh;
}

.header-container {
    text-align: center;
    margin-bottom: 40px;
}

.header-container h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    /* Responsive font size */
    color: white;
    border-bottom: 3px solid #ff0f39;
    width: fit-content;
    margin: 0 auto 20px auto;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    /* Adjusted width */
    gap: 25px;
    padding: 10px;
    width: 100%;
}

.pdf-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    /* Fill grid cell */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pdf-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 15, 57, 0.3);
}

.pdf-icon {
    width: 100%;
    height: 160px;
    /* Fixed height is crucial */
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: background-color 0.3s;
    overflow: hidden;
    /* Contain any overflow */
}

.pdf-card:hover .pdf-icon {
    background-color: #fff5f5;
}

.pdf-icon i {
    font-size: 80px !important;
    /* Fixed sensible size */
    color: #ff0f39;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.pdf-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #050A30;
    text-align: center;
    line-height: 1.4;
    flex-grow: 1;
    /* Pushes buttons down */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdf-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}

.btn-view {
    background-color: #050A30;
    color: white;
}

.btn-view:hover {
    background-color: #333;
    color: white;
    transform: translateY(-2px);
}

.btn-download {
    background-color: #ff0f39;
    color: white;
}

.btn-download:hover {
    background-color: #d60029;
    transform: translateY(-2px);
    color: white;
}

/* Video Thumbnails */
.video-thumbnail {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, 0.2);
}

.play-overlay i {
    color: white;
    font-size: 50px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.pdf-type {
    text-align: center;
    color: #888;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Modal Improvements */
.modal-dialog {
    margin-top: 5vh;
}

.modal-title {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #050A30;
}

.form-control,
.form-select {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(255, 15, 57, 0.15);
    border-color: #ff0f39;
}

.footer-sidebar {
    display: none !important;
}

/* Phone Input Fixes */
.iti {
    width: 100%;
}

.iti__flag {
    background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/img/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .iti__flag {
        background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/img/flags@2x.png");
    }
}



/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container-grid {
        margin-top: 20vh;
        padding: 20px 15px;
    }

    .header-container h1 {
        font-size: 2rem;
        border-bottom-width: 2px;
    }

    .pdf-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 20px;
    }

    .resource-type-container {
        padding: 8px;
        border-radius: 8px 0 0 8px;
    }

    .others-link {
        width: 35px;
        height: 35px;
    }

    .search-container {
        width: 100%;
    }

    .pdf-card {
        padding: 20px;
    }

    .pdf-icon {
        height: 180px;
    }

    .modal-dialog {
        margin: 10px;
    }
}

/* Global Font Override */
.resource-layout-container {
    font-family: 'Poppins', sans-serif !important;
}

/* Ensure FontAwesome icons work */
.resource-layout-container .fa,
.resource-layout-container .fas,
.resource-layout-container .far,
.resource-layout-container .fab,
.resource-layout-container .fa-solid,
.resource-layout-container .fa-regular,
.resource-layout-container .fa-brands {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
    width: 100%;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 600;
    color: #050A30;
}

.pagination-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #050A30;
}

.pagination-btn.active {
    background: #ff0f39;
    color: white;
    border-color: #ff0f39;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

/* Sidebar Layout Styles */
.resource-layout-container {
    display: flex;
    max-width: 1600px;
    margin: 12vh auto 2vh;
    gap: 30px;
    padding: 20px;
    height: 85vh;
    /* Fixed height to fit viewport */
    min-height: unset;
    overflow: hidden;
    /* Prevent full page scroll */
}

/* Sidebar Styling */
.resource-sidebar {
    width: 280px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    /* Full height of container */
    overflow-y: auto;
    /* Scrollable if needed */
    position: relative;
    /* Remove sticky as container is fixed */
    top: auto;
}

/* ... existing styles ... */

/* Main Content Styling */
.resource-main {
    flex: 1;
    width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resource-body {
    flex: 1;
    overflow-y: auto;
    /* Enable vertical scrolling for content */
    padding-right: 15px;
    /* Space for scrollbar */
    padding-bottom: 20px;
}

/* Custom Scrollbar for Webkit */
.resource-sidebar::-webkit-scrollbar,
.resource-body::-webkit-scrollbar {
    width: 8px;
}

.resource-sidebar::-webkit-scrollbar-track,
.resource-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.resource-sidebar::-webkit-scrollbar-thumb,
.resource-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.resource-sidebar::-webkit-scrollbar-thumb:hover,
.resource-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.page-title {
    margin: 0;
    font-size: 1.8rem;
    color: #050A30;
    font-weight: 800;
    position: relative;
    padding-left: 15px;
}

.page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: #ff0f39;
    border-radius: 2px;
}

.search-wrapper {
    flex-grow: 1;
    max-width: 500px;
}

.search-wrapper .input-group {
    background: #f8f9fa;
    border-radius: 50px;
    padding: 5px 15px;
    border: 1px solid #eee;
    align-items: center;
    transition: all 0.3s;
}

.search-wrapper .input-group:focus-within {
    background: white;
    border-color: #ff0f39;
    box-shadow: 0 0 0 3px rgba(255, 15, 57, 0.1);
}

.search-wrapper .form-control {
    border: none;
    background: transparent;
    padding: 10px;
}

.search-wrapper .form-control:focus {
    box-shadow: none;
}

.btn-clear {
    background: none;
    border: none;
    color: #999;
}

.btn-clear:hover {
    color: #ff0f39;
}

/* Custom Tabs */
.custom-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    width: fit-content;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.custom-tab-btn {
    padding: 10px 25px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.custom-tab-btn.active {
    background: #050A30;
    color: white;
}

.custom-tab-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* Responsive Layout */
@media (max-width: 992px) {
    .resource-layout-container {
        flex-direction: column;
        margin-top: 15vh;
        height: auto !important;
        /* Allow natural height on mobile */
        overflow: visible !important;
        /* Enable full page scrolling */
        min-height: 100vh;
    }

    .resource-sidebar {
        width: 100%;
        position: sticky;
        /* Stick to top */
        top: 80px;
        /* Below header */
        z-index: 100;
        padding: 15px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        height: auto;
        overflow-y: visible;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll on iOS */
        gap: 10px;
    }

    .nav-item-resources {
        white-space: nowrap;
        flex-shrink: 0;
        width: auto;
        /* Allow auto width based on content */
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .sidebar-header h3 {
        font-size: 1.2rem !important;
        margin-bottom: 15px;
    }

    /* Main Content - remove internal scrolling */
    .resource-main {
        height: auto;
        overflow: visible;
    }

    .resource-body {
        overflow: visible;
        padding-right: 0;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .search-wrapper {
        width: 100%;
        max-width: none;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
        width: 100%;
    }

    .pdf-grid {
        gap: 15px;
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        /* Full width cards on small mobile */
    }

    @media (min-width: 576px) {
        .pdf-grid {
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            /* 2 columns on larger phones/tablets */
        }
    }
}

/* Fix for Sidebar Navigation Items */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-item-resources {
    display: flex;
    /* Keep flex for alignment */
    align-items: center;
    /* Vertically align icon and text */
    padding: 15px 20px;
    /* Slight increase for better touch area */
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
    border: 1px solid transparent;
    width: 100%;
    /* Ensure it takes full width */
    white-space: nowrap;
    /* Prevent text wrapping */
}

.nav-item-resources i {
    width: 25px;
    /* Fixed width for icon */
    margin-right: 15px;
    /* Space between icon and text */
    font-size: 1.2rem;
    flex-shrink: 0;
    /* Prevent icon from shrinking */
    text-align: center;
}

.nav-item-resources:hover {
    background: #f8f9fa;
    color: #ff0f39;
    transform: translateX(5px);
}

.nav-item-resources.active {
    background: #ff0f39;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 15, 57, 0.2);
}

.nav-item-resources.active:hover {
    transform: none;
}

.sidebar-header h3 {
    font-size: 1.75rem !important;
}

.sidebar-nav a span {
    font-size: 1rem !important;
}

.iti__selected-flag {
    z-index: 1;
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 10px 10px !important;
}

.iti__selected-flag {
    left: 0 !important;
}