        /* ===== BASE STYLES ===== */
        body {
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 0;
            background: 
                radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%),
                linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        /* ===== BACKGROUND ANIMATIONS ===== */
        .bg-shapes {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        .shape {
            position: absolute;
            opacity: 0.1;
            animation: float 20s ease-in-out infinite;
        }

        .shape:nth-child(1) {
            width: 100px;
            height: 100px;
            background: linear-gradient(45deg, #ff6b35, #ff8c42);
            border-radius: 50%;
            top: 10%;
            left: 10%;
            animation-delay: 0s;
        }

        .shape:nth-child(2) {
            width: 80px;
            height: 80px;
            background: linear-gradient(45deg, #4CAF50, #81C784);
            transform: rotate(45deg);
            top: 20%;
            right: 15%;
            animation-delay: 5s;
        }

        .shape:nth-child(3) {
            width: 60px;
            height: 60px;
            background: linear-gradient(45deg, #2196F3, #64B5F6);
            border-radius: 50%;
            bottom: 30%;
            left: 20%;
            animation-delay: 10s;
        }

        .shape:nth-child(4) {
            width: 120px;
            height: 120px;
            background: linear-gradient(45deg, #9C27B0, #BA68C8);
            clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
            bottom: 20%;
            right: 20%;
            animation-delay: 15s;
        }

        /* Moving Vehicles */
        .vehicle {
            position: absolute;
            opacity: 0.15;
            animation: vehicle-drift 25s linear infinite;
        }

        .truck {
            width: 120px;
            height: 50px;
            background: linear-gradient(45deg, #ff6b35, #ff8c42);
            border-radius: 8px 15px 8px 4px;
            position: relative;
        }

        .truck::before {
            content: '';
            position: absolute;
            width: 35px;
            height: 30px;
            background: linear-gradient(45deg, #e55a2b, #ff6b35);
            border-radius: 4px;
            top: 10px;
            left: -30px;
        }

        .car {
            width: 80px;
            height: 35px;
            background: linear-gradient(45deg, #4CAF50, #81C784);
            border-radius: 15px 15px 8px 8px;
            position: relative;
        }

        .car::before {
            content: '';
            position: absolute;
            width: 45px;
            height: 20px;
            background: linear-gradient(45deg, #2E7D32, #4CAF50);
            border-radius: 8px;
            top: 5px;
            left: 18px;
        }

        .vehicle:nth-child(5) {
            top: 15%;
            left: -80px;
            animation-delay: 0s;
        }

        .vehicle:nth-child(6) {
            top: 35%;
            left: -80px;
            animation-delay: 8s;
        }

        .vehicle:nth-child(7) {
            bottom: 25%;
            left: -80px;
            animation-delay: 15s;
        }

        .vehicle:nth-child(8) {
            top: 55%;
            left: -80px;
            animation-delay: 3s;
        }

        .vehicle:nth-child(9) {
            bottom: 45%;
            left: -80px;
            animation-delay: 12s;
        }

        .vehicle:nth-child(10) {
            top: 75%;
            left: -80px;
            animation-delay: 20s;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            25% { transform: translateY(-20px) rotate(90deg); }
            50% { transform: translateY(-40px) rotate(180deg); }
            75% { transform: translateY(-20px) rotate(270deg); }
        }

        @keyframes vehicle-drift {
            0% { 
                transform: translateX(-100px);
                opacity: 0;
            }
            10% { 
                opacity: 0.15;
            }
            90% { 
                opacity: 0.15;
            }
            100% { 
                transform: translateX(calc(100vw + 100px));
                opacity: 0;
            }
        }

        @keyframes titleSlide {
            0% { transform: translateY(-50px); opacity: 0; }
            100% { transform: translateY(0); opacity: 1; }
        }

        @keyframes cardReveal {
            0% {
                opacity: 0;
                transform: translateY(-50px) scale(0.8);
            }
            70% {
                opacity: 1;
                transform: translateY(-5px) scale(1.02);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        /* ===== HEADER SECTION ===== */
        .header {
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            padding: 20px 0;
            text-align: center;
            box-shadow: 0 8px 25px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
            border-bottom: 3px solid #ff6b35;
            position: relative;
            z-index: 10;
        }

        .main-title {
            color: #1e3a8a;
            font-size: 2.2rem;
            font-weight: 900;
            margin: 0;
            letter-spacing: 3px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
            animation: titleSlide 2s ease-out;
        }

        .subtitle {
            color: #ff6b35;
            font-size: 1rem;
            margin: 0;
            font-weight: 600;
            letter-spacing: 1px;
        }

        /* ===== MAIN CONTAINER ===== */
        .container {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
            z-index: 5;
        }

        .tools-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-template-rows: repeat(2, 1fr);
            gap: 18px;
            width: 100%;
            max-width: 1300px;
            height: auto;
        }

        /* ===== TOOL CARDS ===== */
        .tool-card {
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            border-radius: 10px;
            padding: 10px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            cursor: pointer;
            border: 2px solid #e0e6ed;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
            z-index: 1;
            min-height: 100px;
            max-width: 280px;
            opacity: 0;
            transform: translateY(-50px) scale(0.8);
            animation: none;
        }

        .tool-card.animate {
            animation: cardReveal 0.6s ease-out forwards;
        }

        .tool-card:nth-child(1).animate { animation-delay: 0.2s; }
        .tool-card:nth-child(2).animate { animation-delay: 0.4s; }
        .tool-card:nth-child(3).animate { animation-delay: 0.6s; }
        .tool-card:nth-child(4).animate { animation-delay: 0.8s; }
        .tool-card:nth-child(5).animate { animation-delay: 1.0s; }
        .tool-card:nth-child(6).animate { animation-delay: 1.2s; }
        .tool-card:nth-child(7).animate { animation-delay: 1.4s; }
        .tool-card:nth-child(8).animate { animation-delay: 1.6s; }



        .tool-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: transparent;
            border-radius: 12px;
            opacity: 0;
            transition: none;
        }

        .tool-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 
                0 15px 35px rgba(0,0,0,0.2),
                0 0 0 3px rgba(255, 107, 53, 0.6),
                0 0 20px rgba(255, 107, 53, 0.4);
            border-color: #ff6b35;
        }

        .tool-card:hover::before {
            opacity: 0;
            animation: none;
        }

        /* ===== CARD CONTENT LAYOUT ===== */
        .tool-content {
            display: flex;
            flex-direction: row;
            height: 100%;
        }

        .tool-left {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 0;
            border-right: 2px solid #e0e0e0;
            margin-right: 12px;
            overflow: hidden;
            border-radius: 8px;
        }

        .tool-right {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

        .tool-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
            transition: all 0.4s ease;
            cursor: pointer;
        }



        /* ===== TEXT ELEMENTS ===== */
        .tool-acronym {
            color: #2c3e50;
            font-size: 1.4rem;
            font-weight: 900;
            margin: 0 0 6px 0;
            transition: all 0.3s ease;
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 6px;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
            text-decoration: none;
            display: block;
			z-index:1;
        }
        .tool-acronym:hover {
			color: #F27938;	
		}

        @keyframes textGlow {
            0% { box-shadow: 0 8px 25px rgba(255, 107, 53, 0.7); }
            50% { box-shadow: 0 15px 40px rgba(255, 107, 53, 1), 0 0 30px rgba(255, 107, 53, 0.8); }
            100% { box-shadow: 0 12px 35px rgba(255, 107, 53, 0.8), 0 0 20px rgba(255, 107, 53, 0.6); }
        }

        .tool-name {
            color: #1e3a8a;
            font-size: 0.85rem;
            font-weight: 700;
            margin: 0 0 8px 0;
            line-height: 1.3;
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            cursor: pointer;
            padding: 6px 8px;
            border-radius: 6px;
            text-decoration: none;
            display: block;
            position: relative;
            z-index: 1;
        }

        .tool-name:hover {
            color: #cc5500;
            font-weight: 700;
            background: #ffd4b3;
            transform: translateX(12px) scale(1.08);
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
            box-shadow: 0 8px 25px rgba(255, 212, 179, 0.6), 0 0 15px rgba(255, 224, 204, 0.4);
            border-radius: 8px;
            z-index: 110;
            position: relative;
        }

        @keyframes titleGlow {
            0% { 
                transform: translateX(0px) scale(1);
                box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
            }
            50% { 
                transform: translateX(20px) scale(1.15);
                box-shadow: 0 12px 30px rgba(255, 107, 53, 1), 0 0 20px rgba(255, 107, 53, 0.8);
            }
            100% { 
                transform: translateX(15px) scale(1.1);
                box-shadow: 0 8px 25px rgba(255, 107, 53, 0.8), 0 0 15px rgba(255, 107, 53, 0.5);
            }
        }



        @keyframes nameSlide {
            0% { transform: translateX(15px) scale(1.15) translateY(0px); }
            50% { transform: translateX(25px) scale(1.3) translateY(-5px); }
            100% { transform: translateX(20px) scale(1.25) translateY(-3px); }
        }

        .tool-description {
            color: #1a1b1b;
            font-size: 0.85rem;
            line-height: 1.4;
            margin: 0 0 10px 0;
            transition: all 0.3s ease;
            cursor: pointer;
            padding: 3px 6px;
            border-radius: 6px;
        }



        @keyframes descriptionFloat {
            0% { transform: translateY(-6px) scale(1.08); }
            50% { transform: translateY(-15px) scale(1.15); }
            100% { transform: translateY(-10px) scale(1.12); }
        }

        .button-container {
            margin-top: auto;
        }

        /* ===== BUTTONS ===== */
        .access-btn {
            background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
            color: white;
            border: none;
            padding: 8px 14px;
            border-radius: 6px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
            position: relative;
            overflow: hidden;
            margin-bottom: 6px !important;
        }

        .access-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
            transition: left 0.5s ease;
        }

        .access-btn:hover::before {
            left: 100%;
        }

        .access-btn:hover {
            background: linear-gradient(135deg, #e55a2b 0%, #ff6b35 100%);
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 8px 20px rgba(255, 107, 53, 0.5);
            letter-spacing: 1.5px;
        }

        /* ===== FOOTER ===== */
        .footer {
            background: rgba(0, 0, 0, 0.3);
            text-align: center;
            padding: 16px;
            border-top: 3px solid #ff6b35;
            margin-top: 20px;
            position: relative;
            z-index: 10;
        }

        .footer-text {
            color: white;
            font-size: 0.8rem;
            margin: 0;
            font-weight: 500;
        }

        .footer-contact {
            color: white;
            font-size: 0.7rem;
            margin: 5px 0 0 0;
            font-weight: 400;
        }

        .department-info {
            color: #1e3a8a;
            font-size: 0.8rem;
            margin: 0;
            font-weight: 500;
            letter-spacing: 0.5px;
        }

        /* ===== MODAL STYLES ===== */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            animation: fadeIn 0.3s ease-out;
        }

        .modal.show {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            margin: 20px;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            width: 90%;
            max-width: 700px;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
            transform: scale(0.7);
            animation: modalSlideIn 0.4s ease-out forwards;
        }

        .close {
            color: #999;
            float: right;
            font-size: 28px;
            font-weight: bold;
            position: absolute;
            right: 20px;
            top: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255, 107, 53, 0.1);
        }

        .close:hover {
            color: #ff6b35;
            background: rgba(255, 107, 53, 0.2);
            transform: scale(1.1);
        }

        .modal-header {
            color: #1e3a8a;
            font-size: 1.8rem;
            font-weight: 900;
            margin: 0 0 20px 0;
            padding-right: 50px;
            border-bottom: 3px solid #ff6b35;
            padding-bottom: 15px;
        }
		.modal-header:hover{ 
		    color: #F27938;
		}

        .modal-text {
            color: #2c3e50;
            font-size: 1rem;
            line-height: 1.6;
            margin-bottom: 25px;
            text-align: justify;
        }

        .modal-resources {
            margin-top: 20px;
        }

        .modal-resources h3 {
            color: #ff6b35;
            font-size: 1.3rem;
            font-weight: 700;
            margin: 0 0 15px 0;
            border-bottom: 2px solid #ff6b35;
            padding-bottom: 8px;
        }

        .resource-link {
            display: block;
            color: #1e3a8a;
            text-decoration: none;
            padding: 10px 15px;
            margin: 8px 0;
            background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
            border-radius: 8px;
            border-left: 4px solid #ff6b35;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .resource-link:hover {
            background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
            color: white;
            transform: translateX(10px);
            box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes modalSlideIn {
            from {
                transform: scale(0.7) translateY(-50px);
                opacity: 0;
            }
            to {
                transform: scale(1) translateY(0);
                opacity: 1;
            }
        }

        /* ===== RESPONSIVE DESIGN ===== */
        @media (max-width: 1100px) {
            .tools-grid {
                grid-template-columns: repeat(2, 1fr);
                grid-template-rows: repeat(4, 1fr);
            }
        }

        @media (max-width: 600px) {
            .tools-grid {
                grid-template-columns: 1fr;
                grid-template-rows: repeat(8, 1fr);
                gap: 20px;
            }
            
            .container {
                padding: 20px;
            }
            
            .main-title {
                font-size: 1.8rem;
            }

            .modal-content {
                margin: 10px;
                padding: 20px;
                max-height: 90vh;
            }

            .modal-header {
                font-size: 1.4rem;
                padding-right: 40px;
            }

            .modal-text {
                font-size: 0.9rem;
            }
        }
/* ===== Allow Scroll if Content Overflows ===== */
html, body {
  height: 100%;
  overflow-y: auto;       /* enables vertical scroll if needed */
  overflow-x: hidden;     /* prevents sideways scroll */
}

/* ===== Adjust Main Container to Fit Smaller Screens ===== */
.container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 5;
  overflow-y: auto;       /* allows scrolling when icons overflow */
}

/* ===== Make the Grid Responsive ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding-bottom: 40px;   /* some breathing room at bottom */
}

/* ===== Adjust Card Size for Smaller Screens ===== */
@media (max-width: 1200px) {
  .tool-card {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}
/* === FIT ALL CARDS ON ONE SCREEN (compact mode by height) === */

/* General tightening on large screens */
.header {
  padding: 10px 0 !important;        /* smaller header */
  margin-bottom: 12px !important;
}
.container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.tools-grid {
  gap: 14px !important;               /* tighter rows/cols */
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.footer {
  margin-top: 12px !important;
  padding: 10px 8px !important;       /* slimmer footer */
}
/* --- Fit-on-one-screen helpers (no card style changes) --- */
html, body { height: 100%; overflow-y: hidden; }   /* no vertical scroll */

.header {                                         /* small, even header space */
  padding: 8px 0 !important;
  margin-bottom: 8px !important;
}
.footer {                                         /* small, even footer space */
  padding: 8px 0 !important;
  margin-top: 8px !important;
}
.container { padding: 0 16px !important; }        /* keep cards centered */
.tools-grid { transform-origin: top center; gap: 14px !important; }

/* === Force grid to fit without scroll === */
html, body {
  height: 100%;
  overflow-y: hidden;   /* no vertical scroll */
}

.tools-grid {
  transform-origin: top center;
}
/* --- FORCE NO SCROLL & CONSTRAIN BG --- */
html, body {
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow-y: hidden !important;  /* kill vertical scroll */
  overflow-x: hidden !important;  /* kill horizontal scroll from animations */
}

/* Make sure animated background never creates scrollbars */
.bg-shapes {
  position: absolute;
  inset: 0;             /* top:0; right:0; bottom:0; left:0 */
  overflow: hidden !important;
  pointer-events: none;
}

/* Keep header/footer compact but don’t change your card styles */
.header { margin-bottom: 8px !important; padding: 8px 0 !important; }
.footer { margin-top: 8px !important;  padding: 8px 0 !important; }

/* The grid area will be sized by JS; ensure it can center content */
.container {
  padding: 0 16px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
}

.tools-grid {
  transform-origin: top center;
  margin: 0 !important;
  padding: 0 !important;
}
/* Balance header & footer spacing */
.header {
  padding: 10px 0 !important;       /* smaller header padding */
  margin-bottom: 16px !important;   /* equal gap below header */
}

.container {
  padding-top: 0 !important;        /* remove extra gap above cards */
  padding-bottom: 0 !important;     /* remove extra gap below cards */
}

.footer {
  top:-63px;
}
/* ===== BASE STYLES ===== */
body {
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ===== BACKGROUND ANIMATIONS ===== */
.bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.shape {
  position: absolute;
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}
.shape:nth-child(1) {
  width: 100px; height: 100px;
  background: linear-gradient(45deg, #ff6b35, #ff8c42);
  border-radius: 50%;
  top: 10%; left: 10%;
}
.shape:nth-child(2) {
  width: 80px; height: 80px;
  background: linear-gradient(45deg, #4CAF50, #81C784);
  transform: rotate(45deg);
  top: 20%; right: 15%;
  animation-delay: 5s;
}
.shape:nth-child(3) {
  width: 60px; height: 60px;
  background: linear-gradient(45deg, #2196F3, #64B5F6);
  border-radius: 50%;
  bottom: 30%; left: 20%;
  animation-delay: 10s;
}
.shape:nth-child(4) {
  width: 120px; height: 120px;
  background: linear-gradient(45deg, #9C27B0, #BA68C8);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  bottom: 20%; right: 20%;
  animation-delay: 15s;
}

@keyframes float {
  0%,100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-20px) rotate(90deg); }
  50% { transform: translateY(-40px) rotate(180deg); }
  75% { transform: translateY(-20px) rotate(270deg); }
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
  border-bottom: 3px solid #ff6b35;
  position: relative;
  z-index: 10;
  margin-bottom: 16px; /* balanced with footer */
}
.main-title {
  color: #1e3a8a;
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: 3px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.subtitle {
  color: #ff6b35;
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ===== MAIN CONTAINER ===== */
.container {
  flex: 1;
  display: flex;
  align-items: flex-start; /* start under header */
  justify-content: center;
  padding: 0 16px;
  position: relative;
  z-index: 5;
  overflow: hidden; /* no page scrollbars */
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 1300px;
  height: auto;
  margin: 0;
  padding: 0;
  transform-origin: top center;
}

/* ===== TOOL CARDS ===== */
.tool-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: 2px solid #e0e6ed;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  min-height: 100px;
  max-width: 280px;
}
.tool-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 15px 35px rgba(0,0,0,0.2),
    0 0 0 3px rgba(255,107,53,0.6),
    0 0 20px rgba(255,107,53,0.4);
  border-color: #ff6b35;
}

/* ===== CARD CONTENT LAYOUT ===== */
.tool-content {
  display: flex;
  flex-direction: row;
  height: 100%;
}
.tool-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-right: 2px solid #e0e0e0;
  margin-right: 12px;
  overflow: hidden;
  border-radius: 8px;
}
.tool-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.tool-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: all 0.4s ease;
  cursor: pointer;
}

/* ===== TEXT ELEMENTS ===== */
.tool-acronym {
  color: #2c3e50;
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0 0 6px 0;
  padding: 4px 6px;
  border-radius: 6px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  text-decoration: none;
  display: block;
}
.tool-name {
  color: #1e3a8a;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.3;
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  display: block;
  position: relative;
  z-index: 1;
}
.tool-name:hover {
  color: #cc5500;
  background: #ffd4b3;
  transform: translateX(12px) scale(1.08);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  box-shadow: 0 8px 25px rgba(255,212,179,0.6), 0 0 15px rgba(255,224,204,0.4);
  border-radius: 8px;
  z-index: 110;
}
.tool-description {
  color: #1a1b1b;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0 0 10px 0;
  padding: 3px 6px;
  border-radius: 6px;
}

/* ===== BUTTONS ===== */
.access-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 8px rgba(255,107,53,0.3);
  position: relative;
  overflow: hidden;
  margin-bottom: 6px !important;
}
.access-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s ease;
}
.access-btn:hover::before { left: 100%; }
.access-btn:hover {
  background: linear-gradient(135deg, #e55a2b 0%, #ff6b35 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(255,107,53,0.5);
  letter-spacing: 1.5px;
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
  padding: 10px 0;
  border-top: 3px solid #ff6b35;
  margin-top: 16px; /* balanced with header */
  position: relative;
  z-index: 10;
}
.footer-text {
  color: white;
  font-size: 0.8rem;
  margin: 0;
  font-weight: 500;
}
.footer-contact {
  color: white;
  font-size: 0.7rem;
  margin: 5px 0 0 0;
  font-weight: 400;
}
.department-info {
  color: #1e3a8a;
  font-size: 0.8rem;
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ===== MODAL STYLES ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}
.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  margin: 20px;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.7);
  animation: modalSlideIn 0.4s ease-out forwards;
}
.close {
  color: #999;
  position: absolute;
  right: 20px; top: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 35px; height: 35px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,107,53,0.1);
}
.close:hover {
  color: #ff6b35;
  background: rgba(255,107,53,0.2);
  transform: scale(1.1);
}
.modal-header {
  color: #1e3a8a;
  font-size: 1.8rem;
  font-weight: 900;
  margin: 0 0 20px 0;
  padding-right: 50px;
  border-bottom: 3px solid #ff6b35;
  padding-bottom: 15px;
}
.modal-text {
  color: #2c3e50;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  text-align: justify;
}
.modal-resources { margin-top: 20px; }
.modal-resources h3 {
  color: #ff6b35;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  border-bottom: 2px solid #ff6b35;
  padding-bottom: 8px;
}
.resource-link {
  display: block;
  color: #1e3a8a;
  text-decoration: none;
  padding: 10px 15px;
  margin: 8px 0;
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
  border-radius: 8px;
  border-left: 4px solid #ff6b35;
  transition: all 0.3s ease;
  font-weight: 600;
}
.resource-link:hover {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(255,107,53,0.3);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideIn {
  from { transform: scale(0.7) translateY(-50px); opacity: 0; }
  to   { transform: scale(1) translateY(0);       opacity: 1; }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1100px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
}
@media (max-width: 600px) {
  .tools-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, 1fr);
    gap: 20px;
  }
  .container { padding: 20px; }
  .main-title { font-size: 1.8rem; }
  .modal-content { margin: 10px; padding: 20px; max-height: 90vh; }
  .modal-header { font-size: 1.4rem; padding-right: 40px; }
  .modal-text { font-size: 0.9rem; }
}

/* ===== NO-SCROLL & BALANCED SPACING (final keepers) ===== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-y: hidden;  /* no vertical scroll */
  overflow-x: hidden;  /* no horizontal scroll */
}
.header { padding: 10px 0; margin-bottom: 16px; }
.footer { padding: 10px 0; margin-top: 16px; }

