/* Admin Mode Overrides & Design System */
.admin-mode .bento-container {
    max-width: 98%;
    width: 98%;
    padding: 20px;
    height: calc(100svh - 80px);
    /* Fill screen height minus navbar (Mobile Stable) */
    /* Fill screen height minus navbar */
    grid-template-columns: 280px 1fr !important;
    /* Fixed Sidebar Width */
    grid-template-rows: auto 1fr !important;
    /* Header, then Content */
    gap: 20px;
    overflow: hidden;
    /* Prevent body scroll if content scrolls internally */
}

/* Header: Top Right */
.admin-mode .span-4 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin-bottom: 0 !important;
}

/* Sidebar: Left Full Height */
.admin-mode .bento-card:not(.span-3) {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    height: 100% !important;
    overflow-y: auto;
}

/* Content: Bottom Right Full Height */
.admin-mode .span-3 {
    grid-column: 2 !important;
    grid-row: 2 !important;
    height: 100% !important;
    overflow-y: auto;
    /* Internal scroll for content */
}

/* --- Admin Design System --- */

/* Admin Cards */
.admin-card {
    background: rgba(20, 20, 23, 0.8) !important;
    /* Slightly darker/denser than standard bento */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    /* Slightly tighter radius for functional feel */
    padding: 24px;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.admin-card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Admin Buttons */
.btn-admin-primary {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    /* Softer rect */
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-admin-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
    color: #fff;
}

.btn-admin-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-admin-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.btn-admin-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-admin-danger:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: #ff6b6b;
    color: #fff;
}

/* Admin Forms */
.form-label-admin {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.02em;
}

.form-control-admin {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.form-control-admin:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(0, 0, 0, 0.4);
}

.form-select-admin {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    padding: 10px 14px;
    width: 100%;
    cursor: pointer;
}

.form-select-admin:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* File Drop Zone */
.file-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(0, 164, 151, 0.05);
    /* Tint with accent */
}

.file-drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone-content {
    pointer-events: none;
    /* Let clicks pass to input */
}

.drop-zone-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.file-drop-zone:hover .drop-zone-icon {
    color: var(--accent-color);
}

.drop-zone-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Admin Tables */
.table-admin {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-admin th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-admin td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    vertical-align: middle;
}

.table-admin tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.admin-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.admin-badge.accent {
    background: var(--accent-color);
    color: #fff;
}

/* Visibility Toggle Switch (Custom) */
.admin-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.admin-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.admin-toggle input:checked+.toggle-slider {
    background-color: var(--accent-color);
}

.admin-toggle input:focus+.toggle-slider {
    box-shadow: 0 0 1px var(--accent-color);
}

.admin-toggle input:checked+.toggle-slider:before {
    transform: translateX(20px);
}




html {
    scrollbar-gutter: stable;
}

body.modal-open {
    padding-right: 0 !important;
}

/* Prevent Bootstrap from shifting fixed elements */
body.modal-open .fixed-top,
body.modal-open .fixed-bottom,
body.modal-open .is-fixed,
body.modal-open .sticky-top,
body.modal-open .header-logo,
body.modal-open .right-sidebar {
    padding-right: 0 !important;
    margin-right: 0 !important;
}

:root {
    /* Color Palette - Refined Dark Theme */
    --bg-color: #0d0d0d;
    /* Almost black */
    --card-bg: rgba(28, 28, 30, 0.6);
    /* Translucent dark grey */
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f5f5f7;
    --text-muted: #c7c7cc;
    --accent-color: #00A497;
    /* Blue Bamboo */
    --accent-glow: rgba(0, 164, 151, 0.3);

    /* Spacing & Radius */
    --card-radius: 24px;
    --grid-gap: 20px;
    --container-padding: 40px;
}

/* Bootstrap Override */
.text-muted {
    color: var(--text-muted) !important;
}

body {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Navbar - Floating & Glass */
.navbar-custom {
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main) !important;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main) !important;
    font-weight: 500;
}

/* Bento Grid Layout */
.bento-container {
    max-width: 1600px;
    /* Increased from 1200px to fixed max for better scaling */
    margin: 0 auto;
    padding: var(--container-padding);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto;
    gap: var(--grid-gap);
}

/* Bento Card Base */
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Grid Areas & Spans */
.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.span-4 {
    grid-column: span 4;
}

.row-span-2 {
    grid-row: span 2;
}

/* Specific Card Styles */
.hero-card {
    grid-column: span 4;
    height: 500px;
    padding: 0;
    position: relative;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.service-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.work-card-mini {
    padding: 0;
    aspect-ratio: 16/9;
}

.work-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    font-weight: 700;
}

/* Buttons */
.btn-custom {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-custom:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Responsive */
@media (max-width: 992px) {
    .bento-container {
        grid-template-columns: 100% !important;
        padding: 20px;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .span-1,
    .span-2,
    .span-3,
    .span-4 {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-card {
        height: auto !important;
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .hero-card {
        height: 400px;
    }

    .hero-title-large {
        font-size: 3rem;
    }

    .hero-subtitle-large {
        font-size: 1.2rem;
    }
}

/* Utilities */
.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.border-accent {
    border-color: var(--accent-color) !important;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}


.rounded-circle {
    border-radius: 50%;
}

/* Tool Card Specifics */
.tool-card .btn-custom {
    margin-top: auto;
    align-self: flex-start;
}

/* Lightbox (Keep existing) */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* =========================================
   Unified Page Components
   ========================================= */

/* New Standard Page Header */
.page-header {
    grid-column: span 4;
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

/* Subtle Section Separator */
.section-separator {
    grid-column: span 4;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 60px 0;
    width: 100%;
}

.page-title {

    font-size: 2.2rem;
    /* Reduced from 2.5+ */
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Generic Page Card (Refined) */
.bento-page-card {
    grid-column: span 4;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Layout Control */
    max-width: 900px;
    /* Limit width */
    width: 100%;
    margin: 0 auto;
    /* Center in grid */
}

/* Typography in Page Card */
.bento-page-card h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-main);
}

.bento-page-card h2 {
    font-size: 1.5rem;
    /* Reduced */
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.bento-page-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.bento-page-card p {
    color: var(--text-muted);
    font-size: 1rem;
    /* Standardized standard text size */
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Article Content Typography */
.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #e1e1e6;
}

.article-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}

/* Sticky SNS Sidebar */
.sns-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.sns-sidebar-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.sns-sidebar-link:hover {
    background: var(--accent-color);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
    border-color: var(--accent-color);
}

@media (max-width: 768px) {
    .sns-sidebar {
        display: none;
    }
}

/* =========================================
   Redesign: Full Screen Hero & Animations
   ========================================= */
/* ... (retaining rest of file, mostly unchanged) ... */

.hero-fullscreen {
    height: 100vh;
    /* Fallback */
    height: 100svh;
    /* Stable height on mobile to prevent scroll jump */
    min-height: 100svh;
    /* Enforce minimum height */
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-slide.active {
    opacity: 1;
}

.hero-zoom-content {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* Optional: Add slow zoom animation here if using nested div */
}

/* Explicit overlay element */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

.hero-content-center {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.hero-title-large {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-subtitle-large {
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@media (max-width: 768px) {
    .hero-title-large {
        font-size: 3rem;
    }

    .hero-subtitle-large {
        font-size: 1.2rem;
    }
}

/* =========================================
   Redesign: Right Sidebar & Header
   ========================================= */

/* Header Logo */
.header-logo {
    position: fixed;
    top: 30px;
    right: 40px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    z-index: 1050;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.8;
    color: var(--text-main);
}

/* Right Sidebar */
.right-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    /* Dynamic height for sidebar */
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0 40px;
    z-index: 1000;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.nav-icon-link {
    position: relative;
    color: var(--text-muted);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.nav-icon-link:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.1);
}

.nav-icon-link::before {
    content: attr(data-text);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.nav-icon-link:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.mobile-menu-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1100;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 2rem;
    padding: 5px;
    cursor: pointer;
}

body.modal-open .mobile-menu-btn {
    display: none !important;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: var(--accent-color);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mobile-nav-link {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--accent-color);
}

.mobile-sns-link {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.mobile-sns-link:hover {
    color: var(--accent-color);
}

@media (min-width: 992px) {
    .main-wrapper {
        padding-right: 80px;
    }
}

.navbar-custom,
.sns-sidebar {
    display: none !important;
}

@media (max-width: 991.98px) {

    /* Mobile Header Layout Restructuring */
    /* Mobile Header Layout Restructuring - REFINED */
    /* Fixed translucent header that pushes content down initially via body padding */

    body {
        /* Add padding equal to header height + safe area to prevent initial overlap */
        padding-top: calc(70px + env(safe-area-inset-top)) !important;
    }

    .main-wrapper {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Container for Logo and Menu Trigger */
    .mobile-header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;

        /* Minimal Height: Reduced padding, but add Safe Area for Notch/Dynamic Island */
        padding: 15px 20px;
        padding-top: max(15px, env(safe-area-inset-top));

        /* Translucency Effect */
        background-color: rgba(10, 10, 10, 0.8);
        /* Semi-transparent dark bg */
        backdrop-filter: blur(10px);
        /* Blur effect */
        -webkit-backdrop-filter: blur(10px);

        position: fixed;
        /* Stick to top */
        top: 0;
        left: 0;
        z-index: 9999;
        /* Boost to max to prevent coverage */
        margin-bottom: 0;

        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        /* Subtle border for definition */

        /* iOS Rendering Fixes: Force hardware acceleration to prevent disappearing on scroll */
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        will-change: transform;
        will-change: transform;
    }

    /* Reset Fixed Logo */

    /* Custom Responsive Grid for Works Page */
    .work-grid-item {
        grid-column: span 2;
        /* Default: 2 columns (Tablet/Laptop) */
        aspect-ratio: 16/9;
    }

    @media (min-width: 992px) {
        .work-grid-item {
            grid-column: span 1;
            /* PC: 1 column (4 items per row) -> Half size of previous span-2 */
        }
    }

    @media (max-width: 768px) {
        .work-grid-item {
            grid-column: 1 / -1 !important;
            /* Mobile: Full width */
        }
    }

    .header-logo {
        position: static !important;
        /* No longer fixed */
        transform: none !important;
        margin: 0 !important;
    }

    /* Reset Fixed Menu Button */
    .mobile-menu-btn {
        position: static !important;
        /* No longer fixed */
        margin: 0 !important;
    }

    /* Reset Page Header Margins since we now have physical space */
    .page-header {
        margin-top: 0 !important;
    }
}

/* Work Overlay (Video Trigger) - Mobile First Logic */
.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);

    /* Default: Visible (for mobile/touch) */
    opacity: 1;

    transition: opacity 0.3s ease;
    z-index: 10;
    cursor: pointer;
}

/* Only hide initially if the device supports hover (e.g. Desktop with mouse) */
@media (hover: hover) {
    .work-overlay {
        opacity: 0;
    }

    .work-card-mini:hover .work-overlay {
        opacity: 1;
    }
}

/* Fix layout issues */
#videoModalDescription,
#photoModalDescription,
#videoModalTitle,
#photoModalTitle {
    text-align: left !important;
}

/* Ensure the container itself aligns items to the start */
/* Ensure the container itself aligns items to the start */
.modal-body .col-lg-4 {
    align-items: flex-start !important;
    text-align: left !important;
}

@media (max-width: 992px) {
    .page-header {
        margin-top: 120px !important;
        /* Increase margin significantly to avoid logo overlap */
    }

    /* NUCLEAR OPTION: Force overlay visibility on all small screens, ignore hover capabilities */
    .work-overlay {
        opacity: 1 !important;
    }
}

@media (max-width: 992px) {
    .page-header {
        margin-top: 80px !important;
        /* Increase margin to avoid logo overlap */
    }
}