:root {
    --primary-color: #003d99;
    --secondary-color: #0056b3;
    --tertiary-color: #004085;
    --accent-color: #ffd700;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-dark: #333;
    --text-light: #555;
    --text-muted: #666;
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition-speed: 0.3s;
}

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

button {
    outline: none !important;
    border: none;
}

button:focus,
button:focus-visible,
button:active {
    outline: none !important;
    box-shadow: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f4f4f4;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

h2 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
}

h3 {
    color: var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

.hero-section {
    position: relative;
    margin: 0;
    padding: 2rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 350px;
    background: linear-gradient(135deg, rgba(0, 61, 153, 0.95) 0%, rgba(0, 86, 179, 0.95) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.25;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: center;
}

.hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 4px solid white;
}

.hero-info {
    padding: 2rem;
}

.hero-title {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 0.3rem;
    border-bottom: none;
    padding-bottom: 0;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        margin: -1rem -1rem 2rem -1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .hero-logo-img {
        max-width: 250px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
}

.top-bar {
    background: #003366;
    color: #eee;
    font-size: 0.85rem;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.4rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left .top-date {
    color: #ccc;
}

.top-bar-right a {
    color: #eee;
    text-decoration: none;
    margin-left: 1.2rem;
    font-size: 0.85rem;
}

.top-bar-right a:hover {
    color: #fff;
    text-decoration: underline;
}

header.main-header {
    background: #ffffff;
    color: var(--text-dark);
    padding: 0.8rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: auto;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

.mobile-header-left {
    display: flex;
    align-items: center;
}

.mobile-header-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    transition: opacity var(--transition-speed);
}

.mobile-header-link:hover {
    opacity: 0.8;
}

.mobile-header-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.mobile-site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.mobile-header-right {
    display: flex;
    align-items: center;
}

.logo:hover {
    color: var(--accent-color);
}

nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
    white-space: nowrap;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    display: inline-block;
    min-height: 1.5rem;
    line-height: 1.5rem;
}

nav.main-nav {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    font-size: 0;
    position: relative;
    min-width: 44px;
    min-height: 44px;
}

.nav-toggle::before {
    content: '☰';
    margin-right: 0;
    font-size: 1.2rem;
    line-height: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nav-toggle[aria-expanded="true"]::before {
    content: '✕';
    font-size: 1.3rem;
}

.nav-toggle:hover {
    background: var(--secondary-color);
}

.nav-toggle { background: transparent; min-width: 48px; min-height: 48px; padding: 6px; }
.nav-toggle .hamburger { display: inline-block; width: 26px; height: 18px; position: relative; }
.nav-toggle .hamburger span { display: block; position: absolute; height: 2px; width: 100%; background: var(--primary-color); left: 0; transition: transform 0.28s ease, opacity 0.28s ease; }
.nav-toggle .hamburger span:nth-child(1) { top: 0; }
.nav-toggle .hamburger span:nth-child(2) { top: 8px; }
.nav-toggle .hamburger span:nth-child(3) { top: 16px; }
.nav-toggle.open .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.hamburger::after { content: ''; position: absolute; inset: -8px -8px -8px -8px; border-radius: 50%; background: rgba(99,102,241,0.08); z-index: -1; opacity: 0; transition: opacity 0.2s ease; }
.nav-toggle.open .hamburger::after { opacity: 1; }

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
    align-items: center;
    white-space: nowrap;
}

.nav-item {
    position: relative;
}

.nav-item > a,
.dropdown-toggle {
    color: var(--text-dark);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    line-height: 1.5rem;
    outline: none !important;
    box-shadow: none !important;
}

.nav-item > a:hover,
.dropdown-toggle:hover {
    color: var(--secondary-color);
}

.nav-item > a:focus,
.dropdown-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

.dropdown-toggle:active,
.dropdown-toggle:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.active-parent > .dropdown-toggle {
    color: var(--primary-color);
}

.has-dropdown > .dropdown-toggle::before {
    content: '▼';
    font-size: 0.7em;
    opacity: 0.75;
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 0.3rem;
}

.has-dropdown:hover > .dropdown-toggle::before {
    opacity: 1;
}

.has-dropdown.is-open > .dropdown-toggle::before {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    position: absolute;
    top: calc(100% + 0px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 1100;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--transition-speed), transform var(--transition-speed);
    pointer-events: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.65rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.has-dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.has-dropdown.is-open > .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.language-selector {
    display: flex;
    align-items: center;
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

.lang-form {
    margin: 0;
}

.lang-select {
    background: #f5f5f5;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    height: auto;
    min-height: 36px;
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/csvg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1.2em 1.2em;
    padding-right: 2.5rem;
}

.lang-select:hover {
    background-color: #ffffff;
    border-color: var(--secondary-color);
}

.lang-select:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.1);
}

.lang-select option {
    background: #ffffff;
    color: var(--text-dark);
    padding: 0.5rem;
}

.search-item {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.8rem;
    transition: all var(--transition-speed) ease;
}

.search-box:focus-within {
    background: #ffffff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.1);
}

.search-input {
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    width: 140px;
    outline: none;
    transition: width var(--transition-speed) ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    width: 180px;
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-speed) ease;
    display: flex;
    align-items: center;
}

.search-btn:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.layout-main {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
    gap: 2rem;
    align-items: flex-start;
}

.content-area main {
    background: #ffffff;
    border-radius: 0;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-in;
}

/* Full width content when sidebar is not present (home page) */
.layout-main:has(> .content-area:only-child) {
    grid-template-columns: 1fr;
}
.layout-main:has(> .content-area:only-child) .content-area {
    width: 100%;
}

.sidebar {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    overflow: visible;
}

.sidebar-widget {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 992px) {
    .header-content {
        padding: 0 1rem;
    }
    .nav-list {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        background: #fff;
        position: absolute;
        left: 0;
        top: 100%;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border-color);
        z-index: 1200;
        padding: 0.5rem 1rem 1rem 1rem;
    }
    nav .nav-item {
        width: 100%;
    }
    nav .nav-item > a, .dropdown-toggle {
        width: 100%;
        padding: 0.8rem 0.4rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .nav-list .dropdown-menu {
        position: static;
        top: auto;
        left: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: 0.8rem;
        transform: none;
        opacity: 1;
        display: none;
    }
    .has-dropdown.is-open > .dropdown-menu {
        display: block;
    }
    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
        background: var(--primary-color);
    }
    .nav-toggle::before { font-size: 1.15rem; }
    .main-header {
        position: relative;
    }
    .mobile-only { display: block; }
    .desktop-only { display: none; }
    
    .search-item {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
        flex: 1;
    }
    
    .search-input:focus {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .layout-main { grid-template-columns: 1fr; }
    .sidebar { position: relative; top: 0; }
    .mobile-site-name { font-size: 1rem; }
    .nav-list { padding-left: 0.6rem; }
    .nav-item > a, .dropdown-toggle { padding: 0.9rem 0.4rem; }
}

.main-nav.is-open .nav-list {
    display: flex;
}

.nav-item > a, .dropdown-toggle {
    border-radius: var(--radius-sm);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1150;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.nav-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 992px) {
    .main-nav {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(180deg, #0f1724 0%, #071229 100%);
        padding: 2rem;
        transform: scale(0.95);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.32s cubic-bezier(.2,.8,.2,1), opacity 0.28s ease;
        z-index: 1160;
    }
    .main-nav.is-open {
        transform: scale(1);
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-header-left, .mobile-header-right { width: auto; }
    .mobile-site-name { display:block; text-align:center; width:100%; color: #fff; }
    .nav-list { display: flex; flex-direction: column; gap: 1.2rem; align-items: center; }
    .nav-list .nav-item { border-bottom: none; width: 100%; max-width: 420px; }
    .nav-list .nav-item > a, .dropdown-toggle {
        padding: 1rem 1.2rem;
        color: #e6eef3;
        font-size: 1.05rem;
        background: transparent;
        border-radius: 8px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .nav-list .nav-item > a:hover, .dropdown-toggle:hover {
        background: rgba(255,255,255,0.03);
        color: #fff;
    }
    .nav-list .dropdown-menu { padding-left: 1rem; display:none; }
    .has-dropdown.is-open > .dropdown-menu { display:block; }
    .main-nav .mobile-brand { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-weight:700; }
}


.sidebar-widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

/* So'nggi yangiliklar sidebar */
.sidebar-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-news-item {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dotted var(--border-color);
}

.sidebar-news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-news-link {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    transition: color var(--transition-speed);
}

.sidebar-news-link:hover {
    color: var(--secondary-color);
}

.sidebar-news-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.sidebar-news-title {
    display: block;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
}

.sidebar-more-link {
    margin-top: 1rem;
    text-align: center;
}

.sidebar-more-link .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

/* Tadqiqotlar sidebar */
.sidebar-research-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-research-item {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dotted var(--border-color);
}

.sidebar-research-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-research-link {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    transition: color var(--transition-speed);
}

.sidebar-research-link:hover {
    color: var(--secondary-color);
}

.sidebar-research-title {
    display: block;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.sidebar-research-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Taqvim sidebar */
.sidebar-calendar {
    margin-top: 1rem;
}

.calendar-header {
    text-align: center;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.calendar-table thead th {
    background: var(--light-bg);
    color: var(--text-dark);
    padding: 0.4rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

.calendar-table tbody td {
    padding: 0.4rem;
    text-align: center;
    border: 1px solid var(--border-color);
    width: 14.28%;
}

.calendar-day {
    color: var(--text-dark);
}

.calendar-today {
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
    border-radius: 3px;
}

.calendar-empty {
    background: transparent;
    border: none;
}

/* Biz haqimizda sidebar */
.sidebar-about {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.sidebar-about-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.sidebar-contact {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sidebar-contact p {
    margin-bottom: 0.5rem;
}

.sidebar-contact strong {
    color: var(--primary-color);
}

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

/* -------- BREADCRUMB -------- */
.breadcrumb {
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-left: 4px solid var(--secondary-color);
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color var(--transition-speed);
}

.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* -------- NAVIGATION CARDS -------- */
.nav-cards-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--text-dark);
    display: block;
    flex: 0 0 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
    min-width: 200px;
}

.nav-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.nav-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.nav-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.nav-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.nav-card h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-card p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .nav-cards-row {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .nav-card {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: auto;
        padding: 1.25rem;
    }
    
    .nav-card-icon {
        font-size: 2rem;
    }
    
    .nav-card h3 {
        font-size: 1rem;
    }
    
    .nav-card p {
        font-size: 0.8rem;
    }
}

/* -------- GRIDS -------- */
.news-grid,
.research-grid,
.journal-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.team-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* -------- CARDS -------- */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Journal card images should be portrait */
.journal-grid .card img {
    height: 350px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    min-height: 2.4em;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.card-text {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

/* -------- BUTTONS -------- */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    color: white;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.2);
}

.btn:hover {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 86, 179, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #4e555b 100%);
}

.btn[download] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* -------- DOCUMENTS -------- */
.documents-section {
    margin-top: 2rem;
}

.document-list {
    list-style: none;
    padding: 0;
}

.document-item {
    background: var(--light-bg);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary-color);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.document-item:hover {
    background: #e8ecf0;
    transform: translateX(5px);
}

.document-item h4 {
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

.document-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* -------- FOOTER -------- */
footer {
    background: transparent;
    color: var(--text-dark);
    text-align: left;
    padding: 0;
    margin-top: 2rem;
    border-radius: 0;
}

.footer-top {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-top .footer-column h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.footer-top .footer-column p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: var(--text-light);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-top .footer-column ul li a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-top .footer-column ul li a:hover {
    color: var(--secondary-color);
}

.social-icons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-top .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(0, 61, 153, 0.08);
    border: 1px solid rgba(0, 61, 153, 0.2);
    border-radius: 4px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-speed);
    font-size: 14px;
    line-height: 1;
}

.footer-top .social-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    color: white;
}

.social-icon i {
    width: 14px;
    height: 14px;
}

.footer-top .map-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.footer-top .map-container iframe {
    border: none;
    width: 100%;
    height: 240px;
}

.footer-bottom {
    background: #003366;
    color: #eee;
    padding: 0.85rem 0;
    font-size: 0.85rem;
}

.footer-bottom-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-copy {
    color: #ccc;
}

.footer-links a {
    color: #eee;
    text-decoration: none;
    margin-left: 1rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-bottom-inner {
        padding: 0 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links a {
        margin-left: 0;
        margin-right: 1rem;
    }
}

/* -------- TEAM MEMBERS -------- */
.team-member {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.team-member img {
    width: 100%;
    max-width: 250px;
    height: 250px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    margin: 0 auto 1rem;
    border: 4px solid var(--secondary-color);
}

.team-member-placeholder {
    width: 100%;
    max-width: 250px;
    height: 250px;
    border-radius: 8px;
    background: #e0e0e0;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 2rem;
}

.team-member h3 {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    margin-top: 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.team-member p {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.team-member .bio {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* -------- TABLES -------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.table-responsive table {
    margin: 0;
    box-shadow: none;
}

table th {
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

table tr:hover {
    background: var(--light-bg);
}

table tr:last-child td {
    border-bottom: none;
}

/* -------- DETAIL PAGES -------- */
.detail-content {
    margin-top: 2rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-light);
}

.detail-content p {
    margin-bottom: 1.5rem;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.detail-meta {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
}

.detail-meta p {
    margin: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.related-items {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* -------- UTILITY CLASSES -------- */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.highlight-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.highlight-box h3 {
    color: white;
    margin-bottom: 1rem;
}

/* -------- RESPONSIVE DESIGN -------- */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }

    .layout-main {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        top: auto;
        max-height: none;
        overflow: visible;
        order: 2;
    }

    .content-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .top-bar-inner {
        padding: 0.4rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .top-bar-right a {
        margin-left: 0;
        margin-right: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .layout-main {
        gap: 1.5rem;
    }

    .content-area main {
        padding: 1.5rem;
    }

    .sidebar {
        padding: 1.25rem;
        margin-top: 0;
        order: 2;
    }

    .content-area {
        order: 1;
    }

    .mobile-header-left,
    .mobile-header-right {
        display: flex;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: flex;
    }

    .logo {
        display: none;
    }

    .top-bar {
        display: none;
    }

    nav.main-nav {
        flex-basis: 100%;
        display: none;
    }

    nav.main-nav.is-open {
        display: block;
        margin-top: 0.5rem;
        border-top: 1px solid var(--border-color);
        padding-top: 0.5rem;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        white-space: normal;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-item > a,
    .dropdown-toggle {
        padding: 0.75rem 1rem;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--light-bg);
        display: none;
        min-width: auto;
        margin: 0;
        padding: 0;
    }

    .dropdown-menu a {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .mobile-language-item {
        border-top: 2px solid var(--border-color);
        padding: 1rem 0;
        margin-top: 0.5rem;
    }

    .mobile-language-selector {
        width: 100%;
    }

    .mobile-language-selector .lang-select {
        width: 100%;
        background: var(--light-bg);
        border: 1px solid var(--border-color);
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
    }

.mobile-language-selector .lang-select option {
    background: #ffffff;
    color: var(--text-dark);
}

    .has-dropdown.is-open > .dropdown-menu {
        display: block;
    }
}

/* Mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .container {
        padding: 0.5rem;
    }

    .layout-main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .content-area main {
        padding: 1.25rem;
    }

    .sidebar {
        position: static;
        top: auto;
        max-height: none;
        overflow: visible;
        padding: 1rem;
        order: 2;
    }

    .sidebar-widget {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .sidebar-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .content-area {
        order: 1;
    }

    .header-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .logo img {
        max-width: 150px;
        height: auto;
    }

    .search-box {
        width: 100%;
        margin-top: 1rem;
    }

    .search-box input {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .nav-container {
        position: relative;
    }

    .nav-toggle {
        padding: 0.55rem;
        font-size: 0;
        min-width: 40px;
        min-height: 40px;
    }

    .nav-toggle::before {
        margin-right: 0;
        font-size: 1.1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    
    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .map-container iframe {
        height: 180px;
    }
    
    .calendar-widget {
        font-size: 0.8rem;
    }
    
    .calendar-table {
        font-size: 0.7rem;
    }
    
    .calendar-table th,
    .calendar-table td {
        padding: 0.2rem;
        font-size: 0.7rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .news-grid,
    .research-grid,
    .journal-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news-images-gallery {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .news-images-gallery .detail-image {
        aspect-ratio: 1/1;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .team-member img {
        width: 100%;
        max-width: 180px;
        height: 180px;
    }
}

/* -------- EXTRA SMALL DEVICES (360px and below) -------- */
@media screen and (max-width: 360px) {
    html {
        font-size: 13px;
    }

    h1 {
        font-size: 1.3rem;
        line-height: 1.4;
    }

    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 1rem;
    }

    body {
        font-size: 13px;
        line-height: 1.4;
    }

    .container {
        padding: 0.5rem;
        max-width: 100%;
    }

    main {
        padding: 0.5rem;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-height: 40px;
    }

    .card {
        margin-bottom: 0.75rem;
    }

    .card-content {
        padding: 0.75rem;
    }

    .card-title {
        font-size: 0.95rem;
        min-height: 1.5em;
        margin-bottom: 0.5rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .feature-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .detail-page-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .detail-metadata {
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .detail-image {
        margin-bottom: 1rem;
        border-radius: var(--radius-sm);
    }

    .detail-image--journal {
        max-width: 100%;
        margin: 0 auto 1rem;
    }

    .news-images-gallery {
        gap: 0.5rem;
    }

    .search-box input {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .sidebar {
        padding: 0.75rem;
    }

    .sidebar-title {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }

    .sidebar-widget {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .team-member img {
        width: 100%;
        max-width: 150px;
        height: 150px;
    }

    .team-member-name {
        font-size: 0.85rem;
    }

    .team-member-position {
        font-size: 0.75rem;
    }

    .document-item {
        padding: 0.75rem;
    }

    .document-item .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }

    .footer {
        padding: 1rem 0.5rem;
    }

    .footer-column {
        margin-bottom: 0.75rem;
    }

    .social-icons a {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .map-container iframe {
        height: 150px;
    }
}

/* -------- PRINT STYLES -------- */
@media print {
    header,
    footer {
        display: none;
    }
    
    main {
        box-shadow: none;
        padding: 0;
    }
    
    .btn {
        display: none;
    }
    
    .breadcrumb {
        display: none;
    }
}

/* -------- SEARCH MODAL -------- */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
    animation: fadeIn 0.3s ease;
}

.search-modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    z-index: 2001;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.6;
    }
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.search-modal-close {
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed);
}

.search-modal-close:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.search-modal-body {
    padding: 2rem;
}

.search-modal-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-modal-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.search-modal-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.search-modal-btn {
    padding: 0.8rem 1.2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

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

.search-btn-icon {
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed);
}

.search-btn-icon:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .search-modal {
        padding-top: 20vh;
    }

    .search-modal-content {
        width: 95%;
    }

    .search-modal-header h2 {
        font-size: 1.25rem;
    }

    .search-modal-body {
        padding: 1.5rem;
    }

    .search-modal-input {
        font-size: 16px;
    }
}

/* -------- LIGHTBOX MODAL -------- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    z-index: 1001;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    animation: lightboxZoom 0.3s ease-out;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1002;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

/* Lightbox responsive adjustments */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-info {
        bottom: 10px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .lightbox-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}

/* Clickable images */
img.lightbox-trigger {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

img.lightbox-trigger:hover {
    transform: scale(1.02);
}

/* -------- ACCESSIBILITY -------- */
a:focus,
button:focus,
input:focus {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* -------- MOBILE OPTIMIZATIONS -------- */
@media (max-width: 480px) {
    /* Typography adjustments for mobile */
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.3rem;
        border-bottom: 2px solid var(--secondary-color);
    }
    
    h2 {
        font-size: 1.3rem;
        margin-top: 1rem;
        margin-bottom: 0.75rem;
    }
    
    h3 {
        font-size: 1.1rem;
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    p {
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Layout adjustments */
    .container {
        padding: 1rem;
    }
    
    main {
        padding: 0.75rem !important;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 0.75rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 0.95rem;
        min-height: 1.9em;
    }
    
    .card-meta {
        font-size: 0.75rem;
    }
    
    .card-text {
        font-size: 0.85rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .btn-secondary {
        width: 100%;
    }
    
    /* Detail pages */
    .detail-meta {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .detail-meta p {
        margin: 0.25rem 0;
        font-size: 0.85rem;
    }
    
    .detail-content {
        margin-top: 1rem;
    }
    
    .detail-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.6;
    }
    
    /* Images gallery */
    .news-images-gallery {
        gap: 0.5rem;
        margin: 1rem 0;
    }
    
    .detail-image {
        margin: 0;
        border-radius: 6px;
    }
    
    .detail-image--journal {
        max-width: 100%;
        margin: 0 auto 1rem;
    }
    
    /* Team member adjustments */
    .team-member {
        padding: 1rem;
    }
    
    .team-member img {
        width: 100%;
        max-width: 170px;
        height: 170px;
    }
    
    .team-member-placeholder {
        width: 100%;
        max-width: 170px;
        height: 170px;
        border-radius: 8px;
        font-size: 1.5rem;
    }
    
    .team-member h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .team-member p {
        font-size: 0.8rem;
    }
    
    /* Document list */
    .document-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .document-content h4 {
        font-size: 0.95rem;
    }
    
    /* Sidebar */
    .sidebar {
        margin-top: 1.5rem;
        padding: 1rem;
    }
    
    .sidebar-widget {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .sidebar-title {
        font-size: 1rem;
    }
    
    .sidebar-news-title {
        font-size: 0.8rem;
    }
    
    /* Feature card adjustments */
    .feature-card {
        padding: 1.5rem 1rem;
    }
    
    .feature-card h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .feature-card-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .feature-card p {
        font-size: 0.85rem;
    }
    
    .nav-card-content {
        padding: 1.5rem 1rem;
    }
    
    .nav-card-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .text-center {
        text-align: center;
    }
    
    /* Footer adjustments */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column h3 {
        font-size: 1rem;
    }
    
    .footer-column p {
        font-size: 0.85rem;
    }
    
    .scroll-to-top-btn {
        bottom: 1.5rem !important;
        right: 1.5rem !important;
    }
}

/* Scroll to top button */
.scroll-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    font-weight: bold;
}

.scroll-to-top-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
