:root {
    --red: #033E7C;
    --red-dark: #022d5c;
    --text: #333;
    --text-light: #666;
    --bg: #f5f5f5;
    --white: #fff;
    --yellow: #FFD700;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Catamaran', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-top {
    background: #033E7C;
    padding: 0.4rem 0;
    font-size: 0.75rem;
}

.header-top .nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.header-top a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.header-top a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.header-top a.active {
    color: white;
    background: rgba(255,255,255,0.2);
    font-weight: 600;
}

.header-top a i {
    font-size: 0.85rem;
}

.header-top .search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

.header-top .search-box input {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.75rem;
    width: 120px;
    outline: none;
}

.header-top .search-box input::placeholder {
    color: rgba(255,255,255,0.6);
}

.header-top .search-box button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 0.85rem;
}

.header-main {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-bottom: 1px solid #e5e7eb;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-grb {
    height: 48px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-family: 'PT Serif', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #033E7C;
    margin: 0;
    line-height: 1.1;
}

.logo-text span {
    font-size: 0.7rem;
    color: #6b7b8d;
    letter-spacing: 0.3px;
}

.nav-links {
    display: flex;
    gap: 0;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    padding: 0.6rem 1rem;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.2s;
    position: relative;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: #033E7C;
    border-bottom-color: #033E7C;
}

.nav-links a::after {
    display: none;
}

.lang-switch {
    display: flex;
    gap: 0;
    align-items: center;
    font-size: 0.8rem;
    border-left: 1px solid #e0e4e8;
    padding-left: 0.75rem;
    margin-left: 0.5rem;
}

.lang-switch a {
    text-decoration: none;
    color: #666;
    padding: 0.3rem 0.5rem;
    font-weight: 500;
    border-radius: 3px;
}

.lang-switch a.active {
    color: #033E7C;
    background: #f0f4f8;
}

.lang-switch a:hover {
    color: #033E7C;
}

.lang-switch span {
    color: #ccc;
}

.hamburger {
    display: none;
    background: transparent;
    color: #333;
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
}

.hamburger:hover {
    background: #f5f5f5;
}

/* Hero */
.hero {
    margin-top: 70px;
    position: relative;
    height: 50vh;
    min-height: 300px;
    overflow: hidden;
}

.hero-slider {
    display: flex;
    width: 500%;
    height: 100%;
    transition: transform 0.5s ease;
}

.hero-slide {
    width: 20%;
    height: 100%;
    position: relative;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 3rem 1rem 2rem;
    color: white;
    text-align: center;
}

.hero-overlay h1 {
    font-family: 'PT Serif', serif;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.hero-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.hero-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-dots button.active {
    background: white;
}

/* Icons Section */
.icons-section {
    background: var(--red);
    padding: 1.5rem 1rem;
}

.icons-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    min-width: 100px;
    text-align: center;
}

.icon-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.icon-item svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
}

.icon-item span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* News Section */
.news-section {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-family: 'PT Serif', serif;
    font-size: 1.75rem;
    color: var(--text);
}

.section-header a {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.section-header a:hover {
    text-decoration: underline;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-card-body {
    padding: 1rem;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.news-tag {
    background: #e8e8e8;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-weight: 600;
}

.news-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #1a2a3a;
    color: white;
    padding: 3rem 1rem 1.5rem;
}

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

.footer h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.footer p, .footer a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    line-height: 1.8;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.footer-bottom a {
    color: rgba(255,255,255,0.6);
}

.footer-bottom a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.social-links a:hover {
    background: rgba(255,255,255,0.3);
}

.social-links svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #033E7C;
    color: white;
    padding: 1.25rem 1.5rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.cookie-banner a {
    color: var(--yellow);
    text-decoration: underline;
}

.cookie-btns {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btns button {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-accept {
    background: white;
    color: #033E7C;
}

.cookie-accept:hover {
    background: #f0f0f0;
}

.cookie-reject {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.4) !important;
}

.cookie-reject:hover {
    border-color: white !important;
}

/* Accessibility */
.a11y-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: var(--red);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.a11y-trigger:hover {
    background: var(--red-dark);
    transform: scale(1.1);
}

.a11y-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.a11y-overlay.active {
    display: block;
}

.a11y-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: var(--white);
    border-radius: 16px;
    width: 360px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.a11y-modal.active {
    display: block;
}

.a11y-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.a11y-modal-header h2 {
    font-family: 'PT Serif', serif;
    font-size: 1.25rem;
    color: var(--text);
    margin: 0;
}

.a11y-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.a11y-close:hover {
    color: #333;
}

.a11y-modal-body {
    padding: 1rem 1.5rem;
}

.a11y-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.a11y-option:hover {
    border-color: var(--red);
    background: #f8f9fa;
}

.a11y-option.active {
    border-color: var(--red);
    background: #f0f4f8;
}

.a11y-option-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--red);
    flex-shrink: 0;
}

.a11y-option-label {
    font-size: 0.95rem;
    color: var(--text-light);
}

.a11y-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
}

.a11y-info {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.a11y-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--red);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}

.a11y-reset:hover {
    opacity: 0.7;
}

.a11y-save {
    display: block;
    width: 100%;
    padding: 0.875rem;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.a11y-save:hover {
    background: var(--red-dark);
}

/* High Contrast */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast .header-main {
    background: #000 !important;
}

body.high-contrast .logo-text h1 {
    color: #fff !important;
}

body.high-contrast .logo-text span {
    color: #ccc !important;
}

body.high-contrast .nav-links a {
    color: #fff !important;
}

body.high-contrast .news-card {
    background: #222 !important;
    color: #fff !important;
}

body.high-contrast .news-card h3,
body.high-contrast .news-card p {
    color: #fff !important;
}

body.high-contrast .footer {
    background: #000 !important;
}

body.high-contrast .split-right {
    background: #111 !important;
    border-color: #333 !important;
}

body.high-contrast .notice-item {
    background: #222 !important;
    color: #fff !important;
}

body.high-contrast .e-services {
    background: #111 !important;
}

body.high-contrast .e-service-item {
    background: #222 !important;
    color: #fff !important;
    border-color: #444 !important;
}

body.high-contrast .notice-tag {
    background: #c4242b !important;
    color: #fff !important;
}

/* E-Services */
.e-services {
    background: #f0f4f8;
    padding: 2.5rem 1rem;
}

.e-services-container {
    max-width: 1200px;
    margin: 0 auto;
}

.e-services h2 {
    font-family: 'PT Serif', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.e-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.e-service-item {
    background: var(--white);
    padding: 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.e-service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    color: var(--red);
}

.e-service-item svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    fill: var(--red);
}

.e-service-item span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Content Split */
.content-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.split-right {
    background: #fff;
    border-radius: 8px;
    padding: 1.75rem;
    border: 1px solid #e5e7eb;
}

.split-right .section-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.split-right .section-header h2 {
    font-size: 1.15rem;
    color: var(--text);
}

.notices-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.notice-item {
    background: transparent;
    border-left: none;
    padding: 0.85rem 0;
    border-radius: 0;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: none;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text);
}

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

.notice-item:hover {
    transform: none;
    background: #fafbfc;
    box-shadow: none;
}

.notice-date {
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
    white-space: nowrap;
    min-width: 75px;
    padding-top: 1px;
}

.notice-text h4 {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    color: #333;
}

.notice-item:hover .notice-text h4 {
    color: #033E7C;
}

.notice-tag {
    font-size: 0.62rem;
    background: #033E7C;
    color: white;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Dyslexia */
body.a11y-dyslexia {
    font-family: 'OpenDyslexic', 'Comic Sans MS', cursive !important;
}

body.a11y-dyslexia *:not(svg):not(svg *) {
    font-family: 'OpenDyslexic', 'Comic Sans MS', cursive !important;
}

body.a11y-underline-links a {
    text-decoration: underline !important;
}

/* Page Content */
.page-content {
    margin-top: 70px;
    padding: 3rem 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.page-content h1 {
    font-family: 'PT Serif', serif;
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.page-content .content-body {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.page-content .content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.page-content .content-body p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.page-content .content-body h2,
.page-content .content-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Single Post */
.post-header {
    margin-bottom: 2rem;
}

.post-header .post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.post-header .post-category {
    background: var(--red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-header h1 {
    font-family: 'PT Serif', serif;
    font-size: 2.25rem;
    color: var(--text);
    line-height: 1.3;
}

.post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.post-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content p {
    margin-bottom: 1.25rem;
    line-height: 1.9;
    font-size: 1.05rem;
}

.post-content h2,
.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content blockquote {
    border-left: 4px solid var(--red);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* Archive */
.archive-header {
    margin-top: 70px;
    padding: 3rem 1rem 1.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.archive-header h1 {
    font-family: 'PT Serif', serif;
    font-size: 2rem;
    color: var(--text);
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination a {
    background: var(--white);
    color: var(--text);
    border: 1px solid #e5e7eb;
}

.pagination a:hover {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

.pagination .active {
    background: var(--red);
    color: white;
    border: 1px solid var(--red);
}

/* 404 */
.error-404 {
    margin-top: 70px;
    padding: 5rem 1rem;
    text-align: center;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--red);
    margin-bottom: 1rem;
}

.error-404 p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.error-404 a {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--red);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.error-404 a:hover {
    background: var(--red-dark);
}

/* Responsive */
@media (max-width: 900px) {
    .content-split {
        grid-template-columns: 1fr;
    }

    .split-right {
        background: transparent;
        border: none;
        padding: 0;
    }

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

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .header-top .search-box {
        display: none;
    }

    .hero-overlay h1 {
        font-size: 1.5rem;
    }

    .icons-container {
        gap: 0.5rem;
    }

    .icon-item {
        min-width: 80px;
        padding: 0.5rem;
    }

    .icon-item svg {
        width: 24px;
        height: 24px;
    }

    .icon-item span {
        font-size: 0.7rem;
    }

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

    .notice-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .notice-date {
        min-width: auto;
    }

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

    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .split-right .section-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

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