/* Variables for easy color management */
:root {
    --dark-blue: #1a365d;
    --muted-teal: #446f85;
    --text-grey: #5b6770;
    --white: #ffffff;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Open Sans', sans-serif;
}

/* Reset default browser margins */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img,
iframe,
svg {
    max-width: 100%;
}

img {
    height: auto;
    display: block;
}

body {
    /* Soft gradient background to match your design */
    background: linear-gradient(to bottom, #e4e9f0 0%, #f7f8fa 50%, #e4e9f0 100%);
    color: var(--dark-blue);
    font-family: var(--font-sans);
    min-height: 100vh;
    text-align: center;
    overflow-x: hidden;
}

/* --- Header Section --- */
header {
    padding: 50px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.header-titles {
    text-align: left;
    max-width: 1000px;
    width: 100%;
}

.header-titles h1 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--dark-blue);
    margin-bottom: 5px;
}

.header-titles h1 a {
    color: inherit;
    text-decoration: none;
}

.header-titles p {
    font-size: 0.95rem;
    color: var(--text-grey);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

nav a {
    text-decoration: none;
    color: var(--dark-blue);
    font-family: var(--font-serif);
    background-color: var(--white);
    padding: 10px 35px;
    border-radius: 30px;
    /* Creates the pill shape */
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    font-size: clamp(0.65rem, 2.5vw, 0.95rem);
    white-space: nowrap;
}

nav a:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* --- Welcome Section --- */
.welcome {
    margin: 30px 0 50px;
}

.welcome h2 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--dark-blue);
}

/* --- Hero Banner Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 380px;
    /* Placeholder lab image. Replace the URL below with your actual image file once you have it in your folder */
    background-image: url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
}

/* Semi-transparent overlay to ensure text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
}

.hero-overlay-box {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    /* Off-white semi-transparent box */
    padding: 50px 80px;
    border-radius: 60px;
    /* Wide pill shape */
    max-width: 900px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.hero-overlay-box h3 {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark-blue);
}

.hero-overlay-box p {
    font-family: var(--font-serif);
    color: var(--text-grey);
    font-size: 1.1rem;
}

/* --- Call to Action Buttons --- */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding-bottom: 80px;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: var(--muted-teal);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.primary-btn:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
}

/* --- Global Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Shared Card Styles --- */
.card {
    background: var(--white);
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    padding: 30px 40px;
}

.text-center {
    text-align: center;
}

/* --- Page Title Banner --- */
.page-title-banner {
    background: var(--white);
    padding: 30px 0;
    margin-bottom: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.page-title-banner h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--dark-blue);
    font-weight: 600;
}

/* --- Overview Section --- */
.overview {
    display: flex;
    gap: 30px;
    margin-bottom: 60px;
    align-items: stretch;
}

.overview .text-card {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-grey);
    display: flex;
    align-items: center;
}

.overview .image-card {
    flex: 1;
    padding: 10px;
    /* Slight border effect */
    display: flex;
}

.overview .image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* --- Vision & Mission Section --- */
.vision-mission {
    display: flex;
    gap: 40px;
    margin-bottom: 70px;
}

.vm-block {
    flex: 1;
}

.vm-block h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-blue);
}

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

/* --- Facilities Section --- */
.facilities {
    margin-bottom: 80px;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--dark-blue);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--muted-teal);
    font-size: 0.95rem;
}

.facilities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.facility-card {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Activities Mosaic Grid --- */
.activities {
    margin-bottom: 80px;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-rows: 200px;
    gap: 20px;
}

.mosaic-item {
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    background-color: #dbe4eb;
    /* Placeholder color */
}

.activity-title-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.activity-title-card h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--muted-teal);
}

/* Layout for the mosaic items */
.img-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.img-2 {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
}

.img-3 {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
}

.img-4 {
    grid-column: 2 / 4;
    grid-row: 3 / 4;
}

/* Adding some placeholder gradients to mimic your images */
.img-1,
.img-2,
.img-3,
.img-4 {
    background: linear-gradient(135deg, #e4e9f0 0%, #f7f8fa 50%, #d8e0e8 100%);
}

/* --- Footer --- */
footer {
    background: var(--white);
    padding: 60px 20px 20px;
    color: var(--dark-blue);
    font-size: 0.9rem;
}

.footer-top h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 40px;
}

.footer-content {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: left;
}

/* 
.flex-container::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  
  /* Customize the look of your line here
  width: 1px;
  height: 60%;
  background-color: #0E3C56;
} */

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a {
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: 600;
}

.footer-location {
    flex: 2;
    border-left: 2px solid #0E3C56;
    padding-left: 5%;
}

.footer-location p {
    color: var(--text-grey);
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid #e4e9f0;
    padding-top: 20px;
    color: var(--text-grey);
    font-size: 0.85rem;
}

/* --- Team Intro & Breadcrumb --- */
.team-intro-container {
    position: relative;
    text-align: center;
    margin-bottom: 50px;
}

.breadcrumb {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.9rem;
    color: var(--text-grey);
    font-family: var(--font-serif);
    font-weight: 600;
}

.team-intro-text {
    color: var(--muted-teal);
    font-size: 1.05rem;
}

/* --- Team Grid Sections --- */
.team-section {
    margin-bottom: 70px;
}

.section-title {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    color: var(--dark-blue);
    margin-bottom: 30px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* --- Profile Cards --- */
.profile-card {
    text-align: left;
}

.profile-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.profile-image-placeholder svg {
    width: 100%;
    height: 100%;
    display: block;
}

.profile-card h4 {
    font-size: 1.05rem;
    color: var(--dark-blue);
    margin-bottom: 5px;
}

.profile-info {
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-bottom: 5px;
}

.profile-email {
    font-size: 0.85rem;
    color: var(--dark-blue);
    font-weight: 600;
}

/* --- Team CTA Banner --- */
.team-cta-banner {
    background-color: var(--dark-blue);
    color: var(--white);
    border-radius: 20px;
    padding: 60px 40px;
    margin-bottom: 80px;
    box-shadow: 0 10px 20px rgba(26, 54, 93, 0.2);
}

.team-cta-banner h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 400;
}

.team-cta-banner p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #dbe4eb;
    /* Soft light blue/grey for contrast */
}

/* Dark CTA Button */
.cta-btn-dark {
    display: inline-block;
    text-decoration: none;
    padding: 12px 35px;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    /* Transparent white overlay */
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.cta-btn-dark:hover {
    background-color: var(--muted-teal);
    border-color: var(--muted-teal);
    transform: translateY(-2px);
}

/* --- Contact Page Specific Styles --- */

/* Main area background */
.contact-main {
    padding: 20px 0 80px;
    position: relative;
}

.relative-container {
    position: relative;
}

.contact-breadcrumb {
    text-align: left;
    margin-bottom: 20px;
}

.contact-breadcrumb span {
    font-size: 0.9rem;
    color: var(--text-grey);
    font-family: var(--font-serif);
    font-weight: 600;
}

/* Contact Card Layout */
.contact-card {
    background-color: rgba(255, 255, 255, 0.95);
    /* Slight transparency */
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 60px;
    padding: 60px;
    text-align: left;
}

.contact-form-col {
    flex: 1;
}

.contact-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Form Styles */
.form-heading {
    font-size: 1.1rem;
    color: var(--dark-blue);
    margin-bottom: 30px;
    font-weight: 600;
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--dark-blue);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d8e0;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--dark-blue);
    background-color: #fbfcfd;
    transition: border-color 0.3s ease;
    resize: vertical;
    /* Allows resizing the textarea vertically */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--muted-teal);
    background-color: var(--white);
}

.submit-btn {
    align-self: center;
    /* Centers the button under the form */
    margin-top: 10px;
    cursor: pointer;
    border: none;
}

/* Info Column Styles */
.info-block {
    text-align: center;
}

.info-title {
    font-size: 0.9rem;
    color: var(--dark-blue);
    margin-bottom: 10px;
    font-weight: 600;
}

.info-pill {
    background-color: #f4f7f9;
    border: 1px solid #e1e7ec;
    border-radius: 20px;
    padding: 12px 20px;
    font-size: 0.9rem;
    color: var(--dark-blue);
    font-weight: 600;
    display: inline-block;
}

.contact-email-link {
    color: inherit;
    text-decoration: none;
}

.contact-email-link:hover {
    text-decoration: underline;
}

.address-pill {
    font-weight: 400;
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
    width: 100%;
    /* Take full width of its column */
}

/* Map Container */
.map-container {
    width: 100%;
    height: 200px;
    /* Adjust height as needed */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
    background-color: #e4e9f0;
    /* Fallback color */
}

/* --- Publication Page Styles --- */

.publication-main {
    padding-bottom: 80px;
}

.pub-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.pub-breadcrumb span {
    font-size: 0.9rem;
    color: var(--text-grey);
    font-family: var(--font-serif);
    font-weight: 600;
}

.pub-controls {
    display: flex;
    gap: 15px;
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-btn {
    background: var(--white);
    border: 1px solid #d1d8e0;
    padding: 10px 25px;
    border-radius: 20px;
    font-family: var(--font-sans);
    color: var(--dark-blue);
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.control-btn:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.search-input {
    width: 200px;
    padding-left: 20px;
}

.search-confirm-btn {
    background: var(--muted-teal);
    border: none;
    border-radius: 20px;
    padding: 10px 18px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.search-confirm-btn:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
}

/* --- Sort Dropdown Menu Styling --- */
.sort-container {
    position: relative;
}

.sort-dropdown {
    display: none;
    /* Hidden by default, JS will reveal it */
    position: absolute;
    top: 110%;
    right: 0;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 15px;
    width: 220px;
    z-index: 100;
}

.sort-dropdown.show {
    display: block;
    /* Class toggled by JavaScript */
}

.sort-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sort-option {
    background: #f8fafc;
    border: 1px solid #e1e7ec;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--dark-blue);
    transition: all 0.2s;
    text-align: center;
}

.sort-option:hover {
    background: #eef2f6;
}

/* The active styling from your mockup */
.sort-option.active {
    background: #f0f4f8;
    border-color: #a0b2c6;
}

.sort-divider {
    border: none;
    border-top: 1px solid #e1e7ec;
    margin: 15px 0;
}

.sort-actions {
    margin-top: 15px;
}

.sort-confirm-btn {
    width: 100%;
    background: var(--muted-teal);
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sort-confirm-btn:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
}

/* --- Publication Cards --- */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pub-card {
    background: var(--white);
    border-radius: 25px;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.pub-info {
    flex: 1;
    text-align: left;
}

.pub-title {
    font-size: 1.3rem;
    color: #000;
    margin-bottom: 5px;
}

.pub-authors {
    font-size: 1.05rem;
    color: #222;
    margin-bottom: 5px;
}

.pub-journal {
    font-size: 1rem;
    color: #555;
}

.pub-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    min-width: 140px;
}

.pub-year {
    font-family: var(--font-serif);
    color: var(--text-grey);
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.pub-links {
    display: flex;
    gap: 10px;
}

.pub-link-btn {
    background: #f4f7f9;
    border: 1px solid #d1d8e0;
    color: var(--dark-blue);
    padding: 6px 20px;
    border-radius: 20px;
    /* Pill shape */
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
}

.pub-link-btn:hover {
    background: var(--muted-teal);
    color: var(--white);
    border-color: var(--muted-teal);
}

/* --- Research Page Specific Styles --- */

.research-main {
    padding-bottom: 80px;
}

.research-breadcrumb {
    text-align: left;
    margin-bottom: 20px;
}

.research-breadcrumb span {
    font-size: 0.9rem;
    color: var(--text-grey);
    font-family: var(--font-serif);
    font-weight: 600;
}

/* Reusable placeholder gradient to mimic your mockup imagery */
.placeholder-gradient {
    background: radial-gradient(circle at top right, #dce6eb 0%, #e4e9f0 50%, #c4d1da 100%);
}

/* --- Major Categories (Top Section) --- */
.major-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.major-card {
    position: relative;
    border-radius: 30px;
    padding: 15px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.major-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.major-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    /* Creates the tall rectangle shape */
    border-radius: 20px;
}

.major-title {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 15px;
    border-radius: 15px;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
}

/* --- Specific Project Grids (Bottom Section) --- */
.project-grid-section {
    display: none;
    /* Hidden by default via CSS */
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    animation: fadeIn 0.5s ease;
}

.project-grid-section.active-grid {
    display: grid;
    /* Applied via JavaScript */
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
}

.proj-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Perfect square */
}

.proj-label {
    padding: 15px 10px;
    text-align: center;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-blue);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Layout --- */
@media (max-width: 1024px) {
    header {
        padding: 40px 18px 24px;
        gap: 22px;
    }

    .hero-overlay-box {
        padding: 40px 48px;
        width: calc(100% - 36px);
    }

    .overview,
    .vision-mission,
    .contact-card {
        gap: 24px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .major-categories {
        grid-template-columns: 1fr;
    }

    .project-grid-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .pub-card {
        padding: 26px 28px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 28px 16px 20px;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 22px;
    }

    .header-titles {
        text-align: center;
        max-width: 1000px;
    }

    .header-titles h1 {
        font-size: 1.8rem;
        line-height: normal;
    }

    .header-titles p {
        font-size: 0.95rem;
        line-height: normal;
    }

    nav ul {
        gap: 10px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100%;
        padding-bottom: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    nav ul::-webkit-scrollbar {
        display: none;
    }

    nav a {
        padding: 9px 18px;
        white-space: nowrap;
    }

    .welcome h2,
    .page-title-banner h2,
    .hero-overlay-box h3,
    .team-cta-banner h2 {
        font-size: 1.8rem;
    }

    .hero {
        height: 300px;
    }

    .hero-overlay-box {
        padding: 28px 24px;
        border-radius: 28px;
        width: calc(100% - 24px);
    }

    .cta-buttons {
        gap: 14px;
        padding-bottom: 60px;
    }

    .btn,
    .cta-btn-dark {
        width: 100%;
        max-width: 320px;
    }

    .overview,
    .vision-mission,
    .facilities-grid,
    .team-grid,
    .contact-card,
    .footer-content,
    .major-categories,
    .project-grid-section,
    .pub-card,
    .pub-top-bar,
    .pub-controls,
    .search-container {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .overview,
    .vision-mission,
    .contact-card,
    .footer-content,
    .pub-card {
        display: flex;
    }

    .overview,
    .vision-mission,
    .contact-card,
    .footer-content,
    .pub-card,
    .pub-top-bar,
    .pub-controls,
    .search-container {
        align-items: stretch;
    }

    .overview .text-card,
    .overview .image-card,
    .vm-block,
    .contact-form-col,
    .contact-info-col,
    .footer-links,
    .footer-location,
    .pub-info,
    .pub-meta {
        width: 100%;
    }

    .overview,
    .vision-mission,
    .contact-card,
    .footer-content,
    .pub-card {
        flex-direction: column;
    }

    .facilities-grid,
    .team-grid,
    .project-grid-section {
        display: grid;
        grid-template-columns: 1fr;
    }

    .project-grid-section {
        width: 100%;
    }

    .major-title {
        left: 20px;
        right: 20px;
        bottom: 20px;
        padding: 12px;
        font-size: 1rem;
    }

    .pub-top-bar {
        margin-bottom: 20px;
        gap: 14px;
    }

    .pub-controls {
        gap: 10px;
    }

    .search-input,
    .search-confirm-btn,
    .sort-confirm-btn,
    .control-btn {
        width: 100%;
    }

    .sort-dropdown {
        width: min(100%, 280px);
    }

    .pub-links {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .footer-content {
        gap: 28px;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    nav ul {
        gap: 8px;
    }

    nav a {
        padding: 8px 14px;
        white-space: nowrap;
    }

    nav ul li:first-child a {
        padding-left: 8px;
    }

    nav ul li:last-child a {
        padding-right: 8px;
    }

    .welcome {
        margin-bottom: 32px;
    }

    .hero {
        height: 260px;
        margin-bottom: 36px;
    }

    .hero-overlay-box {
        padding: 22px 18px;
    }

    .page-title-banner {
        padding: 22px 0;
        margin-bottom: 28px;
    }

    .card,
    .contact-card,
    .pub-card,
    .team-cta-banner {
        border-radius: 18px;
    }

    .overview,
    .vision-mission,
    .facilities,
    .activities,
    .team-section,
    .publication-main,
    .research-main,
    .contact-main {
        margin-bottom: 42px;
    }

    .facilities-grid,
    .team-grid,
    .mosaic-grid,
    .project-grid-section {
        gap: 14px;
    }

    .major-categories {
        gap: 18px;
    }

    .major-card {
        padding: 12px;
    }

    .major-img {
        aspect-ratio: 3 / 4;
    }

    .mosaic-grid {
        grid-auto-rows: 160px;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .pub-card {
        padding: 20px 18px;
    }

    .pub-title {
        font-size: 1.1rem;
    }

    .pub-authors {
        font-size: 0.98rem;
    }

    .pub-journal,
    .pub-year {
        font-size: 0.92rem;
    }

    .contact-card {
        padding: 24px 18px;
    }

    .team-cta-banner {
        padding: 36px 20px;
    }
}