/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    background-color: #F5E9DA; /* Beige */
    color: #000000; /* Black */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Garamond, serif;
    color: #263D2F; /* Green */
}

/* Common Components */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.btn-primary {
    background-color: #263D2F;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: 'Lora', serif;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1E2F23;
    transform: translateY(-2px);
}

.btn-primary:focus {
    outline: 2px solid #F5E9DA;
    outline-offset: 2px;
}

.btn-secondary {
    background-color: #FFFFFF;
    border: 1px solid #263D2F;
    color: #263D2F;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #263D2F;
    color: #FFFFFF;
}

.btn-secondary:focus {
    outline: 2px solid #F5E9DA;
    outline-offset: 2px;
}

.form-control {
    border: 1px solid #263D2F;
    border-radius: 6px;
    font-family: 'Libre Baskerville', serif;
    padding: 0.75rem;
    background-color: #FFFFFF;
    color: #000000;
    width: 100%;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #1E2F23;
    box-shadow: 0 0 5px rgba(30, 47, 35, 0.3);
    outline: none;
}

.card {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

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

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-title a {
    color: #263D2F;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover,
.card-title a:focus {
    color: #1E2F23;
}

.card-text {
    font-size: 0.95rem;
    color: #000000;
}

.card-text strong {
    color: #263D2F;
}

.card-text a {
    color: #263D2F;
    text-decoration: underline;
}

.card-text a:hover,
.card-text a:focus {
    color: #1E2F23;
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Maintenance Mode */
.maintenance {
    padding: 4rem 1rem;
    background-color: #FFFFFF;
    border-radius: 8px;
    max-width: 600px;
    margin: 2rem auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.maintenance h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.maintenance p {
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    background-color: #F5E9DA;
    padding: 4rem 1rem;
    text-align: center;
    background-image: url('/assets/images/hero_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Search Section */
.search-section {
    background-color: #FFFFFF;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.search-form {
    background-color: #F5E9DA;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-form .row {
    gap: 1rem;
}

/* Articles */
.articles {
    margin: 2rem 0;
}

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

.page-link {
    color: #263D2F;
    padding: 0.5rem 1rem;
    border: 1px solid #263D2F;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-link:hover,
.page-link:focus {
    background-color: #263D2F;
    color: #FFFFFF;
}

.page-link.active {
    background-color: #263D2F;
    color: #FFFFFF;
    border-color: #263D2F;
}

.pagination .form-control {
    max-width: 150px;
    margin-left: 1rem;
}

/* Journal Information */
.journal-section {
    padding: 2rem 0;
}

.journal-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.column {
    width: 100%;
}

.imprint-details {
    padding: 1rem;
}

.imprint-details p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

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

.cover-image {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.cover-title {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    color: #263D2F;
}

/* Announcements & News */
.info-section {
    padding: 2rem 0;
}

.columns-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.item {
    padding: 1rem;
}

.item.featured {
    border: 2px solid #263D2F;
}

.item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.summary {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.read-more {
    color: #263D2F;
    cursor: pointer;
    text-decoration: underline;
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.read-more:hover,
.read-more:focus {
    color: #1E2F23;
}

/* Initiatives Section */
.initiatives-section {
    padding: 2rem 0;
    text-align: center;
}

.initiatives-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.box {
    background-color: #FFFFFF;
    border: 2px solid #263D2F;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.box:hover,
.box:focus {
    transform: scale(1.05);
    border-color: #1E2F23;
}

.box img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    display: block;
    background-color: #F5E9DA;
}

/* Call-to-Action */
.call-to-action {
    padding: 2rem 0;
    background-color: #FFFFFF;
    text-align: center;
}

.call-to-action h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.call-to-action p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000; /* Updated from 1000 */
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: #FFFFFF;
    margin: 10% auto;
    padding: 1.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal h3 {
    color: #263D2F;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.subscribe-btn,
.cancel-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: 'Lora', serif;
    font-size: 1rem;
}

.subscribe-btn {
    background-color: #263D2F;
    color: #FFFFFF;
}

.subscribe-btn:hover,
.subscribe-btn:focus {
    background-color: #1E2F23;
}

.cancel-btn {
    background-color: #FFFFFF;
    color: #263D2F;
    border: 1px solid #263D2F;
}

.cancel-btn:hover,
.cancel-btn:focus {
    background-color: #263D2F;
    color: #FFFFFF;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    color: #263D2F;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #1E2F23;
}

/* Sync Notification */
#sync-notification {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem;
    background-color: #263D2F;
    color: #FFFFFF;
    border-radius: 6px;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* PWA Install */
.pwa-install-container {
    background-color: #F5E9DA;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9998;
}

.pwa-install-btn {
    margin: 0.5rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .journal-columns,
    .columns-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-form .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

    .search-form {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 15% auto;
    }

    .box img {
        height: 120px;
    }

    .pagination {
        flex-direction: column;
        align-items: center;
    }

    .pagination .form-control {
        margin-left: 0;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.5rem;
    }

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

    .initiatives-title,
    .call-to-action h2 {
        font-size: 1.5rem;
    }

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

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

    .btn-primary,
    .subscribe-btn,
    .cancel-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .pwa-install-container {
        padding: 0.5rem;
    }
}

/* Dark mode styles */
body.dark-mode {
    background: #2E2E2E;
    color: #FFFFFF;
}

body.dark-mode .site-header {
    background: #1E2F23;
    border-bottom: 1px solid #3C4F3F;
}

body.dark-mode .header-top-bar {
    background: #263D2F;
}

body.dark-mode .social-links a,
body.dark-mode .help-button,
body.dark-mode .dark-mode-toggle {
    color: #FFFFFF;
}

body.dark-mode .social-links a:hover,
body.dark-mode .help-button:hover,
body.dark-mode .dark-mode-toggle:hover {
    color: #F5E9DA;
}

body.dark-mode .dropdown-content {
    background: #1E2F23;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dropdown-content a {
    color: #FFFFFF;
}

body.dark-mode .dropdown-content a:hover {
    background: #263D2F;
}

body.dark-mode .header-links a {
    color: #FFFFFF;
}

body.dark-mode .header-links a:hover {
    color: #F5E9DA;
}

body.dark-mode .header-links a::after {
    background-color: #F5E9DA;
}

body.dark-mode .main-menu-overlay {
    background: linear-gradient(135deg, #1E2F23 0%, #263D2F 100%);
}

body.dark-mode .overlay-menu a {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .overlay-menu a:hover {
    color: #F5E9DA;
}

body.dark-mode .menu-header h2,
body.dark-mode .menu-newsletter h3 {
    color: #F5E9DA;
}

body.dark-mode .menu-header p,
body.dark-mode .menu-newsletter p {
    color: #CCCCCC;
}

body.dark-mode .menu-quick-links a {
    color: #CCCCCC;
}

body.dark-mode .menu-quick-links a:hover {
    color: #F5E9DA;
}

body.dark-mode .newsletter-form input {
    background: #3C4F3F;
    border-color: #4A5C4B;
    color: #FFFFFF;
}

body.dark-mode .menu-toggle {
    color: #FFFFFF;
}

body.dark-mode .menu-toggle:hover {
    color: #F5E9DA;
}

body.dark-mode .logo-text {
    color: #F5E9DA;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Site Header */
.site-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E0E0E0;
    position: relative;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
    width: 100%;
}

.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Top bar */
.header-top-bar {
    background: #F8F8F8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #E0E0E0;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-links a {
    color: #000000;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #263D2F;
    transform: translateY(-2px);
}

/* Help Dropdown */
.help-dropdown {
    position: relative;
}

.help-button {
    background: none;
    border: none;
    color: #000000;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.help-button:hover {
    color: #263D2F;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #FFFFFF;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 1001;
}

.help-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #000000;
    font-family: 'Lora', serif;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.dropdown-content a:hover {
    background: #F5E9DA;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    color: #000000;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.dark-mode-toggle:hover {
    color: #263D2F;
    transform: scale(1.1);
}

/* Main header with grid */
.header-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0.5rem 1rem;
    max-width: 100%;
}

/* Left section: Menu button */
.header-left {
    display: flex;
    align-items: center;
    justify-self: start;
}

/* Menu button */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    position: relative;
    z-index: 2100;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #000000;
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle:hover {
    color: #263D2F;
    transform: scale(1.05);
}

.menu-toggle[aria-expanded="true"] {
    color: #263D2F;
    opacity: 0;
    pointer-events: none;
}

/* Center logo */
.header-center {
    justify-self: center;
}

.site-logo {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    color: #263D2F;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Right section: Navigation */
.header-right {
    display: flex;
    align-items: center;
    justify-self: end;
}

.header-links ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-links a {
    text-decoration: none;
    color: #000000;
    font-family: 'Lora', serif;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
    font-size: 0.85rem;
}

.header-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #263D2F;
    transition: width 0.3s ease;
}

.header-links a:hover {
    color: #263D2F;
}

.header-links a:hover::after {
    width: 100%;
}

.header-links a.active {
    color: #263D2F;
}

.header-links a.active::after {
    width: 100%;
}

/* Fullscreen menu overlay */
.main-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFFFFF 0%, #F5E9DA 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    overflow-y: auto;
    padding: 1.5rem;
    z-index: 2000;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05);
}

.main-menu-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    position: fixed;
    right: 15px;
    top: 15px;
    z-index: 2100;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

body.dark-mode .menu-close {
    color: #FFFFFF;
}

.menu-close:hover {
    color: #263D2F;
    transform: rotate(90deg);
}

/* Menu header section */
.menu-header {
    padding: 15px 0;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.menu-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.8rem;
    color: #263D2F;
    margin-bottom: 8px;
    font-weight: 300;
}

.menu-header p {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    color: #555555;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Overlay navigation */
.overlay-menu {
    max-width: 100%;
    margin: 2rem auto;
}

.overlay-menu ul {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.overlay-menu li {
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
    perspective: 1000px;
}

.overlay-menu li:hover {
    transform: translateY(-3px);
}

.overlay-menu a {
    color: #222222;
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
    display: block;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.overlay-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #263D2F;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.overlay-menu a:hover {
    color: #263D2F;
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.overlay-menu a:hover::before {
    transform: scaleY(1);
}

/* Menu category icons */
.overlay-menu a i {
    margin-right: 10px;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(38, 61, 47, 0.1);
    border-radius: 50%;
    color: #263D2F;
    transition: background 0.3s ease, transform 0.3s ease;
}

.overlay-menu a:hover i {
    background: rgba(38, 61, 47, 0.2);
    transform: rotate(15deg);
}

/* Menu bottom section */
.menu-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.menu-quick-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 25px;
    padding: 0 10px;
}

.menu-quick-links a {
    color: #555555;
    font-family: 'Lora', serif;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.menu-quick-links a:hover {
    color: #263D2F;
}

.menu-newsletter {
    max-width: 90%;
    margin: 0 auto;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

body.dark-mode .menu-newsletter {
    background: rgba(255, 255, 255, 0.1);
}

.menu-newsletter h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #222222;
}

.menu-newsletter p {
    font-family: 'Lora', serif;
    font-size: 0.85rem;
    color: #555555;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #DDDDDD;
    border-radius: 4px;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
}

.newsletter-form button {
    background: #263D2F;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: 'Lora', serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.newsletter-form button:hover {
    background: #1E2F23;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .header-main {
        padding: 0.4rem;
    }
    
    .social-links a:nth-child(3),
    .social-links a:nth-child(4) {
        display: none;
    }
    
    .header-links ul li:not(:nth-child(1)):not(:last-child) {
        display: none;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
}

@media screen and (min-width: 481px) and (max-width: 667px) {
    .header-links ul li:nth-child(2),
    .header-links ul li:nth-child(3) {
        display: none;
    }
    
    .logo-text {
        font-size: 1.7rem;
    }
}

@media screen and (min-width: 668px) and (max-width: 768px) {
    .header-links ul li:nth-child(2) {
        display: none;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
    
    .overlay-menu ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .header-main {
        padding: 0.75rem;
    }
    
    .overlay-menu ul {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .newsletter-form {
        flex-direction: row;
    }
}

@media screen and (min-width: 1025px) {
    .header-main {
        padding: 1rem 2rem;
    }
    
    .overlay { 意大利: repeat(3, 1fr);
    }
    
    .logo-text {
        font-size: 2.2rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .header-links ul {
        gap: 1rem;
    }
    
    .header-links a {
        font-size: 0.95rem;
    }
    
    .newsletter-form {
        flex-direction: row;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

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

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

/* Footer */
.footer {
    background-color: #263D2F; /* Green */
    color: #FFFFFF;
    padding: 2rem 0;
}

.footer h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #FFFFFF;
    font-family: 'Merriweather', Garamond, serif;
}

.footer p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer a {
    color: #F5E9DA; /* Beige */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover,
.footer a:focus {
    color: #FFFFFF;
}

.footer-column {
    min-height: 200px; /* Ensure columns align */
    padding: 1rem;
}

/* Images */
.footer-logo {
    max-width: 150px;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 1rem 0;
    display: block;
}

.cc-logo {
    max-width: 100px;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Newsletter Section */
.newsletter-section {
    margin-bottom: 2rem;
}

.newsletter-box {
    background-color: #FFFFFF;
    padding: 0; /* Card-body handles padding */
}

.newsletter-box h3 {
    color: #263D2F;
}

.newsletter-box p {
    color: #000000;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.newsletter-form .form-control {
    flex: 1;
    min-width: 200px;
    border-color: #263D2F;
}

.newsletter-form .btn-primary {
    flex: 0 0 auto;
}

/* Footer Content */
.footer-content {
    margin-bottom: 2rem;
}

.footer-content .row {
    align-items: stretch; /* Ensure columns are equal height */
}

.list-unstyled li {
    margin-bottom: 0.75rem;
}

.list-unstyled a {
    font-size: 0.95rem;
    display: block;
}

/* Social Icons */
.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-social a {
    font-size: 1.2rem;
    color: #F5E9DA;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover,
.footer-social a:focus {
    color: #FFFFFF;
    transform: scale(1.1);
}

/* Copyright */
.footer-copyright {
    padding-top: 1.5rem;
    border-top: 1px solid #F5E9DA;
}

.footer-copyright p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Responsive Footer */
@media (min-width: 992px) {
    .footer-column {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .footer-column:nth-child(1),
    .footer-column:nth-child(2) {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .footer-column:nth-child(3) {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }
    .footer-social,
    .list-unstyled {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 767px) {
    .footer-column {
        text-align: center;
        min-height: auto;
    }
    .footer-social {
        justify-content: center;
    }
    .list-unstyled {
        display: inline-block;
        text-align: left;
    }
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    .form-group {
        flex-direction: column;
        align-items: center;
    }
    .newsletter-form .form-control,
    .newsletter-form .btn-primary {
        width: 100%;
        max-width: 300px;
    }
    .footer-logo {
        max-width: 120px;
    }
    .cc-logo {
        max-width: 80px;
    }
}

@media (max-width: 576px) {
    .footer h3 {
        font-size: 1.1rem;
    }
    .footer p,
    .list-unstyled a,
    .footer-copyright p {
        font-size: 0.85rem;
    }
    .footer-social a {
        font-size: 1rem;
    }
}