/* ============================================
   Farnosť Veľké Lovce - Hlavný CSS
   Jemné žlté farby
   ============================================ */

:root {
    --primary: #c8a415;
    --primary-light: #f5e6a3;
    --primary-lighter: #fdf8e8;
    --primary-dark: #9a7e10;
    --bg: #fffef9;
    --bg-sidebar: #fefcf0;
    --text: #3a3a3a;
    --text-light: #6b6b6b;
    --border: #e8ddb5;
    --border-light: #f0eacc;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
    --header-height: 150px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* HEADER */
.site-header {
    background: linear-gradient(135deg, #b8960f 0%, #d4af37 50%, #c8a415 100%);
    height: var(--header-height);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.site-header .header-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.site-header .header-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}

.site-header .header-link {
    color: var(--white);
    text-decoration: none;
    display: block;
    text-align: center;
    transition: opacity 0.3s;
}

.site-header .header-link:hover {
    opacity: 0.85;
    color: var(--white);
}

.site-header h1 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 6px;
    font-style: italic;
}

.site-header .subtitle {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 1.5px;
}

/* Header BG animations */
@keyframes headerFloat {
    0%, 100% { transform: scale(1.05) translate(0, 0); }
    25% { transform: scale(1.05) translate(8px, -4px); }
    50% { transform: scale(1.05) translate(-4px, 6px); }
    75% { transform: scale(1.05) translate(-6px, -3px); }
}

@keyframes headerSlide {
    0%, 100% { transform: scale(1.08) translateX(0); }
    50% { transform: scale(1.08) translateX(-15px); }
}

@keyframes headerZoom {
    0%, 100% { transform: scale(1.0); }
    50% { transform: scale(1.08); }
}

.header-anim-float .header-bg {
    animation: headerFloat 20s ease-in-out infinite;
}

.header-anim-slide .header-bg {
    animation: headerSlide 25s ease-in-out infinite;
}

.header-anim-zoom .header-bg {
    animation: headerZoom 18s ease-in-out infinite;
}

/* NAVIGATION */
.main-nav {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* QUOTE BAR */
.quote-bar {
    background: var(--primary-lighter);
    border-bottom: 1px solid var(--border-light);
    padding: 10px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: height 0.5s ease;
}
.quote-wrapper {
    position: relative;
}
.quote-item {
    display: none !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text);
}
.quote-item.active {
    display: flex !important;
}
.quote-icon {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}
.quote-text {
    font-style: italic;
    font-family: 'Playfair Display', Georgia, serif;
}
.quote-source {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
}
/* Quote effects */
.quote-bar[data-effect="fade"] .quote-item {
    transition: opacity 0.8s ease;
}
.quote-bar[data-effect="fade"] .quote-item.fading-out {
    opacity: 0;
}
.quote-bar[data-effect="fade"] .quote-item.fading-in {
    opacity: 0;
}
.quote-bar[data-effect="slide"] .quote-item {
    transition: transform 0.6s ease, opacity 0.6s ease;
}
.quote-bar[data-effect="slide"] .quote-item.sliding-out {
    transform: translateY(-100%);
    opacity: 0;
}
.quote-bar[data-effect="slide"] .quote-item.sliding-in {
    transform: translateY(100%);
    opacity: 0;
}

.main-nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    padding: 12px;
}

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

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 14px 18px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.35s ease, color 0.3s ease, border-bottom-color 0.3s ease, transform 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    position: relative;
}

.nav-menu > li > a:hover {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    transform: translateY(-1px);
}

.nav-menu > li.active > a {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* Dropdown indicator on desktop */
.nav-menu > li.has-dropdown > a {
    padding-right: 28px;
    position: relative;
}

.nav-menu > li.has-dropdown > a::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
    opacity: 0.5;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-menu > li.has-dropdown:hover > a::after {
    opacity: 0.8;
    transform: translateY(-35%) rotate(225deg);
}

/* Dropdown */
.nav-menu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 50;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.nav-menu li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .dropdown li a {
    display: block;
    padding: 10px 18px;
    color: var(--text);
    font-size: 0.9rem;
    transition: background 0.3s ease, color 0.3s ease, padding-left 0.3s ease;
}

.nav-menu .dropdown li a:hover {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    padding-left: 24px;
}

.nav-menu .dropdown li.active > a {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    font-weight: 600;
    padding-left: 24px;
}

/* MAIN CONTENT LAYOUT */
.main-content {
    flex: 1;
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.content-area {
    flex: 1;
    min-width: 0;
}

/* SIDEBAR */
.sidebar {
    width: 340px;
    flex-shrink: 0;
}

.sidebar-right .main-content {
    flex-direction: row;
}

.sidebar-left .main-content {
    flex-direction: row-reverse;
}

.sidebar-widget {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}

.sidebar-widget .widget-title {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-lighter));
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    border-bottom: 1px solid var(--border);
}

.sidebar-widget .widget-content {
    padding: 16px;
}

.sidebar-widget .widget-content ul {
    list-style: none;
}

.sidebar-widget .widget-content ul li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.sidebar-widget .widget-content ul li:last-child {
    border-bottom: none;
}

/* ARTICLE CARDS */
.articles-grid {
    display: grid;
    gap: 24px;
}

.articles-grid.layout-standard {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

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

.articles-grid.layout-compact {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Fade-in animation for cards */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease, border-color 0.3s ease;
    animation: fadeInUp 0.6s ease both;
}

.article-card:nth-child(1) { animation-delay: 0s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.2s; }
.article-card:nth-child(4) { animation-delay: 0.3s; }
.article-card:nth-child(5) { animation-delay: 0.4s; }
.article-card:nth-child(6) { animation-delay: 0.5s; }

.article-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    border-color: var(--primary-light);
}

.article-card .card-image-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.article-card .card-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--bg-light);
}

.article-card .card-image-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 110%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: blur(20px);
    z-index: 0;
}

.article-card .card-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-card:hover .card-image {
    transform: scale(1.06);
}

.article-card .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-card .card-category {
    font-size: 0.75rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--text);
}

.article-card h3 a:hover {
    color: var(--primary-dark);
}

.article-card .card-perex {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 14px;
    text-align: justify;
}

.article-card .card-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.article-card .card-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.article-card .read-more {
    display: inline-block;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.3s ease, transform 0.3s ease, letter-spacing 0.3s ease;
}

.article-card .read-more:hover {
    color: var(--primary);
    transform: translateX(3px);
    letter-spacing: 0.5px;
}

/* ARTICLE DETAIL */
.article-detail {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.5s ease both;
}

.article-detail h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text);
    line-height: 1.3;
}

.article-detail .article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.article-detail .article-intro-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.article-detail .article-content {
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
}

.article-detail .article-content p { margin-bottom: 16px; }
.article-detail .article-content h2 { font-size: 1.5rem; margin: 24px 0 12px; color: var(--primary-dark); }
.article-detail .article-content h3 { font-size: 1.2rem; margin: 20px 0 10px; }
.article-detail .article-content img { border-radius: var(--radius); margin: 16px 0; }
.article-detail .article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-detail .article-content table th,
.article-detail .article-content table td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
}
.article-detail .article-content table th {
    background: var(--primary-lighter);
    font-weight: 600;
}
.article-detail .article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    background: var(--primary-lighter);
    margin: 16px 0;
    font-style: italic;
}
.article-detail .article-content a {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* STAR RATING */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .star {
    cursor: pointer;
    font-size: 1.3rem;
    color: #ddd;
    transition: color 0.2s, transform 0.2s;
}

.star-rating .star.active,
.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #f5c518;
}

.star-rating .star:hover {
    transform: scale(1.3);
}

.star-rating[data-readonly] .star {
    cursor: default;
}

.star-rating[data-readonly] .star:hover {
    transform: none;
}

/* Inline rating in article detail meta */
.article-rating-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-rating-inline .star-rating {
    gap: 1px;
}

.article-rating-inline .star-rating .star {
    font-size: 1.1rem;
}

.article-rating-inline .rating-thanks {
    color: var(--primary-dark);
    font-size: 0.8rem;
}

/* Star rating confirmed animation */
@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.star-rating .star.star-confirmed {
    animation: starPop 0.4s ease;
}

/* Card star display */
.card-stars {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.card-stars .star-icon {
    font-size: 0.82rem;
    color: #ddd;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.card-stars .star-icon.filled {
    color: #f5c518;
}

.article-card:hover .card-stars .star-icon.filled {
    animation: starTwinkle 0.6s ease both;
}

.article-card:hover .card-stars .star-icon.filled:nth-child(2) { animation-delay: 0.08s; }
.article-card:hover .card-stars .star-icon.filled:nth-child(3) { animation-delay: 0.16s; }
.article-card:hover .card-stars .star-icon.filled:nth-child(4) { animation-delay: 0.24s; }
.article-card:hover .card-stars .star-icon.filled:nth-child(5) { animation-delay: 0.32s; }

@keyframes starTwinkle {
    0% { transform: scale(1) rotate(0deg); color: #f5c518; }
    30% { transform: scale(1.35) rotate(-12deg); color: #ffdd44; }
    60% { transform: scale(0.9) rotate(8deg); color: #f5c518; }
    100% { transform: scale(1) rotate(0deg); color: #f5c518; }
}

.star-rating-display {
    display: inline-flex;
    gap: 1px;
}

.star-rating-display .star {
    font-size: 0.9rem;
    color: #ddd;
}

.star-rating-display .star.filled {
    color: #f5c518;
}

/* GALLERY */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease, border-color 0.3s ease;
    animation: fadeInUp 0.6s ease both;
}

.gallery-card:nth-child(1) { animation-delay: 0s; }
.gallery-card:nth-child(2) { animation-delay: 0.08s; }
.gallery-card:nth-child(3) { animation-delay: 0.16s; }
.gallery-card:nth-child(4) { animation-delay: 0.24s; }

.gallery-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    border-color: var(--primary-light);
}

.gallery-card .gallery-cover {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-card:hover .gallery-cover {
    transform: scale(1.06);
}

.gallery-card .gallery-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-card .gallery-info {
    padding: 16px;
}

.gallery-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.gallery-card p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ANNOUNCEMENTS */
.announcements-section {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.5s ease both;
}

.announcements-section h2 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.announcement-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.announcement-item h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.announcement-item .week-range {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

/* VISIT COUNTER BANNER */
.visit-counter {
    font-size: 0.82rem;
}

.visit-counter .counter-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.visit-counter .counter-label {
    color: var(--text-light);
}

.visit-counter .counter-value {
    font-weight: 600;
    color: var(--primary-dark);
}

/* FOOTER */
.site-footer {
    background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
    color: rgba(255,255,255,0.8);
    padding: 30px 0;
    text-align: center;
    font-size: 0.85rem;
    margin-top: auto;
}

.site-footer a {
    color: var(--primary-light);
}

/* PAGINATION */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .ellipsis {
    border: none;
    padding: 8px 4px;
    color: var(--text-light);
    letter-spacing: 2px;
}

/* FLASH MESSAGES */
.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.flash-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.info {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

/* PAGE TITLE */
.page-title {
    font-size: 1.6rem;
    color: var(--primary-dark);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
    animation: fadeInUp 0.4s ease both;
}

/* SECTION TITLE */
.section-title {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 0.4s ease both;
}

/* SIDEBAR WIDGETS ANIMATION */
.sidebar-widget {
    animation: fadeInUp 0.5s ease both;
}

.sidebar-widget:nth-child(1) { animation-delay: 0.1s; }
.sidebar-widget:nth-child(2) { animation-delay: 0.2s; }
.sidebar-widget:nth-child(3) { animation-delay: 0.3s; }
.sidebar-widget:nth-child(4) { animation-delay: 0.4s; }
.sidebar-widget:nth-child(5) { animation-delay: 0.5s; }

/* BREADCRUMB */
.breadcrumb {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

/* LIGHTBOX */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius);
}

/* ERB / COAT OF ARMS IN HEADER */
.header-content {
    position: relative;
}

.header-erb {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    max-height: 110px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    z-index: 3;
}

.header-erb.erb-left {
    left: 20px;
}

.header-erb.erb-right {
    right: 20px;
}

/* BURGER IN HEADER FOR MOBILE */
.header-burger {
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 6px 12px;
    z-index: 5;
    line-height: 1;
    backdrop-filter: blur(4px);
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.header-burger:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.7);
}

.header-burger:active {
    transform: translateY(-50%) scale(0.92);
}

/* Mobile close button — hidden on desktop */
.mobile-close {
    display: none;
}

/* Mobile drawer header - hidden on desktop */
.mobile-drawer-header {
    display: none;
}

/* CALENDAR FULL WIDTH */
.sidebar-widget .widget-content iframe {
    width: 100% !important;
    max-width: 100%;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    :root {
        --header-height: 100px;
    }

    .site-header h1 {
        font-size: 1.4rem;
        padding: 0 50px;
    }

    .site-header .subtitle {
        font-size: 1rem;
    }

    /* Show burger in header, hide nav bar burger */
    .header-burger {
        display: block;
    }

    .nav-toggle {
        display: none;
    }

    /* Full-screen overlay */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.0);
        z-index: 200;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
    }

    .main-nav.mobile-open {
        opacity: 1;
        visibility: visible;
        background: rgba(0,0,0,0.5);
    }

    /* Slide-in drawer panel */
    .main-nav .container {
        position: absolute;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 340px;
        height: 100%;
        background: linear-gradient(180deg, #fefcf5 0%, #fff 100%);
        box-shadow: -6px 0 30px rgba(0,0,0,0.2);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .main-nav.mobile-open .container {
        transform: translateX(0);
    }

    /* Drawer header with branding */
    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px;
        background: linear-gradient(135deg, var(--primary-dark, #9a7e10) 0%, var(--primary, #c8a415) 100%);
        color: #fff;
        flex-shrink: 0;
    }

    .mobile-drawer-header .drawer-title {
        font-size: 0.92rem;
        font-weight: 600;
        letter-spacing: 0.2px;
        line-height: 1.3;
    }

    .mobile-drawer-header .drawer-subtitle {
        font-size: 0.72rem;
        opacity: 0.8;
        margin-top: 2px;
    }

    /* Close button */
    .mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255,255,255,0.2);
        border: none;
        color: #fff;
        font-size: 1.4rem;
        cursor: pointer;
        line-height: 1;
        flex-shrink: 0;
        transition: background 0.2s, transform 0.2s;
    }

    .mobile-close:hover {
        background: rgba(255,255,255,0.35);
    }

    .mobile-close:active {
        transform: scale(0.9);
    }

    /* Menu list */
    .nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: static;
        padding: 8px 0;
        flex: 1;
    }

    /* Stagger animation */
    .nav-menu > li {
        opacity: 0;
        transform: translateX(30px);
    }

    .main-nav.mobile-open .nav-menu > li {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .main-nav.mobile-open .nav-menu > li:nth-child(1) { transition-delay: 0.06s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(2) { transition-delay: 0.1s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(3) { transition-delay: 0.14s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(4) { transition-delay: 0.18s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(5) { transition-delay: 0.22s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(6) { transition-delay: 0.26s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(7) { transition-delay: 0.3s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(8) { transition-delay: 0.34s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(9) { transition-delay: 0.38s; }
    .main-nav.mobile-open .nav-menu > li:nth-child(10) { transition-delay: 0.42s; }

    /* Menu item styling */
    .nav-menu > li > a {
        padding: 13px 20px 13px 22px;
        border-bottom: none;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text);
        border-left: 3px solid transparent;
        margin: 0 8px;
        border-radius: 0 8px 8px 0;
        transition: all 0.2s ease;
        position: relative;
        margin-bottom: 0;
    }

    .nav-menu > li > a:hover,
    .nav-menu > li.active > a {
        border-left-color: var(--primary);
        background: var(--primary-lighter);
        color: var(--primary-dark);
        transform: none;
    }

    .nav-menu > li.active > a {
        font-weight: 600;
        border-left-width: 3px;
    }

    /* Separator line between items */
    .nav-menu > li + li {
        border-top: 1px solid rgba(0,0,0,0.04);
    }

    /* Dropdown / submenu on mobile */
    .nav-menu .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0,0,0,0.02);
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.35s ease;
        margin: 0 8px;
    }

    .nav-menu li:hover .dropdown {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-menu .has-dropdown.submenu-open .dropdown {
        max-height: 500px;
    }

    .nav-menu .dropdown li a {
        padding: 10px 20px 10px 38px;
        font-size: 0.88rem;
        color: var(--text-light);
        border-radius: 6px;
        transition: all 0.15s ease;
    }

    .nav-menu .dropdown li a:hover {
        color: var(--primary-dark);
        background: var(--primary-lighter);
    }

    .nav-menu .dropdown li.active > a {
        color: var(--primary-dark);
        background: var(--primary-lighter);
        font-weight: 600;
    }

    /* Dropdown toggle arrow */
    .nav-menu .has-dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-menu .has-dropdown > a::after {
        content: '▾';
        font-size: 0.75rem;
        transition: transform 0.25s;
        margin-left: 8px;
    }

    .nav-menu .has-dropdown.submenu-open > a::after {
        transform: rotate(180deg);
    }

    /* Erb hide on small screens */
    .header-erb {
        max-height: 60px;
    }

    .header-erb.erb-left {
        left: 10px;
    }

    .header-erb.erb-right {
        right: 50px;
    }

    /* Layout */
    .main-content {
        flex-direction: column !important;
        padding: 12px 0;
        gap: 16px;
    }

    .sidebar {
        width: 100%;
    }

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

    .article-card .card-image-wrapper {
        height: 180px;
    }

    .article-detail {
        padding: 20px;
    }

    .article-detail h1 {
        font-size: 1.4rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .container {
        padding: 0 10px;
    }

    .announcements-section {
        padding: 20px;
    }

    .page-title {
        font-size: 1.3rem;
    }

    /* Sidebar widgets tighter */
    .sidebar-widget .widget-content {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 80px;
    }

    .site-header h1 {
        font-size: 1rem;
        padding: 0 44px;
    }

    .site-header .subtitle {
        font-size: 0.75rem;
    }

    .header-erb {
        max-height: 45px;
    }

    .article-card .card-body {
        padding: 12px;
    }

    .article-card h3 {
        font-size: 0.95rem;
    }

    .article-card .card-meta {
        flex-wrap: wrap;
        gap: 6px;
        font-size: 0.75rem;
    }

    .article-card .card-image-wrapper {
        height: 150px;
    }

    .article-detail {
        padding: 14px;
    }

    .article-detail h1 {
        font-size: 1.2rem;
    }

    .article-detail .article-meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.8rem;
    }

    .announcements-section {
        padding: 14px;
    }

    .page-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .site-footer {
        padding: 20px 0;
        font-size: 0.8rem;
    }

    .sidebar-widget .widget-title {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .sidebar-widget .widget-content {
        padding: 10px;
    }
}
