/* --- CUSTOM LOCAL FONTS --- */
@font-face { font-family: 'AndreiLogo'; src: url('/assets/andrei.woff2') format('woff2'); font-weight: normal; font-style: normal; }
@font-face { font-family: 'Agrandir'; src: url('/assets/agrandir.woff2') format('woff2'); font-weight: normal; font-style: normal; }
@font-face { font-family: 'Morisawa'; src: url('/assets/morisawa.woff2') format('woff2'); font-weight: normal; font-style: normal; }

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Helvetica', Arial, sans-serif; background-color: #ffffff; color: #000000; padding: 60px 80px; font-size: 15px; text-align: left; }
.socials { text-decoration: none; padding-bottom: 6px; margin-right: 20px; color: #004aad; border-bottom: 2px dotted #004aad;  }
.socials:hover { color: gray; border-bottom: 2px dotted gray; }

/* --- LOGO --- */
.logo { font-family: 'AndreiLogo', sans-serif; color: #004aad; font-size: 5.5rem; text-transform: uppercase; margin-bottom: 20px; line-height: 1; cursor: pointer;}

/* --- NAVIGATION --- */
.nav-menu { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 60px; }
.nav-btn { background-color: #e2ff70; border: none; border-radius: 40px; padding: 14px 32px; font-family: 'Agrandir', sans-serif; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; cursor: pointer; color: #000; transition: opacity 0.2s; }
.nav-btn:hover { opacity: 0.8; }

/* --- FORMS --- */
.form-group { width: 100%; margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-size: 1rem; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 10px; font-size: 1rem; font-family: inherit;}
.submit-btn { background-color: #050a1f; color: white; border: none; padding: 15px; width: 100%; border-radius: 30px; font-size: 1.2rem; cursor: pointer; transition: opacity 0.2s; }
.submit-btn:hover { opacity: 0.9; }

/* --- DYNAMIC SECTION TYPOGRAPHY --- */
.section-title { font-family: 'Morisawa', serif; color: #004aad; font-size: 18px; font-weight: normal; margin-bottom: 25px; text-transform: none; }
.dynamic-list { list-style: none; font-size: 15px; line-height: 1.8; text-transform: uppercase; }
.dynamic-list li { display: flex; gap: 5px; }
.dynamic-value { text-transform: none; }

/* --- PUBLIC GALLERY PAGE STYLES --- */
#gallery { text-align: left; }
.gallery-root { display: none; }
.gallery-root.active { display: block; }

.gallery-folders-grid { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.folder { text-align: center; cursor: pointer; position: relative; max-width: 120px; }
.folder-icon { width: 100px; height: 80px; background-color: #63baf2; border-radius: 10px 10px 5px 5px; position: relative; margin-bottom: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.folder-icon::before { content: ''; position: absolute; top: -10px; left: 0; width: 40px; height: 15px; background-color: #4a9ad6; border-radius: 5px 5px 0 0; }
.folder-name { font-family: 'Lekton', monospace; font-size: 12px; line-height: 1.4; color: #333; display: block; word-wrap: break-word; }
.folder-preview {
    display: none; position: absolute; top: 110%; left: 50%; transform: translateX(-50%);
    width: 150px; background: #fff; border: 1px solid #ccc; padding: 5px; border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 10;
}
.folder-preview img { width: 100%; border-radius: 3px; }
.folder:hover .folder-preview { display: block; }
.folder-view { display: none; margin-top: 40px; }
.folder-view.active { display: block; }

/* Updated Breadcrumbs to Lekton */
.breadcrumbs { font-family: 'Lekton', monospace; font-size: 15px; margin-bottom: 30px; color: #666; text-transform: none; }
.breadcrumb-link { color: #004aad; cursor: pointer; text-decoration: underline; }

.masonry-grid { columns: 3; column-gap: 15px; }
.masonry-grid img { width: 100%; margin-bottom: 15px; display: block; border-radius: 5px; cursor: pointer; transition: transform 0.2s; }
.masonry-grid img:hover { transform: scale(1.02); }
@media (max-width: 800px) { .masonry-grid { columns: 2; } }
@media (max-width: 500px) { .masonry-grid { columns: 1; } }

/* --- LIGHTBOX STYLES --- */
.lightbox-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(30, 30, 30, 0.95); z-index: 1000; justify-content: center; align-items: center; cursor: pointer; }
.lightbox-overlay.active { display: flex; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; text-align: center; }
.lightbox-img { max-width: 100%; max-height: 80vh; border-radius: 5px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.lightbox-meta { position: absolute; top: -50px; left: 0; width: 100%; text-align: center; color: #999; font-family: 'Helvetica', sans-serif; font-size: 15px; }
.lightbox-meta-text { text-decoration: underline; }
.lightbox-nav { position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; transform: translateY(-50%); font-size: 30px; color: #fff; opacity: 0.5; padding: 0 20px; z-index: 10; }
.lightbox-nav span { cursor: pointer; transition: opacity 0.2s; }
.lightbox-nav span:hover { opacity: 1; }
.lightbox-nav .left-arr { margin-left: -50px; }
.lightbox-nav .right-arr { margin-right: -50px; }

/* --- POSTS PAGE STYLES --- */
#posts { text-align: left; }
.posts-container { max-width: 700px; width: 100%; }
.post-block { padding-bottom: 20px; border-bottom: 1px dotted #ccc; margin-bottom: 60px; }
.post-block:last-child { border-bottom: none; }
.post-date { margin-bottom: 20px; }

/* POST TITLE UPDATED: 23px, normal weight, expanded margin bottom */
.post-title-large { 
    font-family: 'Helvetica', sans-serif; 
    font-size: 23px; 
    font-weight: normal; 
    margin-bottom: 35px; 
}

.post-body-text { font-size: 15px; line-height: 1.6; margin-bottom: 15px; }

/* Comments */
.comments-info { display: block; text-align: right; font-family: 'Helvetica', sans-serif; font-style: italic; color: #999; font-size: 15px; cursor: pointer; transition: color 0.2s; }
.comments-info:hover { color: #004aad; } 
.comments-area { display: none; margin-top: 15px; padding: 15px; background: #ffffff; max-width: 600px; }

/* COMMENTS TITLE UPDATED: more space bottom */
.comments-area h4 { 
    margin-bottom: 30px; 
    font-size: 18px; 
    color: #004aad; 
    font-family: 'Morisawa', serif; 
    font-weight: normal; 
}

/* NEW: "Leave a comment" header style */
.leave-comment-title {
    font-family: 'Morisawa', serif;
    font-size: 16px;
    color: #004aad;
    font-weight: normal;
    margin-bottom: 15px;
}

/* COMMENT LIST ITEMS UPDATED TO 15px */
.comments-list { list-style: none; font-size: 15px; color: #555; margin-bottom: 15px; }
.comments-list li { margin-bottom: 20px; border: none; padding-bottom: 0; }
.comment-meta { display: flex; align-items: baseline; margin-bottom: 5px; }
.comment-author { font-family: 'Lekton', monospace; font-weight: bold; font-size: 15px; color: #000; }
.comment-date { font-size: 15px; color: #999; margin-left: 10px; font-weight: normal; }
.comment-body-p { font-size: 15px; line-height: 1.6; color: #333; }
.comment-reply { text-align: right; display: block; font-size: 12px; color: #999; font-style: italic; cursor: pointer; transition: color 0.2s; margin-top: 8px; }
.comment-reply:hover { color: #004aad; }
.comment-form { margin-top: 25px; border-top: 1px solid #eee; padding-top: 15px; }

/* --- FULL PAGE LOGIN --- */
#login { background-color: #ffffff; justify-content: center; align-items: center; text-align: center; display: none; }
#login.active { display: flex; flex-direction: column; min-height: calc(100vh - 120px); }
.login-box { width: 100%; max-width: 400px; margin: 0 auto; }
#login .logo { cursor: default; }

#admin { background-color: #ffffff; color: #333; align-items: center; }
.admin-wrapper { width: 100%; max-width: 600px; margin: 0 auto; }
.admin-tabs { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; justify-content: center; }
.admin-tab-btn { background-color: #f0f0f0; border: none; border-radius: 40px; padding: 10px 25px; font-family: 'Agrandir', sans-serif; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; transition: all 0.2s; }
.admin-tab-btn.active { background-color: #004aad; color: #ffffff; }
.admin-panel { display: none; background: #fcfcfc; padding: 30px; border: 1px solid #eee; border-radius: 20px; width: 100%; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.admin-panel.active { display: block; }
.admin-panel h3 { border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; font-family: 'Morisawa', serif; color: #004aad; font-size: 18px; }
.admin-message { padding: 15px; border: 1px solid #eee; background: #fff; border-radius: 10px; margin-bottom: 15px; }

.admin-message-name { font-family: 'Helvetica', sans-serif; font-size: 15px; font-weight: bold; margin-bottom: 5px; color: #004aad; }
.admin-message-text { font-family: 'Helvetica', sans-serif; font-size: 15px; line-height: 1.6; color: #333; }

/* Admin Gallery Sub-views */
.db-gallery-view { display: none; margin-top: 15px; }
.db-gallery-view.active { display: block; }

.db-gallery-folders-list { list-style: none; margin-top: 20px; }
.db-folder-item { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 15px; border: 1px solid #eee; border-radius: 10px; margin-bottom: 10px; }
.db-folder-title { font-family: 'Morisawa', serif; font-size: 14px; color: #004aad; text-decoration: underline; cursor: pointer; }
.db-action-btn { background: #eee; color: #333; border: 1px solid #ccc; border-radius: 20px; padding: 5px 12px; font-size: 11px; font-family: 'Agrandir', sans-serif; text-transform: uppercase; cursor: pointer; }
.db-delete-btn { background: #fee; color: #c33; border-color: #faa; }

.db-inside-folder-header { font-family: 'Morisawa', serif; font-size: 14px; margin-bottom: 25px; color: #666; }
.db-add-photo-block { background: #fdfdfd; padding: 20px; border-radius: 10px; border: 1px solid #eee; margin-bottom: 25px; }
.db-photo-list { list-style: none; margin-top: 15px; }
.db-photo-block { display: flex; gap: 15px; align-items: start; background: #fff; padding: 15px; border: 1px solid #eee; border-radius: 10px; margin-bottom: 10px; }
.db-photo-block img { width: 80px; height: 80px; object-fit: cover; border-radius: 5px; }
.db-photo-inputs { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.db-photo-inputs input, .db-photo-inputs textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 5px; font-size: 13px; font-family: inherit; }

/* Page logic hiding */
.page { display: none; min-height: calc(100vh - 120px); flex-direction: column; }
.page.active { display: flex; }