:root {
    --ntu-red: #c8102e;
    --ntu-blue: #002b49;
    --primary: #0f172a;
    --accent: #2563eb;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --gradient-ntu: linear-gradient(135deg, #002b49 0%, #0f172a 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Base Image Defaults */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Top Bar Main Container */
.top-bar {
    background: #001e34;
    color: #cbd5e1;
    padding: 0.6rem 2rem;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Left Brand Side-by-Side Alignment */
.top-bar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.top-bar-brand:hover {
    color: #ffffff;
}

/* NTU Logo Sizing in Top Bar */
.top-bar-ntu-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Centered Text Baseline */
.top-bar-text {
    display: inline-block;
    line-height: 1;
    position: relative;
    top: 1px;
}

/* Right Link Vertical Alignment */
.top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar-right a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.top-bar-right a:hover {
    color: #ffffff;
}

/* Header & Navigation */
header {
    background: var(--gradient-ntu);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 2rem;
}

.nav-links {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    list-style: none;
    gap: 1.25rem;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* Standalone Main Navigation Logo */
.nav-logo-item {
    display: flex;
    align-items: center;
}

.logo-link {
    padding: 0 !important;
    background: transparent !important;
}

.logo-link:hover {
    background: transparent !important;
}

.nav-ims-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    transition: transform 0.2s ease;
}

.nav-ims-logo:hover {
    transform: scale(1.04);
}

/* Dropdown Navigation */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    list-style: none;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-links li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    color: var(--text-dark);
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: 0.88rem;
}

.dropdown a:hover {
    background: #f1f5f9;
    color: var(--accent);
}

/* Hero Section - Compact Top/Bottom Padding */
.hero {
    background: var(--gradient-ntu);
    color: white;
    padding: 1.0rem 2rem;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--ntu-red);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 3rem;
    align-items: center;
}

.hero h2 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
}

.hero-card .section-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.8rem;
}

.hero-card h3 {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-card ul {
    list-style: none;
}

.hero-card li {
    color: #94a3b8;
    font-size: 0.88rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.hero-card li i {
    color: var(--ntu-red);
    margin-top: 0.2rem;
}

/* Main Content Area */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.85rem;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h2::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border);
    margin-left: 1rem;
}

/* About Card Layout */
.about-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 3rem;
}

.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.about-card p {
    font-size: 1.05rem;
    color: var(--text-dark);
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.responsive-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Cards Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    border-color: rgba(37, 99, 235, 0.3);
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Footer Section */
footer {
    background: var(--primary);
    color: #94a3b8;
    padding: 3rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.footer-col p, 
.footer-col ul {
    font-size: 0.9rem;
    line-height: 1.7;
    list-style: none;
}

.footer-col a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #ffffff;
}

.copyright {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-container, 
    .about-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}
/* --- Equipment Page Specific Styling --- */

/* Main Container Spacing */
main.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Section Headers */
.section-header {
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ntu-blue, #002b49);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Card Container */
.card-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Equipment List */
.equip-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 10px 20px;
}

.equip-list li {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.equip-list li i {
    color: var(--ntu-red, #c8102e);
    margin-top: 4px;
}

/* Equipment Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.gallery-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.gallery-img-container {
    display: flex;
    height: 180px;
    background: #e2e8f0;
    overflow: hidden;
}

.gallery-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex: 1;
}

.gallery-card p {
    padding: 12px 14px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.4;
    text-align: center;
}