/* ── Fonts ── */
@font-face {
    font-family: 'Cinzel';
    src: url('/fonts/Cinzel-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('/fonts/Cinzel-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('/fonts/Cinzel-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('/fonts/Cinzel-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Crimson Text';
    src: url('/fonts/CrimsonText-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Crimson Text';
    src: url('/fonts/CrimsonText-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Crimson Text';
    src: url('/fonts/CrimsonText-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* ── Reset ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 134, 11, 0.35) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.35);
    border-radius: 999px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(218, 165, 32, 0.75);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* ── Base ── */
body {
    font-family: 'Crimson Text', 'Georgia', serif;
    line-height: 1.6;
    color: #2c1810;
    background: linear-gradient(135deg, #f8f4e6 0%, #e8dcc0 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* ── Logo Banner ── */
.logo-banner {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.logo-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.logo-banner h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.header-image {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Navigation ── */
.nav-container {
    background: linear-gradient(135deg, #daa520 0%, #b8860b 50%, #daa520 100%);
    border-radius: 25px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    border: 2px solid #b8860b;
}

.nav-container.hidden,
.nav-item.hidden {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    flex: 1;
    text-align: center;
}

.nav-link {
    display: block;
    padding: 1.2rem 2rem;
    color: #2c1810;
    text-decoration: none;
    font-size: 1.2rem;
    font-family: 'Cinzel', serif;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.nav-link:hover {
    color: #ffd700;
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #ffd700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ── User Controls ── */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #f4e4bc 0%, #e6d3a3 100%);
    border-radius: 25px;
    border: 2px solid #b8860b;
    font-weight: 600;
    color: #2c1810;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 69, 19, 0.1);
    color: #8b4513;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-buttons {
    display: flex;
    gap: 0.8rem;
}

/* ── Buttons ── */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #ffd700;
    border: 2px solid #b8860b;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    color: #2c1810;
    border: 2px solid #b8860b;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #b8860b 0%, #daa520 100%);
    color: #ffd700;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #8b0000 0%, #a52a2a 100%);
    color: #ffd700;
    border: 2px solid #8b0000;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c2c 100%);
    color: #ffd700;
    border: 2px solid #2d5016;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ── Language Dropdown ── */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-select {
    padding: 0.8rem 1.2rem;
    border: 2px solid #b8860b !important;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%) !important;
    background-color: #8b4513 !important;
    color: #ffd700 !important;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.language-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.language-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.3);
}

.language-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #2c1810;
    border: 2px solid #b8860b;
    border-radius: 10px;
    margin-top: 0.5rem;
    min-width: 120px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown-menu.active {
    display: block;
}

.language-option {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    color: #ffd700;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.language-option:hover {
    background: rgba(218, 165, 32, 0.2);
}

.language-option.active {
    background: rgba(218, 165, 32, 0.3);
    font-weight: 700;
}

.language-option.active::before {
    content: '✓ ';
}

/* ── Search & Filter Controls ── */
.search-filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.search-container {
    display: none;
}

.search-container.active {
    display: block;
}

.search-input {
    padding: 1rem 1.5rem;
    border: 3px solid #b8860b;
    border-radius: 25px;
    background: linear-gradient(135deg, #fff 0%, #f8f4e6 100%);
    font-size: 1.1rem;
    color: #2c1810;
    width: 350px;
}

.search-input:focus {
    outline: none;
    border-color: #daa520;
}

.control-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 3px solid #b8860b;
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    color: #2c1810;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #ffd700;
    transform: translateY(-2px) scale(1.05);
}

.control-btn.active {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #ffd700;
}

/* ── Login Section ── */
.login-section {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ── Admin Panel ── */
.admin-panel {
    background: linear-gradient(135deg, #f8f4e6 0%, #e8dcc0 100%);
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 3px solid #8b4513;
    text-align: center;
}

.admin-panel h3 {
    color: #8b4513;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.admin-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Filter Panel ── */
.filter-panel {
    background: linear-gradient(135deg, #f8f4e6 0%, #e8dcc0 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 3px solid #b8860b;
    display: none;
}

.filter-panel.active {
    display: block;
    animation: slideDown 0.4s ease-out;
}

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

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

.filter-section h3 {
    color: #8b4513;
    margin-bottom: 1.5rem;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, rgba(248, 244, 230, 0.8) 0%, rgba(232, 220, 192, 0.8) 100%);
    border: 2px solid #b8860b;
    color: #2c1810;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

.filter-btn:hover {
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    color: #ffd700;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #ffd700;
}

/* ── Sections ── */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

/* ── Home Page ── */
.home-hero {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-bottom: 4rem;
}

.home-photo {
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-text {
    flex: 1;
    padding-top: 1rem;
}

/* ── About Section ── */
.about-card {
    max-width: 900px;
    margin: 0 auto;
}

.about-card .card-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 3rem;
}

@media (max-width: 640px) {
    .about-card .card-layout {
        flex-direction: column !important;
        gap: 2rem;
    }
    .about-logo {
        width: 200px;
        height: 200px;
    }
}

.about-admin-bar {
    display: none;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.about-description-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #2c1810;
}

.about-description-content p:last-child {
    margin-bottom: 0;
}

.about-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    background: linear-gradient(135deg, #8b4513, #daa520);
    color: #fff;
}

.social-link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.social-link--text {
    background: linear-gradient(135deg, #4a3060, #7b5ea7);
}

.social-link--text:hover {
    opacity: 0.9;
}

.home-welcome {
    font-family: 'Cinzel', serif;
    font-size: 4.5rem;
    color: #8b4513;
    margin-bottom: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b4513 0%, #daa520 50%, #8b4513 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-description {
    font-size: 1.4rem;
    line-height: 1.8;
    color: #2c1810;
    margin-bottom: 3rem;
}

/* ── Recent / Announcements ── */
.recent-section {
    margin-top: 3rem;
}

.recent-title,
.announcements-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
    background: linear-gradient(135deg, #8b4513 0%, #daa520 50%, #8b4513 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recent-grid,
.announcements-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}


/* ── Notifications ── */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1.2rem 2rem;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    z-index: 10000;
    animation: slideInRight 0.4s ease-out;
    max-width: 400px;
    border: 2px solid;
}

.notification.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #155724;
}

.notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    border-color: #721c24;
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8 0%, #3498db 100%);
    border-color: #0c5460;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ── Footer ── */
.site-footer {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 50%, #8b4513 100%);
    color: #ffd700;
    margin-top: 4rem;
    padding: 3rem 2rem 1rem;
    border-top: 4px solid #b8860b;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

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

.footer-links-row {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    align-items: center;
    justify-content: center;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links-row li {
    margin-bottom: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: #ffd700;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid rgba(184, 134, 11, 0.5);
    color: rgba(255, 255, 255, 0.8);
}

/* ── Utility ── */
.hidden {
    display: none !important;
}

.text-muted { color: #666; }
.text-danger { color: #dc3545; }
.text-success { color: #28a745; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .home-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .home-photo {
        width: 400px;
        height: 400px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0.3rem;
    }

    .home-welcome {
        font-size: 2rem;
    }

    .nav-menu {
        gap: 0.2rem;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 0.35rem 0.4rem;
        font-size: 0.68rem;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        white-space: nowrap;
    }

    .nav-link i {
        font-size: 0.65rem;
        flex-shrink: 0;
    }

    .nav-link span {
        flex-shrink: 0;
    }

    .user-info {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .user-avatar {
        width: 1.5rem;
        height: 1.5rem;
    }

    .user-avatar i {
        font-size: 1.5rem !important;
    }

    #username-display {
        font-size: 0.75rem;
    }

    .auth-buttons {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

    .btn i {
        font-size: 0.65rem;
    }

    .search-filter-controls {
        gap: 0.3rem;
    }

    .search-container {
        width: 150px;
        flex-shrink: 1;
    }

    .search-input {
        font-size: 0.85rem;
        padding: 0.65rem;
        width: 100%;
        height: auto;
        min-height: 40px;
    }

    .control-btn {
        padding: 0.6rem;
        font-size: 0.95rem;
        min-width: 40px;
        min-height: 40px;
    }

    .filter-options {
        justify-content: flex-start;
    }

    .filter-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

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

    .footer-links-row {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .site-footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-links li {
        font-size: 0.7rem;
    }
}
