:root {
    /* Palette */
    --brown: #F7E8D8;
    --yellow: #FFF9E5;
    --green: #F3FFE7;
    --blue: #E8F0FE;
    --grey: #F5F3F6;

    --primary: #2B6B5F;
    --primary-hover: #1F5248;
    --danger: #C14444;
    --danger-hover: #A13333;
    --success: #4A8A3A;
    --bg: var(--yellow);
    --surface: #FFFFFF;
    --surface-alt: var(--grey);
    --text: #2C2C2C;
    --text-muted: #6B6B6B;
    --border: #D8D0C8;
    --radius: 14px;
    --shadow-soft: 0 8px 30px rgba(44, 44, 44, 0.06);

    --site-font-family: 'Lora', Georgia, 'Times New Roman', serif;
    --content-font-size: 1.06rem;
    --content-line-height: 1.95;
    --content-font-family: var(--site-font-family);
}

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

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

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

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

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

body {
    font-family: var(--site-font-family);
    background:
        radial-gradient(circle at 15% 0%, var(--brown) 0%, transparent 28%),
        radial-gradient(circle at 90% 20%, var(--blue) 0%, transparent 30%),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container,
.admin-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
}

.ql-editor .ql-font-lora,
.blog-content .ql-font-lora {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
}

.ql-editor .ql-font-georgia,
.blog-content .ql-font-georgia {
    font-family: Georgia, 'Times New Roman', serif;
}

.ql-editor .ql-font-arial,
.blog-content .ql-font-arial {
    font-family: Arial, Helvetica, sans-serif;
}

.ql-editor .ql-font-verdana,
.blog-content .ql-font-verdana {
    font-family: Verdana, Geneva, sans-serif;
}

.ql-editor .ql-font-times,
.blog-content .ql-font-times {
    font-family: 'Times New Roman', Times, serif;
}

.ql-editor .ql-font-monospace,
.blog-content .ql-font-monospace {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.ql-editor .ql-size-small {
    font-size: 0.75em;
}

.ql-editor .ql-size-large {
    font-size: 1.5em;
}

.ql-editor .ql-size-huge {
    font-size: 2em;
}

/* Navbar */
.navbar {
    background: color-mix(in srgb, var(--surface) 92%, white 8%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.nav-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.2px;
    color: var(--text);
}

.nav-logo {
    height: 34px;
    width: auto;
    display: block;
}

/* ===== Navbar Theme: Su (water) — kaplumbağa yüzüyor ===== */
.navbar-theme-water {
    background: color-mix(in srgb, var(--blue) 58%, var(--surface) 42%);
    overflow: hidden;
}

/* Animated water wave at the bottom of the navbar */
.navbar-theme-water::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 14px;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 7 Q15 0 30 7 T60 7 T90 7 T120 7 V14 H0 Z' fill='%232B6B5F' fill-opacity='0.14'/%3E%3C/svg%3E") repeat-x;
    background-size: 120px 14px;
    animation: wave-drift 8s linear infinite;
}

@keyframes wave-drift {
    from { background-position: 0 0; }
    to   { background-position: 120px 0; }
}

/* Rising bubbles near the turtle logo */
.navbar-theme-water .nav-brand::before,
.navbar-theme-water .nav-brand::after {
    content: "";
    position: absolute;
    bottom: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(43, 107, 95, 0.25));
    opacity: 0;
    pointer-events: none;
    animation: bubble-rise 5s ease-in infinite;
}

.navbar-theme-water .nav-brand::before {
    left: 20px;
}

.navbar-theme-water .nav-brand::after {
    left: 34px;
    width: 4px;
    height: 4px;
    animation-delay: 2.4s;
    animation-duration: 6.2s;
}

@keyframes bubble-rise {
    0%   { opacity: 0; transform: translateY(0) scale(0.5); }
    12%  { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-28px) scale(1.2); }
}

/* Turtle swims */
.navbar-theme-water .nav-logo {
    animation: turtle-swim 5.5s ease-in-out infinite;
    transform-origin: 50% 80%;
}

@keyframes turtle-swim {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    25%      { transform: translateY(-3px) rotate(1.5deg); }
    50%      { transform: translateY(0) rotate(0deg); }
    75%      { transform: translateY(2px) rotate(-1.5deg); }
}

/* ===== Navbar Theme: Kum (sand) — kaplumbağa yürüyor ===== */
.navbar-theme-sand {
    background: color-mix(in srgb, var(--brown) 62%, var(--surface) 38%);
    overflow: hidden;
}

/* Gentle drifting sand dune at the bottom */
.navbar-theme-sand::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 14px;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 7 Q15 0 30 7 T60 7 T90 7 T120 7 V14 H0 Z' fill='%23C9A87C' fill-opacity='0.35'/%3E%3C/svg%3E") repeat-x;
    background-size: 120px 14px;
    animation: dune-drift 10s linear infinite;
}

@keyframes dune-drift {
    from { background-position: 0 0; }
    to   { background-position: 120px 0; }
}

/* Tiny drifting sand particles near the turtle */
.navbar-theme-sand .nav-brand::before,
.navbar-theme-sand .nav-brand::after {
    content: "";
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(201, 168, 124, 0.9);
    opacity: 0;
    pointer-events: none;
    animation: sand-particle 3.5s ease-in infinite;
}

.navbar-theme-sand .nav-brand::before {
    left: 22px;
}

.navbar-theme-sand .nav-brand::after {
    left: 36px;
    width: 3px;
    height: 3px;
    animation-delay: 1.6s;
}

@keyframes sand-particle {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.6); }
    15%  { opacity: 0.8; }
    100% { opacity: 0; transform: translate(9px, -24px) scale(1.15); }
}

/* Turtle waddles */
.navbar-theme-sand .nav-logo {
    animation: turtle-walk 3.2s ease-in-out infinite;
    transform-origin: 50% 80%;
}

@keyframes turtle-walk {
    0%, 100% { transform: translateX(0) translateY(0) rotate(-3deg); }
    25%      { transform: translateX(2px) translateY(-1px) rotate(2deg); }
    50%      { transform: translateX(0) translateY(1px) rotate(0deg); }
    75%      { transform: translateX(-2px) translateY(0) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
    .navbar-theme-water::after,
    .navbar-theme-water .nav-brand::before,
    .navbar-theme-water .nav-brand::after,
    .navbar-theme-water .nav-logo,
    .navbar-theme-sand::after,
    .navbar-theme-sand .nav-brand::before,
    .navbar-theme-sand .nav-brand::after,
    .navbar-theme-sand .nav-logo {
        animation: none;
    }
}

.nav-links {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.4rem 0;
    border-radius: 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    position: relative;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link i {
    font-size: 1rem;
    line-height: 1;
}

.nav-link:hover {
    background: transparent;
    color: var(--text);
    text-decoration: none;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 100%;
    height: 2px;
    background: transparent;
    transition: background 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    background: var(--primary);
}

.nav-link.active {
    background: transparent;
    color: var(--text);
}

.nav-admin {
    margin-left: 1rem;
    border: 1px solid var(--border);
}

/* Layout */
.layout {
    min-height: 100vh;
}

.main-content {
    min-height: calc(100vh - 140px);
    padding-bottom: 60px;
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 94%, white 6%);
    backdrop-filter: blur(8px);
}

.site-footer .container {
    padding-top: 0.6rem;
    padding-bottom: 0.8rem;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-developer {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0.85;
}

.footer-developer:hover {
    color: var(--primary);
    text-decoration: underline;
    opacity: 1;
}

.hero,
.archive-hero,
.about-hero {
    background: linear-gradient(125deg, var(--brown) 0%, var(--yellow) 100%);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    padding: clamp(1.2rem, 3.2vw, 2.4rem);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.6rem;
    animation: fade-slide 0.55s ease both;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    color: var(--primary);
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.hero h1,
.archive-hero h1,
.about-hero h1,
.blog-detail-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.hero-lead,
.archive-hero p,
.about-hero p {
    color: var(--text-muted);
    max-width: 72ch;
}

.hero-cta-row {
    display: flex;
    gap: 0.65rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.3rem;
}

.insight-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 1px);
    padding: 0.9rem;
    box-shadow: var(--shadow-soft);
}

.insight-card h3 {
    font-size: 1.04rem;
    margin-bottom: 0.3rem;
}

.insight-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.section-title-row {
    margin: 2rem 0 0.9rem;
}

.section-title-row h2 {
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.blog-list-view {
    display: grid;
    gap: 1rem;
}

.blog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin: 1.25rem 0 1rem;
    flex-wrap: wrap;
}

.blog-toolbar-left,
.blog-toolbar-right {
    display: flex;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-filter-row,
.blog-search-row,
.blog-sort-row {
    width: min(100%, 320px);
    margin: 0;
}

.blog-search-row {
    min-width: min(100%, 280px);
}

.blog-sort-row {
    width: min(100%, 180px);
}

.blog-view-toggle {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

.blog-view-btn {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-view-btn.is-active {
    background: var(--primary);
    color: #fff;
}

.featured-post-archive {
    display: grid;
    grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
    gap: 0;
    background: linear-gradient(135deg, rgba(89, 119, 146, 0.12), rgba(196, 180, 120, 0.12));
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.4rem;
}

.featured-post-image {
    min-height: 240px;
    background-size: cover;
    background-position: center;
}

.featured-post-image-placeholder {
    background: linear-gradient(135deg, rgba(89, 119, 146, 0.7), rgba(38, 53, 68, 0.82));
}

.featured-post-content {
    padding: 1.3rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post-content h2 {
    margin: 0.7rem 0 0.5rem;
    font-size: clamp(1.4rem, 2vw, 2rem);
    line-height: 1.2;
}

.featured-post-content h2 a {
    color: var(--text);
    text-decoration: none;
}

.featured-post-content time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.featured-post-content p {
    margin: 0.8rem 0 0.9rem;
    color: var(--text-muted);
}

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    animation: fade-slide 0.5s ease both;
}

.blog-card-list {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
}

.blog-card-list .blog-card-cover-link {
    min-height: 100%;
}

.blog-card-list .blog-card-cover {
    min-height: 100%;
    height: 100%;
}

.blog-card-list .blog-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-card-cover-link {
    display: block;
    text-decoration: none;
}

.blog-card-cover {
    position: relative;
    min-height: 220px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    overflow: hidden;
}

.blog-card-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 17, 18, 0.12), rgba(16, 17, 18, 0.8));
}

.blog-card-cover-placeholder {
    background: linear-gradient(135deg, rgba(89, 119, 146, 0.7), rgba(38, 53, 68, 0.82));
}

.blog-card-cover-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.blog-card-cover-content h3 {
    margin: 0.5rem 0 0;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1.3;
}

.blog-card-body {
    padding: 1.2rem;
}

.blog-card-top {
    margin-bottom: 0.45rem;
}

.blog-card time {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.blog-card p {
    color: color-mix(in srgb, var(--text) 86%, var(--text-muted) 14%);
    font-size: 0.97rem;
}

.read-more {
    margin-top: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.featured-post {
    background: linear-gradient(135deg, var(--green) 0%, var(--yellow) 100%);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    padding: 1.2rem;
}

.featured-post h2 a:hover {
    color: var(--primary);
    text-decoration: none;
}

.featured-post-meta {
    margin-top: 0.7rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Blog Detail */
.blog-detail {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    padding: clamp(1rem, 3vw, 2rem);
    box-shadow: var(--shadow-soft);
}

.blog-detail-header {
    margin-bottom: 1.3rem;
}

.blog-cover-image {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: calc(var(--radius) + 2px);
    margin-bottom: 1.5rem;
    box-shadow: 0 18px 32px rgba(14, 19, 24, 0.12);
}

.post-meta-tags {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    margin: 0.35rem 0 0.7rem;
    flex-wrap: wrap;
}

.blog-detail-header time {
    color: var(--text-muted);
}

.blog-content {
    line-height: var(--content-line-height);
    font-size: var(--content-font-size);
    font-family: var(--content-font-family);
}

.blog-content p,
.blog-content ul,
.blog-content ol {
    margin-bottom: 0.95rem;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 2px);
    box-shadow: 0 10px 24px rgba(25, 18, 10, 0.12);
}

.blog-content-splitted {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Splitted sections: no frame (border) and no background, only inner spacing */
.blog-content-splitted .blog-content {
    padding: 1rem;
}

/* Splitted layout stays side-by-side on desktop and most tablets;
   only stacks on narrow phone widths */
@media (max-width: 560px) {
    .blog-content-splitted {
        grid-template-columns: 1fr;
    }
}

.blog-detail-footer {
    margin-top: 1.6rem;
}

/* Media Archives */
.media-grid {
    display: grid;
    gap: 1rem;
}

.archive-filter-row {
    margin: 0 0 1rem;
    max-width: 320px;
}

.archive-filter-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.media-grid-images {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.media-grid-videos {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Album grouping */
.album-group {
    margin-bottom: 2.5rem;
}

.album-group-header {
    margin-bottom: 1rem;
}

.album-group-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.album-group-header h2 {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    margin-bottom: 0.25rem;
}

.album-group-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.album-group-header .share-bar {
    margin: 0;
    padding: 0.4rem 0.5rem;
    background: var(--surface);
    border-color: var(--border);
    border-radius: 10px;
}

.album-group-header .share-btn {
    width: 34px;
    height: 34px;
}

.video-card,
.image-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 1px);
    padding: 0.9rem;
    box-shadow: var(--shadow-soft);
    animation: fade-slide 0.5s ease both;
}

.video-card footer,
.image-card figcaption {
    margin-top: 0.55rem;
}

.image-card-description {
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.video-card time,
.image-card time {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.image-card img {
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-card img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Image Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(7, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    outline: none;
    animation: lightbox-fade 0.2s ease;
}

.lightbox-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(1100px, 100%);
    max-height: 92vh;
}

.lightbox-close {
    position: absolute;
    top: -46px;
    right: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.85rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
}

.lightbox-close:hover {
    color: #ffd9b0;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 76vh;
    border-radius: var(--radius);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    animation: lightbox-zoom 0.25s ease both;
}

.lightbox-caption {
    margin-top: 1rem;
    max-width: min(720px, 100%);
    text-align: center;
    color: #fff;
}

.lightbox-caption time {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.lightbox-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    font-size: 0.82rem;
    margin-right: 0.6rem;
}

.lightbox-description {
    margin-top: 0.6rem;
    font-size: 1.02rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.lightbox-share {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.lightbox-share .share-bar {
    margin: 0;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.lightbox-share .share-label {
    color: rgba(255, 255, 255, 0.75);
}

.lightbox-share .share-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.24);
}

.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }

@keyframes lightbox-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lightbox-zoom {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* YouTube Embed */
.yt-embed {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.yt-embed-inner {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: calc(var(--radius) - 2px);
}

.yt-embed-inner iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-launch-button {
    position: relative;
    width: 100%;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    overflow: hidden;
}

.video-launch-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-launch-icon {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.55rem;
    line-height: 1;
}

.video-launch-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.7rem 0.8rem;
    color: #fff;
    font-size: 0.88rem;
    line-height: 1.35;
    text-align: left;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(3, 5, 8, 0.88) 100%);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(7, 10, 15, 0.84);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-modal-dialog {
    position: relative;
    width: min(1200px, 100%);
}

.video-modal-close {
    position: absolute;
    top: -42px;
    right: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.85rem;
    cursor: pointer;
}

.video-modal-frame-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-modal-frame-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.thumb-embed {
    max-width: 300px;
}

.empty-state,
.empty-state-card {
    background: var(--surface);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    border-radius: var(--radius);
    padding: 1.1rem;
}

.empty-state-card h1 {
    margin-bottom: 0.45rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.about-card {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}

.about-card h2 {
    font-size: 1.18rem;
    margin-bottom: 0.55rem;
}

.about-card ul {
    margin-left: 1.15rem;
}

.about-card li {
    margin-bottom: 0.35rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.form-control {
    width: 100%;
    padding: 0.58rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--surface);
    font-family: inherit;
}

.form-control:focus {
    outline: 2px solid var(--primary);
    outline-offset: -1px;
    border-color: var(--primary);
}

.captcha-box {
    margin: 1.25rem 0 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-alt);
}

.captcha-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.captcha-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.captcha-question {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 700;
    color: var(--primary);
}

.captcha-refresh {
    background: var(--surface);
    border-color: var(--border);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal !important;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.52rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
}

.btn:hover {
    background: color-mix(in srgb, var(--surface-alt) 76%, white 24%);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.category-select-row {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
}

.category-select-row .form-control,
.category-select-row select {
    flex: 1 1 auto;
    min-width: 0;
}

.category-select-row .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: var(--green);
    color: #2D5A1E;
    border: 1px solid #D4E8C4;
}

.alert-error {
    background: #FEF0F0;
    color: #991B1B;
    border: 1px solid #FCD5D5;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: #1e293b;
    color: white;
    padding: 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #334155;
}

.sidebar-brand {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-nav {
    padding: 0.5rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.625rem 1rem;
    color: #94a3b8;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: #334155;
    color: white;
    text-decoration: none;
}

.sidebar-link.active {
    background: var(--primary);
    color: white;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid #334155;
    margin: 0.5rem 0;
}

.sidebar-logout {
    color: #f87171;
}

.sidebar-logout:hover {
    background: #991b1b;
    color: white;
}

.admin-main {
    flex: 1;
}

/* Navbar Theme Selector (admin) */
.theme-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    flex: 1 1 180px;
    max-width: 240px;
}

.theme-option:has(input:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent);
}

.theme-option input {
    accent-color: var(--primary);
}

.theme-label {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.theme-label small {
    color: var(--text-muted);
}

.theme-swatch {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.theme-swatch-none {
    background: color-mix(in srgb, var(--surface) 92%, white 8%);
    border: 1px solid var(--border);
}

.theme-swatch-water {
    background: linear-gradient(180deg, #E8F0FE, #BFD9F5);
}

.theme-swatch-sand {
    background: linear-gradient(180deg, #F7E8D8, #E3C8A0);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary);
}

.stat-card p {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
}

.thumb {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: var(--green);
    color: #2D5A1E;
}

.badge-draft {
    background: var(--grey);
    color: #6B6B6B;
}

.badge-featured {
    margin-left: 0.35rem;
    background: var(--brown);
    color: #7A5A3E;
}

.badge-category {
    background: var(--blue);
    color: #1E4A8A;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Upload Section */
.upload-section,
.add-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
}

.login-container h1 {
    margin-bottom: 1.5rem;
}

.login-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* Quill Editor */
.quill-editor-container {
    min-height: 300px;
}

.quill-status-bar {
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--grey);
    color: var(--text-muted);
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: nowrap;
    overflow-x: auto;
}

.ql-toolbar.ql-snow {
    border-radius: var(--radius) var(--radius) 0 0;
    border-color: var(--border);
    background: var(--surface);
}

/* Size picker: suppress Quill snow theme's default "Normal" ::before label
   (content: 'Normal'). We inject our own pt labels via JS, so showing the
   pseudo-element makes every row read "Normal 9pt" etc. */
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item::before {
    content: '' !important;
}

.ql-container.ql-snow {
    border-radius: 0;
    border-bottom: 0;
    min-height: 250px;
    border-color: var(--border);
    background: var(--surface);
}

.ql-editor {
    min-height: 250px;
    line-height: var(--content-line-height);
    font-size: var(--content-font-size);
    font-family: var(--content-font-family);
    color: var(--text);
    background: var(--surface);
}

.ql-editor p,
.ql-editor ul,
.ql-editor ol,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
    margin-bottom: 0.95rem;
}

.ql-editor p,
.ql-editor li,
.ql-editor blockquote,
.ql-editor pre,
.ql-editor code {
    color: var(--text);
}

.ql-editor ul,
.ql-editor ol {
    padding-left: 1.4rem;
}

.ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 2px);
    box-shadow: 0 10px 24px rgba(25, 18, 10, 0.12);
    cursor: pointer;
}

.ql-editor blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.ql-editor pre,
.ql-editor .ql-syntax {
    background: var(--grey);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    overflow-x: auto;
}

.ql-editor a {
    color: var(--primary);
    text-decoration: underline;
}

.ql-editor a:hover {
    color: var(--primary-hover);
}

.ql-toolbar.ql-snow {
    position: relative;
}

.ql-editor table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0.5rem 0 1rem;
}

.ql-editor table td,
.ql-editor table th {
    border: 1px solid var(--border);
    padding: 8px;
    vertical-align: top;
    word-break: break-word;
}

/* Quill editor YouTube embed styles */
.ql-editor .yt-embed {
    position: relative;
    width: 100%;
    margin: 1rem 0;
}

.ql-editor .yt-embed-inner {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.ql-editor .yt-embed-inner iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Quill Fullscreen Mode */
.ql-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    background: #fff;
    display: flex !important;
    flex-direction: column;
    margin: 0;
    border: none;
    border-radius: 0;
}

.ql-fullscreen .ql-toolbar {
    border-radius: 0 !important;
    flex-shrink: 0;
}

.ql-fullscreen .ql-container {
    flex: 1;
    overflow-y: auto;
    border-radius: 0 !important;
    min-height: 0;
}

.ql-fullscreen .ql-editor {
    min-height: 100%;
}

.ql-fullscreen .quill-status-bar {
    border-radius: 0 !important;
    flex-shrink: 0;
}

/* Generic Content Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.2s ease;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modal-slide-in 0.25s ease;
    overflow: hidden;
}

@keyframes modal-slide-in {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
    background: var(--grey);
    color: var(--text);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* Quill Modal Overlay */
.ql-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ql-modal-fade-in 0.2s ease;
}

@keyframes ql-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ql-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: ql-modal-slide-in 0.25s ease;
    overflow: hidden;
}

@keyframes ql-modal-slide-in {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ql-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.ql-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.ql-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.ql-modal-close:hover {
    background: var(--grey);
    color: var(--text);
}

.ql-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.ql-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.ql-modal-btn {
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: background 0.15s, border-color 0.15s;
}

.ql-modal-btn:hover {
    background: var(--grey);
    border-color: var(--text-muted);
}

.ql-modal-btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.ql-modal-btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* HTML Source Editor */
.ql-html-modal {
    max-width: 800px;
}

.ql-html-textarea {
    width: 100%;
    min-height: 400px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    resize: vertical;
    tab-size: 4;
    white-space: pre;
    overflow-x: auto;
}

.ql-html-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 107, 95, 0.15);
    background: #fff;
}

/* Special Characters Modal */
.ql-special-chars-modal {
    max-width: 560px;
}

.ql-special-chars-section {
    margin-bottom: 1rem;
}

.ql-special-chars-section:last-child {
    margin-bottom: 0;
}

.ql-special-chars-section-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}

.ql-special-chars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ql-special-chars-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.1s;
}

.ql-special-chars-item:hover {
    background: var(--blue);
    border-color: var(--primary);
    transform: scale(1.1);
}

.ql-special-chars-item:active {
    transform: scale(0.95);
    background: #D0E0F8;
}

/* Word Count Badge */
.ql-word-count {
    font-weight: 600;
    color: var(--text-muted);
}

/* Image Resize Handles */
.ql-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border: 2px solid #fff;
    border-radius: 2px;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.ql-resize-top-left { cursor: nw-resize; }
.ql-resize-top-right { cursor: ne-resize; }
.ql-resize-bottom-left { cursor: sw-resize; }
.ql-resize-bottom-right { cursor: se-resize; }

/* New Toolbar Button Styles */
.ql-toolbar .ql-undo,
.ql-toolbar .ql-redo,
.ql-toolbar .ql-fullscreen-btn,
.ql-toolbar .ql-html-edit,
.ql-toolbar .ql-special-chars,
.ql-toolbar .ql-uppercase,
.ql-toolbar .ql-lowercase,
.ql-toolbar .ql-super,
.ql-toolbar .ql-sub {
    width: 28px;
    height: 24px;
    padding: 3px 5px;
    color: var(--text-muted);
}

.ql-toolbar .ql-undo:hover,
.ql-toolbar .ql-redo:hover,
.ql-toolbar .ql-fullscreen-btn:hover,
.ql-toolbar .ql-html-edit:hover,
.ql-toolbar .ql-special-chars:hover,
.ql-toolbar .ql-uppercase:hover,
.ql-toolbar .ql-lowercase:hover,
.ql-toolbar .ql-super:hover,
.ql-toolbar .ql-sub:hover {
    color: var(--text);
}

.ql-toolbar .ql-undo svg,
.ql-toolbar .ql-redo svg,
.ql-toolbar .ql-fullscreen-btn svg,
.ql-toolbar .ql-html-edit svg,
.ql-toolbar .ql-special-chars svg,
.ql-toolbar .ql-uppercase svg,
.ql-toolbar .ql-lowercase svg,
.ql-toolbar .ql-super svg,
.ql-toolbar .ql-sub svg {
    width: 18px;
    height: 18px;
}

.ql-toolbar .ql-clean {
    width: 28px;
    height: 24px;
    padding: 3px 5px;
    color: var(--text-muted);
}

.ql-toolbar .ql-clean:hover {
    color: var(--text);
}

@keyframes fade-slide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Share Buttons */
.share-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.share-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.share-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.share-btn:hover {
    background: var(--surface-alt);
    color: var(--text);
    text-decoration: none;
}

.share-facebook:hover {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.share-twitter:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.share-instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
    border-color: #cc2366;
}

.share-linkedin:hover {
    background: #0a66c2;
    color: #fff;
    border-color: #0a66c2;
}

.share-copy:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container,
    .admin-container {
        padding: 1.2rem 1rem;
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .nav-admin {
        margin-left: 0;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .hero,
    .archive-hero,
    .about-hero {
        padding: 1.05rem;
    }

    .media-grid-images,
    .media-grid-videos,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    .sidebar-link {
        width: auto;
    }

    .lightbox-prev { left: -4px; }
    .lightbox-next { right: -4px; }

    .lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 1.4rem;
    }

    .lightbox-close {
        top: -38px;
        font-size: 1.6rem;
    }
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 420px;
    border-radius: calc(var(--radius) + 6px);
    overflow: hidden;
    margin-bottom: 1.6rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-soft);
    animation: fade-slide 0.55s ease both;
}

.hero-banner-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.hero-banner-content {
    max-width: 640px;
    color: #fff;
}

.hero-banner-content .hero-kicker {
    color: rgba(255, 255, 255, 0.85);
}

.hero-banner-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
    margin-bottom: 0.6rem;
    color: #fff;
}

.hero-banner-content .hero-lead {
    color: rgba(255, 255, 255, 0.85);
    max-width: 72ch;
}

@media (max-width: 768px) {
    .hero-banner {
        min-height: 280px;
    }

    .hero-banner-overlay {
        padding: 1.25rem;
        align-items: flex-end;
    }
}

/* Sunus Section */
.sunus {
    margin-bottom: 1.6rem;
    animation: fade-slide 0.55s ease both;
}

.sunus-content {
    max-width: 960px;
    margin: 0 auto;
}

.sunus-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1rem;
    text-align: center;
}

.sunus-content p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 1rem;
    text-align: left;
}

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

.sunus-content p:first-child::first-letter {
    font-size: 2.6rem;
    font-weight: 700;
    float: left;
    line-height: 1;
    margin: 0.15rem 0.45rem 0 0;
    color: var(--primary);
}

@media (max-width: 768px) {
    .sunus-content p {
        font-size: 0.98rem;
        line-height: 1.8;
    }

    .sunus-content p:first-child::first-letter {
        font-size: 2.2rem;
    }
}

/* SEO Editor (admin) */
.seo-editor {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 1.25rem 0;
    background: var(--surface, #fff);
    overflow: hidden;
}

.seo-editor[open] .seo-editor-header {
    border-bottom: 1px solid var(--border);
}

.seo-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--text);
}

.seo-editor-header::-webkit-details-marker {
    display: none;
}

.seo-editor-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.02rem;
}

.seo-editor-title i {
    color: var(--primary);
}

.seo-editor-state {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.seo-editor-state.is-filled {
    background: rgba(40, 167, 69, 0.12);
    color: #1c7a36;
}

.seo-editor-body {
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
}

.seo-preview {
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 0.6);
    background: #fff;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.25rem;
}

.seo-preview-url {
    font-size: 0.78rem;
    color: #1a0dab;
    margin: 0 0 0.15rem;
    word-break: break-all;
}

.seo-preview-title {
    font-size: 1.05rem;
    line-height: 1.3;
    color: #1a0dab;
    margin: 0 0 0.15rem;
    word-break: break-word;
}

.seo-preview-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #4d5156;
    margin: 0;
    word-break: break-word;
}

.seo-char-counter {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.seo-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.seo-hint code {
    background: rgba(0, 0, 0, 0.06);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
}

.seo-hint.is-valid {
    color: #1c7a36;
}

.seo-hint.is-invalid {
    color: #c0392b;
}

.seo-og-thumb {
    display: block;
    margin-top: 0.5rem;
    max-width: 240px;
    max-height: 140px;
    border-radius: calc(var(--radius) * 0.6);
    border: 1px solid var(--border);
    object-fit: cover;
}

textarea.seo-json {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.5;
}

/* SEO Ayarları sayfası bölüm başlıkları */
.seo-section {
    margin: 1.5rem 0 0.75rem;
}

.seo-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
}

.seo-section .form-group {
    margin-bottom: 0.9rem;
}

.seo-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 720px) {
    .seo-grid-2 {
        grid-template-columns: 1fr;
    }
}
