/* =========================================================
   FRONTEND CSS
========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0b0f1e;
    --bg-alt: #101528;
    --card: #151b32;
    --card-2: #1e2440;
    --border: #2a3154;
    --text: #e6e9f2;
    --text-2: #cbd5e1;
    --muted: #8b91a8;
    --primary: #6366f1;
    --primary-h: #4f46e5;
    --accent: #8b5cf6;
    --success: #10b981;
    --radius: 14px;
    --container: 1200px;
    --shadow: 0 20px 60px rgba(0,0,0,.35);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
.container-narrow { max-width: 800px; }

/* =========================================================
   HEADER
========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11,15,30,.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: .3s;
}
.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

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

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}
.brand-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.brand-logo { max-height: 40px; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    padding: 8px 16px;
    border-radius: 10px;
    color: var(--text-2);
    font-weight: 500;
    font-size: 15px;
}
.nav-link:hover { background: var(--card); color: var(--text); }
.nav-link.active {
    background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(139,92,246,.15));
    color: #c7d2fe;
}

.mobile-menu-btn {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
}

/* =========================================================
   MAIN
========================================================= */
.site-main { min-height: 60vh; }

/* Hero */
.hero {
    padding: 100px 0 80px;
    background: radial-gradient(1200px 600px at 50% -20%, rgba(99,102,241,.25), transparent 60%);
    text-align: center;
}
.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -.02em;
}
.grad-text {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    font-size: 20px;
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 40px;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.section-title { font-size: 32px; font-weight: 700; letter-spacing: -.01em; }
.section-sub   { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 8px 24px rgba(99,102,241,.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99,102,241,.5);
    color: #fff;
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--card); color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* Gallery grid (home) */
.home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.home-gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 14px;
    background: var(--card);
    display: block;
}
.home-gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: .4s;
}
.home-gallery-item:hover img { transform: scale(1.08); }
.home-gallery-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 30px 14px 12px;
    background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

/* Public gallery */
.public-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.public-gallery-item {
    border-radius: 14px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: .25s;
}
.public-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.public-gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}
.public-gallery-item figcaption {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.public-gallery-item figcaption strong { font-size: 14px; }
.public-gallery-item figcaption span  { font-size: 12px; color: var(--muted); }

/* Pages grid */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.page-card {
    display: block;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    transition: .25s;
}
.page-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
    color: var(--text);
}
.page-card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.page-card-desc  { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.page-card-link  { color: var(--primary); font-weight: 600; font-size: 14px; }

/* Page content */
.page-content { padding: 60px 0; }
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 40px; font-weight: 800; margin-bottom: 8px; line-height: 1.2; }
.page-meta { color: var(--muted); font-size: 14px; }

.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

.prose {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-2);
}
.prose h2 { font-size: 26px; margin: 32px 0 12px; color: var(--text); }
.prose h3 { font-size: 20px; margin: 24px 0 10px; color: var(--text); }
.prose p  { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 16px 0 16px 24px; }
.prose li { margin-bottom: 6px; }
.prose a  { color: var(--primary); text-decoration: underline; }
.prose img { border-radius: 12px; margin: 16px 0; }
.prose blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--muted);
}
.prose code {
    background: var(--card);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
    color: #a5b4fc;
}
.prose pre {
    background: var(--card);
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 16px 0;
}
.prose pre code { background: none; padding: 0; }

/* Contact form */
.contact-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-top: 20px;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: .15s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
.form-group textarea { resize: vertical; min-height: 140px; }

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 15px;
}
.alert ul { padding-left: 20px; }
.alert-success {
    background: rgba(16,185,129,.12);
    border: 1px solid rgba(16,185,129,.35);
    color: #a7f3d0;
}
.alert-danger {
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(239,68,68,.35);
    color: #fecaca;
}

/* Empty state */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 72px; opacity: .3; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 600;
    transition: .15s;
}
.page-btn:hover { background: var(--card-2); color: var(--text); }
.page-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-color: transparent;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.95);
    z-index: 9999;
    padding: 20px;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 25px 80px rgba(0,0,0,.8);
}
.lightbox-close {
    position: absolute;
    top: 20px; right: 20px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
    margin-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h3 { font-size: 20px; margin-bottom: 12px; }
.footer-col h4 { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 14px; }
.footer-col p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.footer-col a {
    display: block;
    color: var(--text-2);
    font-size: 14px;
    padding: 4px 0;
}
.footer-col a:hover { color: var(--primary); }

.social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.social-links a {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
}
.social-links a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px;
        gap: 4px;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s;
    }
    .site-nav.open {
        display: flex;
        max-height: 500px;
    }
    .mobile-menu-btn { display: block; }
    .nav-link {
        display: block;
        padding: 12px 16px;
        border-radius: 10px;
    }

    .site-nav.open { display: flex; }
    .mobile-menu-btn { display: block; }

    .page-header h1 { font-size: 30px; }
    .public-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .home-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}


.nav-item-wrap {
    position: relative;
}
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: var(--shadow);
    z-index: 100;
    margin-top: 8px;
}
.nav-item-wrap.has-children:hover .nav-dropdown { display: block; }
.nav-dropdown a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 14px;
}
.nav-dropdown a:hover {
    background: var(--card-2);
    color: var(--text);
}

@media (max-width: 900px) {
    .nav-dropdown {
        position: static;
        margin: 4px 0 4px 12px;
        box-shadow: none;
        display: block;
        border: none;
        background: transparent;
        border-left: 2px solid var(--border);
        border-radius: 0;
        padding-left: 8px;
    }
}