/* 
 * PT. Pola Dwipa - Modern Web Blog Stylesheet
 * Design System:
 * - Colors: Deep Blue, Soft Gold/Orange for accents, Light Gray for backgrounds.
 * - Typography: Outfit (Headings) & Inter (Body).
 * - Effects: Glassmorphism, smooth transitions, subtle shadows.
 */

:root {
    /* Colors */
    --color-primary: #0f172a; /* Deep blue/slate */
    --color-primary-light: #1e293b;
    --color-accent: #f59e0b; /* Amber/Gold accent */
    --color-accent-hover: #d97706;
    
    --color-text-main: #334155;
    --color-text-muted: #64748b;
    --color-text-light: #f8fafc;
    
    --color-bg-body: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-card-glass: rgba(255, 255, 255, 0.7);
    --color-border: #e2e8f0;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= Reset & Base ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ================= Buttons ================= */
.btn-primary, .btn-secondary, .filter-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-body);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-primary.large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* ================= Header ================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    z-index: 1000;
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nav-toggle-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-toggle-btn:hover {
    background: var(--color-bg-body);
}

.nav-toggle-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Burger → X animation */
.nav-toggle-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* ================= Hero Section ================= */
.hero {
    position: relative;
    padding: 180px 0 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(to bottom, #ffffff, var(--color-bg-body));
}

/* Abstract Background Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: rgba(56, 189, 248, 0.3);
    top: -100px;
    left: -150px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(245, 158, 11, 0.2);
    bottom: -50px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-accent-hover);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ================= Categories Section ================= */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    margin-bottom: 5rem;
}

.category-card {
    background: var(--color-bg-card-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card.group-arsitektur::before { background: #3b82f6; }
.category-card.group-sipil::before { background: #10b981; }
.category-card.group-pengawasan::before { background: #f59e0b; }
.category-card.group-kegiatan::before { background: #8b5cf6; }

.cat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 1rem;
    background: var(--color-bg-body);
    border-radius: var(--radius-md);
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

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

/* ================= Articles Section ================= */
.articles {
    padding: 5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.section-title span {
    color: var(--color-accent);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    background: transparent;
    color: var(--color-text-muted);
}

.filter-btn:hover {
    color: var(--color-primary);
    background: var(--color-bg-body);
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.article-image-wrapper {
    overflow: hidden;
    position: relative;
}

.article-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    backdrop-filter: blur(4px);
}

.article-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.article-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.read-more:hover {
    color: var(--color-accent);
    gap: 0.75rem; /* Slide arrow effect */
}

/* ================= CTA Section ================= */
.cta-section {
    background: var(--color-primary);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    pointer-events: none;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ================= Footer ================= */
.footer {
    background: white;
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

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

.footer-links h3, .footer-contact h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

.footer-contact p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a:hover {
    color: var(--color-primary);
}

/* ================= Pagination ================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: var(--color-bg-body);
    color: var(--color-primary);
}

.page-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

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

/* ================= Modal / Single Article ================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    margin: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--color-primary);
    transform: rotate(90deg);
}

.modal-header-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.modal-body-content {
    padding: 3rem;
}

.modal-body-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.modal-meta {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.wp-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.wp-content iframe, 
.wp-content video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.wp-content p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #475569;
}

.wp-content h2, .wp-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    color: var(--color-primary);
}

/* WordPress Tables */
.wp-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.wp-content table thead th,
.wp-content table th {
    background: var(--color-primary);
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    text-align: left;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    border-bottom: 2px solid rgba(245, 158, 11, 0.5);
}

.wp-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-main);
    line-height: 1.5;
    vertical-align: top;
}

.wp-content table tr:last-child td {
    border-bottom: none;
}

.wp-content table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.7);
}

.wp-content table tbody tr:hover {
    background: rgba(245, 158, 11, 0.06);
    transition: background 0.2s ease;
}

/* Responsive table wrapper */
.wp-content .table-responsive,
.wp-content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

.wp-content .table-responsive table,
.wp-content .wp-block-table table {
    margin: 0;
}

/* ================= Gallery ================= */
.gallery-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--color-bg-body);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.gallery-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
}

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

.gallery-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Gallery reveal animation for "Lihat Selengkapnya" */
@keyframes galleryReveal {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-img-reveal {
    animation: galleryReveal 0.4s ease forwards;
    opacity: 0;
}

.gallery-show-more-btn {
    transition: var(--transition);
}

.gallery-show-more-btn:hover {
    background: var(--color-primary) !important;
    color: white !important;
    border-color: var(--color-primary) !important;
}

/* ================= Photo Lightbox ================= */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 78vh;
    position: relative;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
    line-height: 1;
    padding-bottom: 3px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

/* Desktop: bottom-controls is just a counter wrapper, nav buttons float outside */
.lightbox-bottom-controls {
    display: contents;
}

.lightbox-counter {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================= Back to Top Button ================= */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

.back-to-top-btn:active {
    transform: translateY(0) scale(0.95);
}

/* ================= Responsive Design ================= */
@media (max-width: 1024px) {
    .hero-title { font-size: 3rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    /* Header */
    .header-content { height: 64px; }
    .header-actions { display: none; }
    .nav-toggle-btn { display: flex; }

    /* Nav mobile */
    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 2px solid var(--color-border);
        padding: 0.5rem 0 1rem;
        gap: 0;
        z-index: 999;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu .nav-link {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }

    /* Hero */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-title { font-size: 2rem; letter-spacing: -0.5px; }
    .hero-subtitle { font-size: 1rem; }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        text-align: center;
        width: 100%;
    }

    /* Categories */
    .categories {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-top: -20px;
        margin-bottom: 3rem;
    }

    .category-card { padding: 1.25rem; }
    .cat-icon { font-size: 1.75rem; margin-bottom: 0.5rem; padding: 0.75rem; }

    /* Section header & filter */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
    }

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

    .filter-group {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding: 0.35rem;
        scrollbar-width: none;
    }

    .filter-group::-webkit-scrollbar { display: none; }

    .filter-btn {
        white-space: nowrap;
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* Article grid */
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .articles { padding: 3rem 0; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

    /* Modal */
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-content { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92vh; overflow-y: auto; }
    .modal-header-img { height: 200px; }
    .modal-body-content { padding: 1.25rem; }
    .modal-body-content h1 { font-size: 1.5rem; }
    .modal-meta { flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; }

    /* Gallery */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-img { height: 120px; }

    /* CTA */
    .cta-section { padding: 3rem 1rem; }
    .cta-content h2 { font-size: 1.5rem; }
    .btn-primary.large { width: 100%; text-align: center; }

    /* Lightbox - move nav below image on mobile */
    .lightbox-overlay {
        justify-content: center;
        padding: 1rem 0;
    }

    .lightbox-img-wrapper {
        max-width: 96vw;
        max-height: 65vh;
    }

    .lightbox-img {
        max-width: 96vw;
        max-height: 65vh;
    }

    .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 38px;
        height: 38px;
        font-size: 1.4rem;
    }

    /* Hide side nav buttons, use bottom bar instead */
    .lightbox-nav {
        position: static;
        transform: none;
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .lightbox-nav:hover {
        transform: none;
    }

    .lightbox-nav:active {
        transform: scale(0.9);
    }

    .lightbox-counter {
        margin-top: 0;
        font-size: 0.85rem;
        padding: 0.35rem 1rem;
    }

    /* Bottom controls bar - assembled via JS wrapper */
    .lightbox-bottom-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
        width: 100%;
        padding: 0 1rem;
    }

    /* Back to Top */
    .back-to-top-btn { bottom: 1.25rem; right: 1.25rem; width: 42px; height: 42px; }
}

@media (max-width: 400px) {
    .logo span { font-size: 1.1rem; }
    .hero-title { font-size: 1.75rem; }
    .categories { grid-template-columns: 1fr; }
}
