/* ==========================================
   CSS VARIABLES FOR DARK MODE SUPPORT
   ========================================== */
:root {
    /* Background colors - Light mode (default) */
    --bg-portfolio: #15171c;
    --bg-portfolio-footer: #0F1014;
    --bg-header-card: #FDF8F3;
    --bg-card: #FDF8F3;
    --bg-media-gallery: #FDFCF9;
    --bg-app: #FDF8F3;
    --bg-modal: #FDF8F3;
    --bg-modal-header: #FDF8F3;
    --bg-dropzone: rgba(255, 255, 255, 0.8);
    --bg-post: #fff;
    --bg-post-header: #fff;
    --bg-audio-item: #fff;
    --bg-play-button: rgba(255, 255, 255, 0.9);
    --bg-media-item: #f7fafc;
    --bg-upload-item: #6B7280;
    --bg-audio-upload: #f8f9fa;
    --bg-play-btn: #B29C79;
    --bg-progress-bar: #E5E7EB;
    --bg-dropdown: #fff;
    --bg-dropdown-hover: #f7fafc;
    
    /* Text colors - Light mode (default) */
    --text-primary: #000;
    --text-secondary: #0F1014;
    --text-blog-content: #000;
    --text-portfolio-name: #615C50;
    --text-portfolio-description: #4a5568;
    --text-blog-title: #B29C79;
    --text-date: #B29C79;
    --text-nav-inactive: #718096;
    --text-nav-hover: #2d3748;
    --text-secondary-gray: #718096;
    --text-date-separator: #718096;
    --text-empty-message: #718096;
    --text-content: #444;
    --text-content-p: #555;
    --text-time-display: #6B7280;
    --text-duration: #9CA3AF;
    
    /* Accent colors - Shared */
    --color-accent: #C59A00;
    --color-accent-hover: #A67C00;
    --color-accent-dark: #A67C00;
    --color-accent-light: rgba(197, 154, 0, 0.15);
    --color-accent-border: rgba(197, 154, 0, 0.3);
    --color-accent-border-hover: rgba(197, 154, 0, 0.6);
    --color-accent-bg-hover: rgba(197, 154, 0, 0.05);
    --color-progress-fill: #C59A00;
    
    /* Border colors */
    --border-avatar: #15171C;
    --border-media: #e2e8f0;
    --border-audio: #e9ecef;
    --border-dropzone: #C59A00;
    --border-dropzone-hover: #A67C00;
    --border-audio-upload: #dee2e6;
    --border-audio-upload-hover: #adb5bd;
    
    /* Shadow colors */
    --shadow-sm: rgba(0, 0, 0, 0.08);
    --shadow-md: rgba(0, 0, 0, 0.12);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --shadow-overlay: rgba(0, 0, 0, 0.6);
    --shadow-overlay-hover: rgba(0, 0, 0, 0.8);
    
    /* Special colors */
    --color-success: #198754;
    --color-danger: #dc3545;
    --color-gradient-transparent: rgba(255, 255, 255, 0.1);
    --text-placeholder: #6c757d;
}

/* Dark mode overrides */
:root[data-bs-theme="dark"] {
    /* Background colors - Dark mode */
    --bg-portfolio: #0a0b0c;
    --bg-portfolio-footer: #050506;
    --bg-header-card: #1a1a1a;
    --bg-card: #1a1a1a;
    --bg-media-gallery: #1a1a1a;
    --bg-app: #0a0b0c;
    --bg-modal: #1a1a1a;
    --bg-modal-header: #1a1a1a;
    --bg-dropzone: rgba(42, 42, 42, 0.8);
    --bg-post: #252525;
    --bg-post-header: #252525;
    --bg-audio-item: #252525;
    --bg-play-button: rgba(255, 255, 255, 0.9);
    --bg-media-item: #2a2a2a;
    --bg-upload-item: #4a5568;
    --bg-audio-upload: #2a2a2a;
    --bg-play-btn: #B29C79;
    --bg-progress-bar: #4a5568;
    --bg-dropdown: #2a2a2a;
    --bg-dropdown-hover: #333333;
    
    /* Text colors - Dark mode */
    --text-primary: #e5e5e5;
    --text-secondary: #d0d0d0;
    --text-blog-content: #e5e5e5;
    --text-portfolio-name: #c9b896;
    --text-portfolio-description: #b0a699;
    --text-blog-title: #d4c4a8;
    --text-date: #d4c4a8;
    --text-nav-inactive: #9ca3af;
    --text-nav-hover: #f3f3f3;
    --text-secondary-gray: #9ca3af;
    --text-date-separator: #9ca3af;
    --text-empty-message: #9ca3af;
    --text-content: #d0d0d0;
    --text-content-p: #d5d5d5;
    --text-time-display: #9ca3af;
    --text-duration: #9ca3af;
    
    /* Shadow colors - Dark mode */
    --shadow-sm: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --shadow-overlay: rgba(0, 0, 0, 0.8);
    --shadow-overlay-hover: rgba(0, 0, 0, 0.9);
    
    /* Border colors - Dark mode */
    --border-avatar: #3a3a3a;
    --border-media: #3a3a3a;
    --border-audio: #3a3a3a;
    --border-audio-upload: #4a5568;
    --border-audio-upload-hover: #5a6673;
    
    /* Special colors - Dark mode */
    --text-placeholder: #9ca3af;
    --color-success: #47d764;
}

.portfolio_main {
    width: 150px;
}

.portfolio-img {
    float: left;
    object-fit: cover;
    width: 240px !important;
    height: 300px !important;
}

.portfolio-img-container {
    width: 240px !important;
    height: 300px !important;
}

.dz-message {
    color: var(--text-primary);
    display: block !important;
    align-content: center;
}

.app-portfolio {
    background-color: var(--bg-portfolio);
}

.app-portfolio-footer {
    background-color: var(--bg-portfolio-footer);
}

.portfolio-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-delete {
    right: -2rem;
    top: -1rem;
    display: none;
}

.portfolio-img:hover + .media-delete, .media-delete:hover {
    display: inline-block;
}

.nav {
    border-radius: .475rem;
    border: none;
    padding: 1px;
}

.nav-tabs .nav-link {
    border: none !important;
    border-color: transparent !important;
}

.nav-tabs .nav-link.active {
    border: none !important;
    border-color: transparent !important;
}

.nav-item:hover {
    border: none;
}

.nav-icon {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

#blog-tab {
    color: var(--text-secondary);
}

.hidden {
    display: none;
}

#blog-content {
    padding: 10px 10px 0px 10px;
    color: var(--text-blog-content);
}

.editor-container {
    visibility: hidden;
}

#editor-container {
    min-height: 400px;
}

#editor-container.hidden {
    display: none !important;
}

#editor-container:not(.hidden) {
    display: block !important;
    min-height: 400px;
}

.tox-tinymce {
    min-height: 400px !important;
}

.tox-edit-area {
    min-height: 300px !important;
}

.tox-edit-area iframe {
    min-height: 300px !important;
}

.profile-content {
    height: 100%;
}

#blog-tab img {
    max-width: 100%;
}

.tab-content {
    min-height: 400px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

#blog-tab {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

#blog-tab, #blog-content {
    min-height: 400px;
}

.app-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    clip-path: polygon(30% 20%, 30% 80%, 80% 50%);
    transition: background 0.3s;
}


.portfolio-video:hover .play-button {
  background: rgba(0, 0, 0, 0.8);
}

.custom-media-wrapper {
  width: 746px;
}

/* Blog Post Drag & Drop Styles */
.drag-handle {
    cursor: grab;
    display: none; /* Hidden by default, shown via JavaScript */
    align-items: center;
    justify-content: center;
    color: var(--text-duration);
    transition: color 0.2s ease;
    user-select: none;
}

.drag-handle:hover {
    color: var(--color-accent);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Drag handle is shown only in editing mode via JavaScript */

.blog-post-item {
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

/* Disable text selection only in editing mode */
.editing-mode .blog-post-item {
    user-select: none;
}

/* Prevent text selection during drag */
.blog-post-item.sortable-ghost,
.blog-post-item.sortable-chosen,
.blog-post-item.sortable-drag {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Prevent selection in blog list during drag */
#blog-posts-list.sortable-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    cursor: grabbing !important;
}

.blog-post-item.sortable-ghost {
    opacity: 0.3;
    background: var(--color-accent-light);
    border: 2px dashed var(--color-accent);
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post-item.sortable-chosen {
    opacity: 1;
    transform: scale(1.03) rotate(2deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(197, 154, 0, 0.2);
    z-index: 1000;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

.blog-post-item.sortable-drag {
    opacity: 0.95;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: rotate(4deg) scale(1.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.post-title-container {
    flex: 1;
}

.post-delete-animation {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.nav-item:hover {
    background-color: transparent !important;
    border: none;
}

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

.nav-link:hover::after {
    width: 50%;
}

.nav-link.active {
    background-color: transparent !important;
    position: relative;
}

.nav-link.active:hover {
    background-color: transparent !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

#editProfilePhoto > .dz-preview {
    position: absolute;
    background: none;
    top: -16px;
    left: -16px;
    width: 200px;
    height: 200px;
    > .dz-image {
        width: 200px;
        height: 200px;
        > img {
            width: 100%;
            object-fit: cover;
            border-radius: 50% !important;
        }
    }
}

#showProfilePhoto {
    object-fit: cover;
}

.portfolio-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 20px;
    text-align: center;
}

.portfolio-header-card {
    background: var(--bg-header-card);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: local;
    border-radius: 0 0 16px 16px;
    padding: 40px 20px 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    transition: min-height 0.3s ease, padding 0.3s ease;
}

/* Mobile responsive height */
@media (max-width: 768px) {
    .portfolio-header-card {
        min-height: 275px;
        padding: 0;
        padding-top: 30px;
        border-radius: 0;
    }
    .portfolio-content-container {
        width: 100%;
        max-width: 75%;
        margin: 0 auto;
        padding: 0 15px;
        gap: 4px;
    }
    
    .portfolio-name {
        font-family: 'Poppins', sans-serif;
        font-size: 24px;
        font-weight: 400;
        letter-spacing: 0.3px;
        margin-top: 10px;
        margin-bottom: 0;
        padding: 8px 12px;
        color: #ffffff;
        border-radius: 8px;
        border: 1px solid #4a5568;
        text-align: center;
        min-height: auto !important;
    }
    
    .portfolio-name-section {
        margin-bottom: 0;
    }
    
    .portfolio-dates {
        margin: 10px 0 5px; 
        gap: 6px;
    }
    
    .dates-display {
        gap: 12px;
        min-height: auto !important;
    }
    
    .dates-display .birth-date,
    .dates-display .death-date {
        width: calc(50% - 6px);
        font-size: 14px;
        min-height: auto !important;
    }
    
    .dates-edit {
        gap: 12px;
    }
    
    .portfolio-header-card .portfolio-date-input {
        width: calc(50% - 6px) !important;
        font-size: 14px !important;
    }
    
    .description-display {
        min-height: auto !important;
    }
    
   .portfolio-description p {
        margin-top: 0 !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .portfolio-avatar-container {
        width: 100px;
        height: 100px;
        margin-top: 15px !important;
        margin-bottom: 5px !important;
    }
    
    .portfolio-main-avatar {
        width: 100px;
        height: 100px;
    }
    
    .portfolio-content-container {
        padding: 0 5px;
    }
    
    .portfolio-name {
        font-size: 24px;
        padding: 0 2px;
        min-height: auto;
    }
    
    .dates-display {
        min-height: auto;
    }
    
    .dates-display .birth-date,
    .dates-display .death-date {
        font-size: 13px;
        min-height: auto;
    }
    
    .portfolio-header-card .portfolio-date-input {
        font-size: 13px !important;
        padding: 0 2px !important;
    }
    
    .description-display {
        min-height: auto;
    }
    
    .description-display p {
        font-size: 13px;
    }
    
    .portfolio-header-card .portfolio-description-input {
        font-size: 13px !important;
        padding: 0 2px !important;
    }
}

/* Overlay will be added via JavaScript */

/* Ensure header card keeps its form during editing */
.portfolio-header-card .portfolio-avatar-container,
.portfolio-header-card .portfolio-name-section,
.portfolio-header-card .portfolio-dates,
.portfolio-header-card .portfolio-description {
    position: relative;
    z-index: 4; /* Above overlay (z-index: 2) but not too high */

}

/* Maintain layout during editing mode */
.portfolio-header-card .portfolio-edit-photo {
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.portfolio-header-card .portfolio-edit-photo .dz-message {
    color: #C59A00 !important;
    font-weight: 600;
    text-align: center;
}

.portfolio-header-card .portfolio-name-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 4px !important;
    text-align: center !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #615C50 !important;
    width: 100% !important;
    margin: 0 auto !important;
    transition: all 0.3s ease !important;
    height: auto !important;
    min-height: 48px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    letter-spacing: 0.8px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    box-sizing: border-box !important;
}

.portfolio-header-card .portfolio-name-input:focus {
    outline: none;
    background: transparent !important;
    box-shadow: none !important;
}

/* Portfolio Dates - Two Column Layout */
.portfolio-dates {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dates-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 0px 4px;
    margin-top: 10px;
    border: 2px solid transparent;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Edit mode styling for dates display */
.editing-mode .portfolio-header .dates-display {
    border: 2px solid rgba(197, 154, 0, 0.3) !important;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editing-mode .portfolio-header .dates-display:hover {
    border-color: rgba(197, 154, 0, 0.6) !important;
    background: rgba(197, 154, 0, 0.05);
    transition: all 0.2s ease;
}

.dates-display .birth-date,
.dates-display .death-date {
    width: calc(50% - 5px);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-blog-title);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}

.dates-edit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.date-separator {
    font-weight: 600;
    color: var(--text-nav-inactive);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    flex-shrink: 0;
}

.portfolio-header-card .portfolio-date-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 4px !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text-blog-title) !important;
    width: calc(50% - 5px) !important;
    transition: all 0.3s ease !important;
    height: 28px !important;
    min-height: 44px !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
}

.portfolio-header-card .portfolio-date-input:focus {
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Date input calendar icon styling */
.portfolio-header-card .portfolio-date-input::-webkit-calendar-picker-indicator {
    display: none;
}

.portfolio-header-card .portfolio-date-input::-moz-calendar-picker-indicator {
    display: none;
}

/* Editable description styling */
.portfolio-header-card .portfolio-description-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 4px !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #4a5568 !important;
    width: 100% !important;
    resize: none !important;
    height: auto !important;
    min-height: 44px !important;
    font-style: italic !important;
    line-height: 1.4 !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    box-shadow: none !important;
    margin-top: 2px;

}

.portfolio-header-card .portfolio-description-input::placeholder {
    text-align: center !important;
    color: var(--text-placeholder) !important;
    font-style: italic !important;
}

/* Description display styling */
.description-display {
    width: 100%;
    padding: 8px 4px;
    border: 2px solid transparent;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Edit mode styling for description display */
.editing-mode .portfolio-header .description-display {
    border: 2px solid rgba(197, 154, 0, 0.3) !important;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editing-mode .portfolio-header .description-display:hover {
    border-color: rgba(197, 154, 0, 0.6) !important;
    background: rgba(197, 154, 0, 0.05);
    transition: all 0.2s ease;
}

.description-display p {
    margin: 0;
    font-size: 14px;
    color: var(--text-portfolio-description);
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

.portfolio-header-card .portfolio-description-input:focus {
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.portfolio-avatar-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin-top: 10px;
}

.edit-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
    z-index: 10;
}

.edit-photo-overlay:hover {
    background: rgba(0, 0, 0, 0.7);
}

.edit-photo-btn {
    background: transparent;
    border: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
}

.edit-photo-btn:hover {
    color: var(--color-accent);
    transform: scale(1.05);
}

.edit-photo-btn span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.portfolio-main-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-avatar);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1; /* Below overlay but above container */
}

.portfolio-edit-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 0;
    padding: 0;
}

/* Portfolio Content Container - 400px width */
.portfolio-content-container {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 5px;
}

.portfolio-name-section {
    width: 100%;
    margin-bottom: 0;
    transition: all 0.3s ease;
    margin-bottom: -5px;
}

.portfolio-name {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-portfolio-name);
    letter-spacing: 0.8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: auto;
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 2px solid transparent;
    box-sizing: border-box;
    margin-bottom: -5px;
    transition: all 0.2s ease;
}

.editing-mode .portfolio-header .portfolio-name {
    border: 2px solid rgba(197, 154, 0, 0.3) !important;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editing-mode .portfolio-header .portfolio-name:hover {
    border-color: rgba(197, 154, 0, 0.6) !important;
    background: rgba(197, 154, 0, 0.05);
    transition: all 0.2s ease;
}

.portfolio-name-input {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-portfolio-name);
    background: transparent;
    border: 1px solid #615C50;
    text-align: center;
    
}

.portfolio-dates {
    font-size: 14px;
    color: var(--text-nav-inactive);
    letter-spacing: 0.3px;
}

.birth-date, .death-date {
    font-weight: 300;
}

.date-separator {
    margin: 0 8px;
    color: #a0aec0;
}

.portfolio-description p {
    font-size: 14px;
    color: var(--text-portfolio-description);
    margin: 0;
    font-style: italic;
    line-height: 20px;
    height: 20px;
    margin-top: -5px;
}

/* Navigation Styles */
.portfolio-navigation {
    display: flex;
    justify-content: center;
    gap: 0;
    background: transparent;
    border-radius: 12px;
    padding: 8px;
    box-shadow: none;
}

.portfolio-navigation .nav-item {
    flex: 1;
    text-align: center;
}

.portfolio-navigation .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-nav-inactive);
    min-height: 50px;
    border: none !important;
    border-color: transparent !important;
}

.portfolio-navigation .nav-link.active {
    background-color: transparent !important;
    color: var(--color-accent);
    position: relative;
    border: none !important;
    border-color: transparent !important;
}

.portfolio-navigation .nav-link.active:hover {
    background-color: transparent !important;
    color: var(--text-nav-hover);
}

.portfolio-navigation .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.portfolio-navigation .nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.portfolio-navigation .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.portfolio-navigation .nav-link:hover:not(.active) {
    background-color: transparent !important;
    color: var(--text-nav-hover);
}

.portfolio-navigation .nav-link:hover::after {
    width: 50%;
}

.portfolio-navigation .nav-link.active:hover::after {
    width: 80%;
}

.portfolio-navigation .nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
}

.portfolio-navigation .nav-text {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Navigation tabs background and shadow */
#profile-tabs-nav,
#edit-buttons-nav {
    background-color: var(--bg-dropdown) !important;
    box-shadow: 0 4px 12px var(--shadow-md) !important;
}

/* Editing buttons styling */
.editing-buttons .nav-link {
    color: var(--color-accent) !important;
}

.editing-buttons .nav-link:hover {
    color: var(--color-accent-hover) !important;
}

#edit-toggle-button {
    color: var(--color-accent) !important;
}

#edit-toggle-button:hover {
    color: var(--text-nav-hover) !important;
}

#edit-toggle-button span {
    color: var(--color-accent) !important;
    font-weight: 600;
    font-size: 14px;
}

#save-button {
    color: var(--color-success) !important;
}

#save-button span {
    color: var(--color-success) !important;
    font-weight: 600;
    font-size: 14px;
}

#cancel-button {
    color: var(--color-danger) !important;
}

/* Media Upload Item - correctly sized grid item */
.media-upload-item {
    background: var(--bg-upload-item) !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    height: auto !important; /* Auto height to maintain aspect ratio */
    aspect-ratio: 400/500 !important; /* Desktop 400x500 aspect ratio */
    order: -1 !important; /* Always appear first (top-left) */
}

/* Only show as flex when not hidden */
.media-upload-item:not([style*="display: none"]) {
    display: flex !important;
}

.upload-media-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--color-accent);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
}

.upload-media-btn:hover {
    color: var(--color-accent-hover);
    transform: scale(1.02);
}

.upload-media-btn svg {
    opacity: 0.8;
    margin-bottom: 2px;
}

.upload-media-btn svg rect {
    fill: var(--bg-header-card) !important;
}

.media-upload-item:hover {
    transform: translateY(-2px) !important;
}

/* Media Gallery Styles */
.portfolio-media-gallery {
    display: grid;
    padding: 12px;
    background: var(--bg-media-gallery);
    border-radius: 12px;
    grid-template-columns: repeat(3, 1fr); /* Fixed 3 columns */
    gap: 16px;
    width: 100%;
    min-height: 600px; /* Minimum height */
    max-width: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    align-content: start;
}


.media-item {
    position: relative;
    width: 100%;
    height: auto; /* Auto height to maintain aspect ratio */
    aspect-ratio: 400/500; /* Desktop 400x500 aspect ratio */
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-media-item);
    border: 1px solid var(--border-media);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s ease,
                opacity 0.3s ease;
    order: 0; /* Default order for media items */
}

/* Touch action only in editing mode */
.editing-mode .media-item {
    touch-action: none; /* Better mobile drag in editing mode */
}

/* Blog post items should allow scrolling even in editing mode */
.editing-mode .blog-post-item {
    touch-action: auto; /* Allow both scrolling and dragging */
}

/* Only drag handle should have no touch-action restriction */
.editing-mode .blog-post-item .drag-handle {
    touch-action: none !important;
}

/* Media drag handle styling */
.media-drag-handle {
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.media-drag-handle:hover {
    opacity: 1;
}

.media-drag-handle:active {
    cursor: grabbing !important;
}

/* Prevent text selection during drag */
.sortable-drag,
.sortable-chosen,
.media-item.sortable-ghost {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Prevent selection in entire gallery during drag */
.portfolio-media-gallery.sortable-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    cursor: grabbing !important;
}

/* Sortable ghost effect for media with smooth animation */
.media-item.sortable-ghost {
    opacity: 0.3;
    background: var(--color-accent-light);
    border: 2px dashed var(--color-accent);
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-item.sortable-chosen {
    opacity: 1;
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(197, 154, 0, 0.2);
    z-index: 1000;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(197, 154, 0, 0.2);
    }
    50% {
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(197, 154, 0, 0.3);
    }
}

.media-item.sortable-drag {
    opacity: 0.95;
    transform: rotate(5deg) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fallback drag class for better mobile support */
.sortable-fallback {
    opacity: 0.8 !important;
    transform: rotate(3deg) scale(0.5) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
    max-width: 200px !important;
    max-height: 250px !important;
    overflow: hidden !important;
}

/* Fix for mobile drag - prevent large ghost images */
.sortable-fallback .media-link,
.sortable-fallback .media-image {
    max-width: 200px !important;
    max-height: 250px !important;
    object-fit: contain !important;
}

/* Touch action for gallery - only restrict in editing mode */
.editing-mode .portfolio-media-gallery {
    touch-action: pan-y;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .sortable-fallback {
        transform: rotate(2deg) scale(0.4) !important;
        max-width: 150px !important;
        max-height: 180px !important;
    }
    
    .media-drag-handle {
        width: 24px !important;
        height: 24px !important;
        top: 12px !important;
        left: 12px !important;
    }
    
    .media-drag-handle svg {
        width: 18px !important;
        height: 18px !important;
    }
}

.media-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 12px;
    overflow: hidden;
}

.media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--color-accent);
}

.media-item:hover .media-image {
    transform: scale(1.03);
}

.media-delete-btn {
    display: flex;
    position: absolute;
    top: 12px;
    right: 6px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
}

.media-delete-btn:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

/* Only show delete buttons when in editing mode and on hover */
.media-item:hover .media-delete-btn {
    display: flex;
}

/* Hide delete buttons when not in editing mode */
body:not(.editing-mode) .media-delete-btn {
    display: none !important;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    clip-path: polygon(25% 15%, 25% 85%, 75% 50%);
    width: 32px;
    height: 32px;
    z-index: 10;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-edit-photo {
        width: 100px;
        height: 100px;
    }
    
    .portfolio-name {
        font-size: 28px;
        font-weight: 700;
        letter-spacing: 0.6px;
    }
    
    .portfolio-navigation .nav-link {
        padding: 10px 6px;
        min-height: 44px;
    }
    
    .portfolio-navigation .nav-icon {
        width: 18px;
        height: 18px;
    }
    
    .portfolio-navigation .nav-text {
        font-size: 12px;
    }
    
    .portfolio-media-gallery {
        grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
        padding: 12px;
        gap: 8px;
        background: var(--bg-media-gallery);
        border-radius: 12px;
        overflow-y: auto; /* Enable vertical scrolling */
        overflow-x: hidden; /* Hide horizontal scroll */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        min-height: auto; /* Remove fixed height */
    }
    
    .media-item, .media-upload-item {
        width: 100% !important; /* Fill the column width */
        height: auto !important; /* Auto height to maintain aspect ratio */
        aspect-ratio: 100/130 !important; /* Maintain 100x130 aspect ratio */
        min-height: unset !important;
        max-height: unset !important;
    }
    
    /* Ensure container takes full width on mobile */
    #kt_app_content_container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Card adjustments for mobile */
    .card {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }
    
    .card-body {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}
/* Background and Container Updates */
.app-portfolio {
    background: var(--bg-header-card);
    position: relative;
    z-index: 1;
}

.card {
    background: var(--bg-header-card);
    border: 0px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    box-shadow: none !important;
}

.tab-content {
    background: transparent;
    min-height: auto;
    position: relative;
    z-index: 3;
}

/* Background Overlay - Light and Dark Mode */
.background-overlay {
    background-image: url('../../../assets/img/background-overlay.webp');
}

:root[data-bs-theme="dark"] .background-overlay {
    background-image: url('../../../assets/img/background-overlay-dark.webp');
}

/* Ensure overlays appear above everything */
.modal {
    z-index: 1050 !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}

/* Custom SweetAlert2 Styling for Site Theme */
.custom-swal-popup {
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(197, 154, 0, 0.15) !important;
    border: 2px solid rgba(197, 154, 0, 0.2) !important;
}

.custom-swal-title {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    font-size: 1.5rem !important;
}

.custom-swal-content {
    color: var(--text-secondary) !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
}

/* Custom buttons for SweetAlert */
.swal2-confirm.btn-warning {
    background-color: #C59A00 !important;
    border-color: #C59A00 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
}

.swal2-confirm.btn-warning:hover {
    background-color: #A67C00 !important;
    border-color: var(--color-accent-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(197, 154, 0, 0.3) !important;
}

.swal2-confirm.btn-danger {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
}

.swal2-confirm.btn-danger:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

.swal2-cancel.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
}

.swal2-cancel.btn-secondary:hover {
    background-color: #545b62 !important;
    border-color: #545b62 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3) !important;
}

/* Custom Modal Styling */
.modal-content {
    background: #FDF8F3 !important;
    border: 2px solid rgba(197, 154, 0, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(197, 154, 0, 0.15) !important;
}

.modal-header {
    background: #FDF8F3 !important;
    border-bottom: 2px solid rgba(197, 154, 0, 0.1) !important;
}

.modal-body {
    padding-top: 1.5rem !important;
    background: #FDF8F3 !important;
}

.modal-body h1 {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    margin-bottom: 1.5rem !important;
}

.modal-title {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    font-size: 1.5rem !important;
    margin: 0 !important;
}

/* Custom Dropzone Styling */
.dropzone {
    background: var(--bg-dropzone) !important;
    border: 3px dashed var(--color-accent) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.dropzone:hover {
    background: rgba(197, 154, 0, 0.05) !important;
    border-color: var(--color-accent-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(197, 154, 0, 0.15) !important;
}

.dropzone .dz-message {
    color: #C59A00 !important;
    font-weight: 600 !important;
    margin: 0 !important;
    text-align: center !important;
}

.dropzone .dz-message h3 {
    color: #C59A00 !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* Dropzone upload progress and success styling */
.dropzone .dz-preview {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(197, 154, 0, 0.3) !important;
}

.dropzone .dz-preview.dz-success {
    border-color: #C59A00 !important;
    background: rgba(197, 154, 0, 0.1) !important;
}

.dropzone .dz-preview .dz-progress .dz-upload {
    background: #C59A00 !important;
}

.dropzone .dz-preview .dz-success-mark,
.dropzone .dz-preview .dz-error-mark {
    color: #C59A00 !important;
}

.dropzone .dz-preview .dz-filename span {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

.dropzone .dz-preview .dz-size {
    color: #6c757d !important;
}

/* Close button styling */
.btn-active-color-primary {
    color: #C59A00 !important;
}

.btn-active-color-primary:hover {
    background: rgba(197, 154, 0, 0.1) !important;
    color: #A67C00 !important;
}

/* Mobile responsive modal adjustments */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem !important;
        max-width: calc(100% - 2rem) !important;
    }
    
    .modal-body {
        padding: 1.5rem !important;
    }
    
    .dropzone {
        min-height: 150px !important;
        padding: 1rem !important;
    }
    
    .dropzone .dz-message h3 {
        font-size: 1rem !important;
    }
}

/* Ensure modal appears above everything */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    background-color: rgba(21, 23, 28, 0.8) !important;
    z-index: 1050 !important;
}
/* Blog Posts System Styles */
.blog-posts-container {
    width: 100%;
    max-width: 100%;
}

.add-post-container {
    margin-bottom: 20px;
    text-align: center;
}

.add-post-btn {
    background: #6B7280;
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: var(--bg-header-card);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.add-post-btn:hover {
    color: var(--color-accent-hover);
    transform: scale(1.02);
}

.add-post-btn svg {
    opacity: 0.8;
}

.add-post-btn svg rect {
    fill: var(--bg-header-card) !important;
}

.blog-post-item {
    background: var(--bg-post);
    border-radius: 16px;
    border: none;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    padding: 0;
    position: relative;
}

.blog-post-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.post-header {
    background: var(--bg-post);
    border-bottom: none;
    padding: 20px 24px 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.post-title-container {
    flex: 1;
    position: relative;
    justify-content: center;
    align-items: center;
}

.post-title-view {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-blog-title);
    line-height: 1.3;
    transition: all 0.3s ease;
    display: flex;
    margin: auto 0;
    align-items: center;
    box-sizing: border-box;
}

/* Edit mode styling for post title */
.editing-mode .post-title-view {
    cursor: pointer;
    transition: all 0.2s ease;
}

.editing-mode .post-title-view:hover {
    background: rgba(197, 154, 0, 0.05);
    transition: all 0.2s ease;
}


.post-title-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-blog-title) !important;
    width: 100% !important;
    max-width: 300px !important;
    transition: border-color 0.3s ease !important;
    box-shadow: none !important;
    min-height: 28px;
    display: none;
    align-items: center;
    box-sizing: border-box;
}

.post-title-input:focus {
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: column;
    align-items: flex-end;
}

/* Hide old delete button in meta area when using bottom-right delete */
.post-meta .post-delete-btn {
    display: none;
}

.post-date-container {
    order: 1;
    position: relative;
}

.post-date-view {
    font-size: 12px;
    color: var(--text-blog-title);
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.3s ease;
    min-height: 20px;
    display: flex;
    align-items: center;
    padding: 2px 0;
    box-sizing: border-box;
}

/* Edit mode styling for post date */
.editing-mode .post-date-view {
    cursor: pointer;
    transition: all 0.2s ease;
}

.editing-mode .post-date-view:hover {
    background: rgba(197, 154, 0, 0.05);
    transition: all 0.2s ease;
}

.post-date-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 2px 0 !important;
    font-size: 12px !important;
    color: var(--text-blog-title) !important;
    box-shadow: none !important;
    min-height: 20px;
    display: none;
    align-items: center;
    box-sizing: border-box;
}

.post-date-input:focus {
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.post-delete-btn {
    background: transparent;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: absolute;
    bottom: 12px;
    right: 12px;
    transform: scale(0.8);
}

/* Show delete button on hover in editing mode */
.editing-mode .blog-post-item:hover .post-delete-btn {
    transform: scale(1) !important;
}


.post-content {
    padding: 0 24px 24px 24px;
    position: relative;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    text-align: left;
    width: 100%;
    position: relative;
    z-index: 1;
}

.read-more-btn:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.read-more-btn.hidden {
    display: none;
}

.post-content-view {
    margin: 0;
    border: none !important;
    background: var(--bg-post) !important;
    cursor: pointer;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
    min-height: 80px;
    max-height: 200px; /* Artırıldı - daha fazla içerik göster */
    overflow: hidden;
    padding: 0;
    color: var(--text-content) !important;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
}

.post-content-view::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, var(--bg-post));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.post-content-view.expanded {
    max-height: none !important; /* Tüm içeriği göster */
    transition: max-height 0.5s ease-in-out;
}

.post-content-view.expanded::after {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Edit mode hover effect for post content */
.editing-mode .post-content-view {
    cursor: text;
    position: relative;
    transition: all 0.2s ease;
}

.editing-mode .post-content-view:hover {
    background: rgba(197, 154, 0, 0.03) !important;
    transition: all 0.2s ease;
}

.editing-mode .blog-post-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Subtle edit indicator */
.editing-mode .post-content-view::before {
    content: "✎";
    position: absolute;
    top: 8px;
    right: 12px;
    color: rgba(197, 154, 0, 0.4);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 5;
}

.editing-mode .post-content-view:hover::before {
    opacity: 0.7;
}

/* Ensure all content within post-content-view has proper colors */
.post-content-view p,
.post-content-view h1,
.post-content-view h2,
.post-content-view h3,
.post-content-view h4,
.post-content-view h5,
.post-content-view h6,
.post-content-view span,
.post-content-view div,
.post-content-view li,
.post-content-view td,
.post-content-view th {
    color: var(--text-content);
    margin-bottom: 12px;
}

.post-content-view p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-content-p) !important;
    margin-bottom: 16px;
}

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

.post-content-view a {
    color: #C59A00 !important;
}

.post-content-view a:hover {
    color: #A67C00 !important;
}

/* Removed intrusive tooltip - cleaner design */

.post-editor-container {
    overflow: hidden;
    margin: 10px 0;
    background: var(--bg-header-card);
    transition: all 0.3s ease;
}

.post-editor-container:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(197, 154, 0, 0.1);
}

.post-editor {
    width: 100% !important;
    min-height: 200px !important;
    border: none !important;
    outline: none !important;
    padding: 20px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    resize: vertical !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

.post-editor:focus {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.post-editor::placeholder {
    color: var(--text-placeholder) !important;
    font-style: italic !important;
    opacity: 0.7 !important;
}

/* Editör scrollbar stilleri */
.post-editor::-webkit-scrollbar {
    width: 8px;
}

.post-editor::-webkit-scrollbar-track {
    background: rgba(197, 154, 0, 0.1);
    border-radius: 4px;
}

.post-editor::-webkit-scrollbar-thumb {
    background: rgba(197, 154, 0, 0.3);
    border-radius: 4px;
}

.post-editor::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 154, 0, 0.5);
}

/* Hide delete buttons when not in editing mode */
body:not(.editing-mode) .post-delete-btn {
    display: none !important;
}


/* Post animations */
.new-post-animation {
    animation: newPostSlideIn 0.4s ease-out;
}

@keyframes newPostSlideIn {
    0% { 
        opacity: 0; 
        transform: translateY(-20px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.post-delete-animation {
    animation: postDeleteFade 0.3s ease-out forwards;
}

@keyframes postDeleteFade {
    0% { 
        opacity: 1; 
        transform: translateX(0);
    }
    100% { 
        opacity: 0; 
        transform: translateX(-100%);
    }
}

/* Sorting animation */
.blog-posts-container.sorting {
    pointer-events: none;
}

.blog-posts-container.sorting .blog-post-item {
    transition: all 0.3s ease;
}

/* Mobile responsive for blog posts */
@media (max-width: 768px) {
    .post-header {
        align-items: center;
        gap: 12px;
    }
    
    .post-meta {
        justify-content: space-between;
    }
    
    .post-title-input {
        max-width: 100% !important;
    }
}

/* Reset problematic z-indexes */
.app-main,
.app-wrapper,
.card {
    z-index: auto !important;
}

/* Audio Gallery Styles */
.portfolio-audio-gallery {
    width: 100%;
    max-width: 100%;
}

.audio-item {
    background: var(--bg-post);
    border-radius: 16px;
    border: none;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    padding: 12px;
    position: relative;
}

.audio-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.audio-header {
    background: var(--bg-post);
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.audio-title-container {
    flex: 1;
    position: relative;
}

.audio-title-view {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-blog-title);
    line-height: 1.3;
    transition: all 0.3s ease;
    min-height: 28px;
    display: flex;
    align-items: center;
    padding: 4px 0;
    box-sizing: border-box;
}

/* Edit mode styling for audio title */
.editing-mode .audio-title-view {
    cursor: pointer;
    transition: all 0.2s ease;
}

.editing-mode .audio-title-view:hover {
    background: rgba(197, 154, 0, 0.05);
    transition: all 0.2s ease;
}

.audio-title-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-blog-title) !important;
    width: 100% !important;
    max-width: 300px !important;
    transition: border-color 0.3s ease !important;
    box-shadow: none !important;
    min-height: 28px;
    display: none;
    align-items: center;
    box-sizing: border-box;
}

.audio-title-input.show {
    display: flex !important;
}

.audio-title-input:focus {
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.audio-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: column;
    align-items: flex-end;
}

.audio-date-container {
    order: 1;
    position: relative;
}

.audio-date-view {
    font-size: 12px;
    color: var(--text-blog-title);
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.3s ease;
    min-height: 20px;
    display: flex;
    align-items: center;
    padding: 2px 0;
    box-sizing: border-box;
}

.audio-date-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 2px 0 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: var(--text-blog-title) !important;
    width: 100% !important;
    max-width: 120px !important;
    transition: border-color 0.3s ease !important;
    box-shadow: none !important;
    min-height: 20px;
    display: none;
    align-items: center;
    box-sizing: border-box;
}

.audio-date-input.show {
    display: flex !important;
}

.audio-date-input:focus {
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.audio-delete-btn {
    background: transparent;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: absolute;
    bottom: 12px;
    right: 12px;
    transform: scale(0.8);
    z-index: 10;
    pointer-events: auto;
}

/* Dark mode override for audio delete button */
:root[data-bs-theme="dark"] .audio-delete-btn {
    color: #fff;
}

:root[data-bs-theme="dark"] .audio-delete-btn:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Show delete button on hover in editing mode */
.editing-mode .audio-item:hover .audio-delete-btn {
    transform: scale(1) !important;
}

/* Hide audio delete buttons when not in editing mode */
body:not(.editing-mode) .audio-delete-btn {
    display: none !important;
}

.audio-content {
    padding: 10px 10px 24px 10px;
    position: relative;
    z-index: 1;
}

.audio-player {
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.audio-player audio {
    width: 100%;
    height: 40px;
    outline: none;
    pointer-events: auto;
    background: var(--bg-audio-upload);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Custom Audio Player Styles */
.audio-player-custom {
    display: flex;
    gap: 12px;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.audio-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-play-btn);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px #B29C794d;
    flex-shrink: 0;
}

.audio-play-btn:hover {
    background: var(--bg-play-btn);
    transform: scale(1.05);
    box-shadow: 0 4px 12px #B29C79;
}

.audio-play-btn:active {
    transform: scale(0.95);
}

.audio-waveform {
    flex: 1;
    display: flex;
    align-items: center;
    height: 28px;
}

.waveform-svg {
    width: 100%;
    height: 28px;
    object-fit: contain;
    cursor: pointer;
    user-select: none;
}

.audio-progress-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audio-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-progress-bar);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.audio-time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-time-display);
    font-weight: 500;
}

.current-time {
    color: var(--color-accent);
    font-weight: 600;
}

.duration {
    color: var(--text-duration);
}

.wave-bar {
    transition: fill 0.2s ease;
}

.wave-bar.active {
    fill: var(--color-accent) !important;
}

.audio-element {
    display: none;
}

/* Play/Pause Icon Transitions */
.play-icon, .pause-icon {
    transition: opacity 0.2s ease;
}

.play-icon.hidden, .pause-icon.hidden {
    opacity: 0;
    position: absolute;
}

.play-icon:not(.hidden), .pause-icon:not(.hidden) {
    opacity: 1;
}

.audio-player audio::-webkit-media-controls-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
}

.audio-player audio::-webkit-media-controls-play-button {
    background-color: #6c757d;
    border-radius: 50%;
}

.audio-player audio::-webkit-media-controls-timeline {
    background-color: #dee2e6;
    border-radius: 4px;
}

.audio-player audio::-webkit-media-controls-current-time-display,
.audio-player audio::-webkit-media-controls-time-remaining-display {
    color: #495057;
    font-size: 12px;
}

.audio-player audio::-webkit-media-controls-volume-slider {
    background-color: #dee2e6;
    border-radius: 4px;
}

.audio-player audio::-webkit-media-controls-mute-button {
    background-color: #6c757d;
    border-radius: 50%;
}

.audio-duration {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    pointer-events: none;
}

.audio-duration span {
    font-size: 12px;
    color: #495057;
    font-weight: 500;
}

.empty-audio-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-nav-inactive);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    width: 100%;
}

.empty-audio-message p {
    margin: 0;
    font-style: italic;
}

.empty-media-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-nav-inactive);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    width: 100%;
}

.empty-media-message p {
    margin: 0;
    font-style: italic;
}

.empty-blog-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-nav-inactive);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    width: 100%;
}

.empty-blog-message p {
    margin: 0;
    font-style: italic;
}

/* Mobile adjustments for empty state messages */
@media (max-width: 768px) {
    .empty-media-message,
    .empty-blog-message,
    .empty-audio-message {
        width: 90%;
        margin: 0 auto;
        padding: 20px 10px;
        min-height: 100px;
    }
}

.audio-upload-item {
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: var(--bg-audio-upload);
    border: 2px dashed var(--border-audio-upload);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Only show as flex when not hidden */
.audio-upload-item:not([style*="display: none"]) {
    display: flex;
}

.audio-upload-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.upload-audio-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 20px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.upload-audio-btn:hover {
    background: rgba(197, 154, 0, 0.1);
    transform: scale(1.1);
}

.upload-audio-btn svg {
    color: var(--color-accent);
}

.upload-audio-btn svg rect {
    fill: var(--bg-header-card) !important;
}

/* Add Audio Button Styles */
.add-audio-container {
    margin-bottom: 20px;
    text-align: center;
}

.add-audio-btn {
    background: #6B7280;
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: var(--bg-header-card);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.add-audio-btn:hover {
    color: var(--color-accent-hover);
    transform: scale(1.02);
}

.add-audio-btn svg {
    opacity: 0.8;
    margin-bottom: 2px;
}

.add-audio-btn svg rect {
    fill: var(--bg-header-card) !important;
}

/* Responsive for audio */
@media (max-width: 768px) {
    .portfolio-audio-gallery {
        padding: 15px;
        gap: 12px;
        max-width: 100%;
    }
    
    .audio-item {
        padding: 12px;
    }
    
    .audio-info h4 {
        font-size: 14px;
    }
    
    .audio-info span {
        font-size: 12px;
    }
}
/* QR Code Overlay Styling */
.qr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.qr-overlay-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.qr-overlay-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.qr-overlay-close:hover {
    background: #f0f0f0;
    color: #333;
}

.qr-overlay h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.qr-overlay-icon {
    margin-bottom: 16px;
    color: var(--color-accent);
    opacity: 0.8;
}

/* Large screen responsive for tab-content */
@media (min-width: 1200px) {
    .tab-content {
        width: 120%;
        margin: 5% -10% 0 -10%;
    }

    .navigation-tabs-container {
        margin: 5% 0 0 0 !important;
    }

    .audio-player-custom {
        display: flex;
        gap: 16px;
        width: 100%;
    }

    .audio-controls {
        flex-shrink: 0;
    }

    .audio-waveform {
        height: 50px;
        width: 100%;
        flex: 1;
        min-width: 0;
    }

    .waveform-svg {
        height: 50px !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 100% !important;
        object-fit: fill;
        transform: scaleX(1.2);
        flex: 1;
    }

    .audio-progress-bar {
        height: 6px;
    }

    .audio-time-display {
        font-size: 14px;
    }
}

/* Dropdown menu styling for dark mode support */
.dropdown-divider {
    border-color: var(--border-media) !important;
    margin: 4px 0 !important;
}

.dropdown-menu {
    background: var(--bg-dropdown) !important;
    box-shadow: 0 8px 25px var(--shadow-lg) !important;
}

.dropdown-item {
    color: var(--text-nav-hover) !important;
}

.dropdown-item:hover {
    background: var(--bg-dropdown-hover) !important;
    color: var(--text-nav-hover) !important;
}

/* Dropdown toggle button dark mode support */
.btn-sm.dropdown-toggle {
    background: var(--bg-dropdown) !important;
    color: var(--text-nav-inactive) !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-sm.dropdown-toggle:hover {
    background: var(--bg-dropdown-hover) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px var(--shadow-lg) !important;
}

.btn-sm.dropdown-toggle:focus,
.btn-sm.dropdown-toggle:active {
    background: var(--bg-dropdown-hover) !important;
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px var(--shadow-md) !important;
}