/* ==========================================================================
   OrgSite — Vilniaus Adventistų Bendruomenė
   Frontend Stylesheet
   ========================================================================== */

:root {
    --primary: #4a3728;
    --primary-light: #6b5344;
    --accent: #7fb5c5;
    --accent-dark: #5a9aad;
    --text: #3a3330;
    --text-light: #7a7270;
    --bg: #faf8f6;
    --bg-alt: #f0ece8;
    --white: #ffffff;
    --border: #e2dcd7;
    --shadow: rgba(74, 55, 40, 0.08);
    --shadow-lg: rgba(74, 55, 40, 0.14);
    --radius: 4px;
    --font-display: 'DM Serif Display', 'Georgia', serif;
    --font-body: 'Outfit', 'Segoe UI', sans-serif;
    --max-w: 1140px;
    --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- HEADER ---------- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.logo-mark {
    font-size: 1.4em;
    color: var(--accent);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 8px 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-dark);
    background: var(--bg-alt);
}

/* Language switcher — pill toggle */
.lang-switcher {
    display: flex;
    align-items: center;
    margin-left: 16px;
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-light);
    border-radius: 16px;
    transition: all var(--transition);
    cursor: pointer;
    min-width: 36px;
    text-align: center;
}

.lang-pill:hover { color: var(--text); background: rgba(255,255,255,0.6); }
.lang-pill.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 1px 4px var(--shadow);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px var(--shadow-lg);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 0; }
    .lang-switcher { margin-left: 0; margin-top: 8px; }
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #8b7262 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><rect fill="rgba(255,255,255,0.03)" width="60" height="60"/><path d="M30 0L60 30L30 60L0 30Z" fill="none" stroke="rgba(255,255,255,0.04)" stroke-width="1"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 24px;
    max-width: 720px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 28px;
    font-weight: 300;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); color: var(--white); }

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }

/* ---------- SECTIONS ---------- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 50px 0 40px;
    color: var(--white);
}
.page-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
}
.page-header p { color: rgba(255,255,255,0.8); margin-top: 8px; }

.back-link {
    display: inline-block;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    font-size: 0.88rem;
}
.back-link:hover { color: var(--white); }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--primary);
}

.section-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent-dark);
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-light);
    font-size: 1.05rem;
}

/* ---------- POST CARDS ---------- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.post-card {
    background: var(--white);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow var(--transition), transform var(--transition);
}
.post-card:hover {
    box-shadow: 0 8px 28px var(--shadow);
    transform: translateY(-2px);
}

.post-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body {
    padding: 20px 24px 24px;
}

.post-date {
    font-size: 0.78rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.post-card-body h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 8px 0 10px;
    line-height: 1.35;
}
.post-card-body h3 a { color: var(--primary); }
.post-card-body h3 a:hover { color: var(--accent-dark); }

.post-card-body p {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-author {
    display: block;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-dark);
}

/* ---------- PLAYLIST CARDS ---------- */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.playlist-grid-full { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.playlist-card {
    display: block;
    background: var(--white);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow var(--transition), transform var(--transition);
}
.playlist-card:hover {
    box-shadow: 0 6px 20px var(--shadow);
    transform: translateY(-2px);
}
.playlist-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.playlist-placeholder {
    aspect-ratio: 16/9;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent);
}
.playlist-info {
    padding: 16px 20px;
}
.playlist-info h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 4px;
}
.playlist-info p { font-size: 0.88rem; color: var(--text-light); }
.video-count { font-size: 0.8rem; color: var(--text-light); }

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

.album-card {
    display: block;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--bg-alt);
}
.album-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.album-card:hover img { transform: scale(1.06); }

.album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--border);
}

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: var(--white);
}
.album-overlay h3 { font-family: var(--font-display); font-size: 1.1rem; }
.album-overlay span { font-size: 0.82rem; opacity: 0.8; }

/* Photo grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.photo-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.photo-item:hover img { transform: scale(1.05); }
.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.8rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}
.lb-close, .lb-prev, .lb-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 12px;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 16px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);
    font-size: 0.92rem;
    text-align: center;
}

/* ---------- VIDEO LIST ---------- */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.video-item h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-top: 12px;
    color: var(--primary);
}
.video-featured .video-embed {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
}
.video-embed iframe { border-radius: 6px; }

/* ---------- CONTACTS ---------- */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.contact-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 28px 24px;
    text-align: center;
    transition: box-shadow var(--transition);
}
.contact-card:hover { box-shadow: 0 4px 16px var(--shadow); }

.contact-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
}

.contact-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-family: var(--font-display);
    margin: 0 auto 16px;
}

.contact-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.contact-title { color: var(--accent-dark); font-size: 0.9rem; font-weight: 500; }
.contact-dept { color: var(--text-light); font-size: 0.82rem; margin-top: 2px; }

.contact-details {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.contact-details a, .contact-details p {
    font-size: 0.88rem;
    color: var(--text-light);
}
.contact-details a:hover { color: var(--accent-dark); }

/* Contact form */
.contact-form-wrap {
    max-width: 680px;
    margin: 0 auto;
}
.contact-form-wrap h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-form .form-group {
    margin-bottom: 16px;
}
.contact-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    transition: border-color var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(127,181,197,0.15);
}

@media (max-width: 600px) {
    .contact-form .form-row { grid-template-columns: 1fr; }
}

/* ---------- ARTICLE PAGE ---------- */
.article-hero {
    max-height: 400px;
    overflow: hidden;
}
.article-hero img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}
.article-container { max-width: 760px; }
.article-header {
    padding: 40px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}
.article-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    line-height: 1.3;
}
.article-meta {
    margin-top: 10px;
    font-size: 0.88rem;
    color: var(--text-light);
}
.article-body.prose {
    font-size: 1.02rem;
    line-height: 1.8;
}
.article-footer {
    padding: 32px 0 48px;
}

/* ---------- PAGINATION ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}
.page-info { font-size: 0.9rem; color: var(--text-light); }

/* ---------- FLASH ---------- */
.flash {
    padding: 14px 0;
    font-size: 0.92rem;
    font-weight: 500;
}
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }

/* ---------- FOOTER ---------- */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.75);
    padding: 48px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 36px;
}

.footer-brand .logo-mark { font-size: 1.6rem; }
.footer-brand .logo-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--white);
}
.footer-tagline {
    margin-top: 10px;
    font-size: 0.88rem;
    opacity: 0.7;
}

.footer-links h4, .footer-contact h4 {
    color: var(--white);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}
.footer-links a {
    display: block;
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
    padding: 3px 0;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-contact p { font-size: 0.88rem; margin-bottom: 6px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 16px 0;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero { min-height: 340px; }
    .hero-content { padding: 36px 20px; }
    .post-grid { grid-template-columns: 1fr; }
}
