﻿.editable-content {
    position: relative;
    z-index: 3;
    cursor: pointer;
    padding: 5px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    background-color: transparent;
}

.editable-content:hover {
    border-color: #e4e6ef;
    background-color: #f5f8fa;
}

.editable-content::after {
    content: 'âœŽ';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 14px;
    color: #b5b5c3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.editable-content:hover::after {
    opacity: 1;
}

.content-editor-container {
    position: relative;
    z-index: 3;
    margin: 10px 0;
    padding: 15px;
    background-color: #f5f8fa;
    border: 1px solid #e4e6ef;
    border-radius: 6px;
}

.editor-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.editor-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.editor-buttons button:first-child {
    background-color: #3699ff;
    color: white;
}

.editor-buttons button:first-child:hover {
    background-color: #187de4;
}

.editor-buttons button:last-child {
    background-color: #e4e6ef;
    color: #3f4254;
}

.editor-buttons button:last-child:hover {
    background-color: #d7dae3;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.message.success {
    background-color: #1bc5bd;
}

.message.error {
    background-color: #f64e60;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* CKEditor custom styles */
.cke_chrome {
    border: 1px solid #e4e6ef !important;
    border-radius: 6px !important;
}

.cke_top {
    background: #f5f8fa !important;
    border-bottom: 1px solid #e4e6ef !important;
}

.cke_bottom {
    background: #f5f8fa !important;
    border-top: 1px solid #e4e6ef !important;
}

/* Content Editor Styles */

/* Editable content indicators */
.editable-content {
    position: relative;
    transition: all 0.3s ease;
}

.editable-content:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.editable-content.editing {
    background-color: rgba(0, 123, 255, 0.1);
    border: 2px solid #007bff;
    border-radius: 4px;
    padding: 10px;
}

/* Content editor container */
.content-editor-container {
    position: relative;
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

/* Editor buttons */
.editor-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.editor-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.editor-buttons button:first-child {
    background-color: #007bff;
    color: white;
}

.editor-buttons button:first-child:hover {
    background-color: #0056b3;
}

.editor-buttons button:last-child {
    background-color: #6c757d;
    color: white;
}

.editor-buttons button:last-child:hover {
    background-color: #545b62;
}

/* Message notifications */
.content-editor-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

.content-editor-message.success {
    background-color: #28a745;
}

.content-editor-message.error {
    background-color: #dc3545;
}

.content-editor-message.warning {
    background-color: #ffc107;
    color: #212529;
}

.content-editor-message.info {
    background-color: #17a2b8;
}

/* Animation for message */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* CKEditor customization */
.cke_editable {
    min-height: 200px !important;
}

.cke_toolbar {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
}

/* Text editor input */
.content-editor-container input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.content-editor-container input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Loading state */
.content-editor-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   Drag and Drop Styling
   ========================================== */

/* Drag handles - only visible to admins */
body[data-is-admin="1"] .content-drag-handle {
    position: absolute;
    top: -8px;
    left: -20px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #0E86D4 0%, #7db6cc 100%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(14, 134, 212, 0.3);
}

/* Layout drag handle for moving blocks between columns */
body[data-is-admin="1"] .layout-drag-handle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body[data-is-admin="1"] .about-main-content:hover .layout-drag-handle,
body[data-is-admin="1"] .about-values-card:hover .layout-drag-handle,
body[data-is-admin="1"] .editable-content:hover .layout-drag-handle,
body[data-is-admin="1"] .content-group:hover .layout-drag-handle {
    opacity: 1;
    transform: scale(1.1);
}

body[data-is-admin="1"] .layout-drag-handle:hover {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    transform: scale(1.15);
}

body[data-is-admin="1"] .layout-drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

body[data-is-admin="1"] .layout-drag-handle i {
    color: white;
    font-size: 14px;
}

/* Dragging state for blocks */
.dragging-block {
    opacity: 0.5;
    transform: rotate(2deg);
    transition: all 0.3s ease;
}

/* Drop zone indicators for layout containers */
body[data-is-admin="1"] .about-flex-wrap {
    min-height: 100px;
    transition: all 0.3s ease;
}

body[data-is-admin="1"] .about-main-content.drop-zone-active,
body[data-is-admin="1"] .about-values-card.drop-zone-active {
    background: rgba(0, 123, 255, 0.1);
    border: 2px dashed #007bff;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 100px;
}

body[data-is-admin="1"] .about-main-content.drop-zone-active-right::after {
    content: '→ Will create right column';
    position: absolute;
    right: -150px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
}

/* Save button for layout changes */
body[data-is-admin="1"] .layout-save-button {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

body[data-is-admin="1"] .layout-save-button:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.5);
}

body[data-is-admin="1"] .layout-save-button:active {
    transform: translateY(0);
}

body[data-is-admin="1"] .layout-save-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

body[data-is-admin="1"] .layout-save-button i {
    font-size: 1rem;
}

/* Drop zone indicator for one-column sections */
body[data-is-admin="1"] section.construct.drop-zone-active-section {
    background: rgba(0, 123, 255, 0.05);
    border: 2px dashed #007bff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

body[data-is-admin="1"] .content-drag-handle:hover {
    background: linear-gradient(135deg, #7db6cc 0%, #0E86D4 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(14, 134, 212, 0.4);
}

body[data-is-admin="1"] .content-drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

body[data-is-admin="1"] .content-drag-handle i {
    color: #ffffff;
    font-size: 14px;
}

/* Content groups styling */
.content-group {
    margin-bottom: 1.5rem;
    padding: 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

/* Show drag handle on hover */
body[data-is-admin="1"] .content-group:hover .content-drag-handle {
    opacity: 1;
}

/* Enhanced hover effects for content groups */
body[data-is-admin="1"] .content-group:hover {
    background-color: rgba(14, 134, 212, 0.02);
    box-shadow: 0 2px 12px rgba(14, 134, 212, 0.08);
    transform: translateY(-1px);
}

/* Dragging state for content groups */
.content-group.dragging {
    opacity: 0.6;
    transform: rotate(2deg) scale(1.02);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #0E86D4;
}

/* Preserve styling within content groups */
.content-group .about-section-title {
    margin-bottom: 1rem;
}

.content-group .editable-content {
    margin-bottom: 0;
}

.content-group .editable-content + .editable-content {
    margin-top: 1rem;
}

/* Drop zone indicator */
.drop-zone-indicator {
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff8a80 100%);
    border-radius: 3px;
    margin: 15px 0;
    position: relative;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 15px rgba(239, 166, 0, 0.6);
}

.drop-zone-indicator::before,
.drop-zone-indicator::after {
    content: '';
    position: absolute;
    top: -6px;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(239, 166, 0, 0.7);
}

.drop-zone-indicator::before {
    left: -8px;
}

.drop-zone-indicator::after {
    right: -8px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.8;
        transform: scaleY(1.3);
    }
}

/* Drag over effects */
.content-group.drag-over {
    background-color: rgba(239, 166, 0, 0.08) !important;
    border: 2px dashed var(--primary-color);
    transform: scale(1.01);
    border-radius: 8px;
}

/* Touch device support */
@media (max-width: 768px) {
    body[data-is-admin="1"] .content-drag-handle {
        width: 36px;
        height: 36px;
        top: -10px;
        left: -25px;
        opacity: 0.8; /* More visible on mobile */
    }
    
    body[data-is-admin="1"] .content-drag-handle i {
        font-size: 16px;
    }
    
    .content-group {
        margin-bottom: 2rem;
    }
}

/* Expanded drop zones for better targeting */
.expanded-drop-zone {
    position: relative;
    margin: 2rem 0;
    z-index: 10;
}

/* Invisible padding areas for larger drop hitboxes */
.drop-zone-padding {
    height: 40px;
    width: 100%;
    position: relative;
    background: transparent;
    pointer-events: auto;
    z-index: 50;
    cursor: grab;
    transition: all 0.2s ease;
}

.drop-zone-padding-top {
    margin-top: -20px;
    margin-bottom: -20px;
}

.drop-zone-padding-bottom {
    margin-top: -20px;
    margin-bottom: -20px;
}

/* Visual feedback when hovering over padding areas */
.drop-zone-padding:hover {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(239, 166, 0, 0.1) 20%,
        rgba(239, 166, 0, 0.15) 50%,
        rgba(239, 166, 0, 0.1) 80%,
        transparent 100%
    );
    box-shadow: inset 0 2px 8px rgba(239, 166, 0, 0.2);
}

/* Enhanced drop zone indicator for active state */
.drop-zone-indicator.active {
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff8a80 50%, var(--primary-color) 100%);
    border-radius: 3px;
    margin: 20px 0;
    position: relative;
    animation: activePulse 1s infinite;
    box-shadow: 
        0 0 15px rgba(239, 166, 0, 0.8),
        0 0 30px rgba(239, 166, 0, 0.4);
    transform: scaleX(1.02);
}

.drop-zone-indicator.active::before,
.drop-zone-indicator.active::after {
    width: 20px;
    height: 20px;
    top: -7px;
    background: radial-gradient(circle, var(--primary-color) 0%, #ff8a80 100%);
    box-shadow: 
        0 0 10px rgba(239, 166, 0, 0.8),
        inset 0 0 5px rgba(255, 255, 255, 0.3);
}

.drop-zone-indicator.active::before {
    left: -10px;
}

.drop-zone-indicator.active::after {
    right: -10px;
}

@keyframes activePulse {
    0%, 100% {
        opacity: 1;
        transform: scaleX(1.02) scaleY(1);
        box-shadow: 
            0 0 15px rgba(239, 166, 0, 0.8),
            0 0 30px rgba(239, 166, 0, 0.4);
    }
    50% {
        opacity: 0.9;
        transform: scaleX(1.05) scaleY(1.4);
        box-shadow: 
            0 0 25px rgba(239, 166, 0, 1),
            0 0 50px rgba(239, 166, 0, 0.6);
    }
}

/* Enhanced content group hover during drag operations */
.expanded-drop-zone:hover {
    background-color: rgba(14, 134, 212, 0.03) !important;
    transform: translateY(-2px);
    box-shadow: 
        0 4px 15px rgba(14, 134, 212, 0.1),
        0 0 0 2px rgba(14, 134, 212, 0.1);
    border-radius: 8px;
}

/* Larger hit areas on mobile */
@media (max-width: 768px) {
    .drop-zone-padding {
        height: 60px; /* Larger touch targets */
    }
    
    .drop-zone-padding-top {
        margin-top: -30px;
        margin-bottom: -30px;
    }
    
    .drop-zone-padding-bottom {
        margin-top: -30px;
        margin-bottom: -30px;
    }
    
    .expanded-drop-zone {
        margin: 3rem 0;
    }
    
    .drop-zone-indicator.active {
        height: 8px;
        margin: 25px 0;
    }
}

/* Accessibility improvements */
.content-drag-handle:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animation for successful reorder */
.content-group.reorder-success {
    animation: reorderSuccess 0.8s ease;
}

@keyframes reorderSuccess {
    0% {
        background-color: rgba(40, 167, 69, 0.1);
        transform: scale(1);
        box-shadow: 0 0 0 rgba(40, 167, 69, 0.4);
    }
    50% {
        background-color: rgba(40, 167, 69, 0.2);
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
        box-shadow: 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Admin indicator */
.admin-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-editor-container {
        margin: 5px;
        padding: 10px;
    }
    
    .content-editor-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .editor-buttons {
        flex-direction: column;
    }
    
    .editor-buttons button {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Hide editable indicators for non-admins */
body[data-is-admin="0"] .editable-content {
    cursor: default !important;
}

body[data-is-admin="0"] .editable-content:hover {
    background-color: transparent !important;
}

/* Visual feedback for admins */
body[data-is-admin="1"] .editable-content {
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-is-admin="1"] .editable-content::after {
    content: "âœï¸";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

body[data-is-admin="1"] .editable-content:hover::after {
    opacity: 1;
}

/* ==========================================
   TinyMCE Content Styling
   ========================================== */

/* Lists - styled to match site theme with stronger specificity */
.editable-content ul,
div.editable-content ul,
section .editable-content ul {
    list-style: disc !important;
    margin: 1rem 0 !important;
    padding-left: 2rem !important;
    line-height: 1.6;
    display: block !important;
}

.editable-content ol,
div.editable-content ol,
section .editable-content ol {
    list-style: decimal !important;
    margin: 1rem 0 !important;
    padding-left: 2rem !important;
    line-height: 1.6;
    display: block !important;
}

.editable-content ul ul,
.editable-content ol ol,
.editable-content ul ol,
.editable-content ol ul {
    margin: 0.5rem 0 !important;
    padding-left: 1.5rem !important;
}

.editable-content ul ul {
    list-style-type: circle !important;
}

.editable-content ul ul ul {
    list-style-type: square !important;
}

.editable-content li,
div.editable-content li,
section .editable-content li {
    margin-bottom: 0.5rem;
    color: #333;
    display: list-item !important;
    list-style-position: outside !important;
}

.editable-content li:last-child {
    margin-bottom: 0;
}

/* Tables - enhanced styling with better colors and alternating rows */
.editable-content table,
div.editable-content table,
section .editable-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: #fff;
    border: 2px solid #0E86D4;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(14, 134, 212, 0.15);
    font-family: 'Raleway', sans-serif;
}

.editable-content table th,
div.editable-content table th,
section .editable-content table th {
    background: linear-gradient(135deg, #0E86D4 0%, #7db6cc 100%);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 1.2rem 1rem;
    border-bottom: 3px solid #0a6bb3;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editable-content table th:last-child {
    border-right: none;
}

.editable-content table td,
div.editable-content table td,
section .editable-content table td {
    padding: 1rem;
    border-bottom: 1px solid #e8f4f8;
    border-right: 1px solid #e8f4f8;
    vertical-align: top;
    transition: background-color 0.3s ease;
}

.editable-content table td:last-child {
    border-right: none;
}

/* Alternating row colors */
.editable-content table tbody tr:nth-child(even),
div.editable-content table tbody tr:nth-child(even),
section .editable-content table tbody tr:nth-child(even) {
    background-color: #f8fbfc;
}

.editable-content table tbody tr:nth-child(odd),
div.editable-content table tbody tr:nth-child(odd),
section .editable-content table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.editable-content table tbody tr:hover,
div.editable-content table tbody tr:hover,
section .editable-content table tbody tr:hover {
    background-color: #e6f3ff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 134, 212, 0.1);
}

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

/* Responsive tables */
@media (max-width: 768px) {
    .editable-content table {
        font-size: 0.875rem;
    }
    
    .editable-content table th,
    .editable-content table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Paragraphs and text formatting */
.editable-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #333;
}

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

/* Headings within content */
.editable-content h1,
.editable-content h2,
.editable-content h3,
.editable-content h4,
.editable-content h5,
.editable-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: #212529;
}

.editable-content h1:first-child,
.editable-content h2:first-child,
.editable-content h3:first-child,
.editable-content h4:first-child,
.editable-content h5:first-child,
.editable-content h6:first-child {
    margin-top: 0;
}

.editable-content h1 { font-size: 2rem; color: var(--primary-color); }
.editable-content h2 { font-size: 1.75rem; color: var(--primary-color); }
.editable-content h3 { font-size: 1.5rem; }
.editable-content h4 { font-size: 1.25rem; }
.editable-content h5 { font-size: 1.125rem; }
.editable-content h6 { font-size: 1rem; }

/* Links */
.editable-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.editable-content a:hover {
    color: #222;
    text-decoration: underline;
}

/* Images */
.editable-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Blockquotes */
.editable-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary-color);
    background-color: #f8f9fa;
    border-radius: 0 0.375rem 0.375rem 0;
    font-style: italic;
    color: #495057;
}

.editable-content blockquote p {
    margin-bottom: 0;
}

/* Code formatting */
.editable-content code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

.editable-content pre {
    background-color: #f8f9fa;
    color: #495057;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #dee2e6;
}

.editable-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* Horizontal rules */
.editable-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid #dee2e6;
    opacity: 0.5;
}

/* Strong and emphasis */
.editable-content strong,
.editable-content b {
    font-weight: 600;
    color: #212529;
}

.editable-content em,
.editable-content i {
    font-style: italic;
}

/* Additional overrides to ensure list styles work */
.editable-content ul li:before,
.editable-content ol li:before {
    content: none !important;
}

/* Force list item markers to show */
.editable-content ul li {
    list-style: disc !important;
    margin-left: 0 !important;
    text-indent: 0 !important;
}

.editable-content ol li {
    list-style: decimal !important;
    margin-left: 0 !important;
    text-indent: 0 !important;
}

.editable-content ul ul li {
    list-style: circle !important;
}

.editable-content ul ul ul li {
    list-style: square !important;
}

/* Override any potential CSS resets */
.editable-content ul,
.editable-content ol {
    list-style-position: outside !important;
    margin-left: 0 !important;
    padding-left: 2rem !important;
}

/* Ensure proper list item display */
.editable-content li {
    position: relative !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Force visibility of list markers */
.editable-content ul {
    overflow: visible !important;
}

.editable-content ol {
    overflow: visible !important;
}

/* Content Management Dashboard Styles */
#contentEditor .list-group-item {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

#contentEditor .content-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.25rem;
}

#contentEditor .content-preview img {
    max-width: 100%;
    height: auto;
}

#contentEditor .btn-group {
    margin-left: 1rem;
}

/* CKEditor Customization */
.ck-editor__editable {
    min-height: 200px;
}

.ck-editor__editable_inline {
    padding: 1rem;
}

/* Modal Styles */
.modal-lg {
    max-width: 800px;
}

.modal-body {
    padding: 1.5rem;
}

/* Preview Styles */
.content-preview h1,
.content-preview h2,
.content-preview h3,
.content-preview h4,
.content-preview h5,
.content-preview h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.content-preview p {
    margin-bottom: 1rem;
}

.content-preview ul,
.content-preview ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-preview img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   Block Management UI (Add/Delete Buttons)
   ========================================== */

/* Add Block Button */
.content-add-block-btn {
    position: absolute;
    top: -12px;
    right: 10px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
    z-index: 101;
    opacity: 0.8;
}

body[data-is-admin="1"] .content-group .content-add-block-btn,
body[data-is-admin="1"] section .content-add-block-btn,
body[data-is-admin="1"] .about-flex-wrap .content-add-block-btn {
    opacity: 0.8;
}

.content-add-block-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    opacity: 1 !important;
}

.content-add-block-btn:active {
    transform: scale(0.95);
}

/* Delete Block Button */
.content-delete-block-btn {
    position: absolute;
    top: -12px;
    right: 50px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
    opacity: 0.8;
}

/* Ensure trash icon is white, not red */
.content-delete-block-btn i,
.content-delete-block-btn svg {
    color: white !important;
    fill: white !important;
}

/* Always show delete buttons (no hover required) */
body[data-is-admin="1"] .content-delete-block-btn {
    opacity: 0.8 !important;
    display: flex !important;
}

body[data-is-admin="1"] .content-delete-block-btn:hover {
    opacity: 1 !important;
}

/* Special positioning for buttons in headers (spans inside headers) */
body[data-is-admin="1"] h1 .editable-content .content-delete-block-btn,
body[data-is-admin="1"] h2 .editable-content .content-delete-block-btn,
body[data-is-admin="1"] h3 .editable-content .content-delete-block-btn,
body[data-is-admin="1"] .about-section-title .editable-content .content-delete-block-btn {
    top: -8px;
    right: 50px;
}

/* Ensure editable content elements can position buttons */
body[data-is-admin="1"] .editable-content {
    position: relative;
}

/* Ensure headers can contain relatively positioned children */
body[data-is-admin="1"] h1,
body[data-is-admin="1"] h2,
body[data-is-admin="1"] h3,
body[data-is-admin="1"] .about-section-title {
    position: relative;
}

.content-delete-block-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    opacity: 1 !important;
}

.content-delete-block-btn:active {
    transform: scale(0.95);
}

/* Layout Control Button */
.content-layout-control-btn {
    position: absolute;
    top: -12px;
    left: 10px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
    opacity: 0;
}

body[data-is-admin="1"] .about-flex-wrap:hover .content-layout-control-btn,
body[data-is-admin="1"] .content-group:hover .content-layout-control-btn {
    opacity: 1;
}

.content-layout-control-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.content-layout-control-btn:active {
    transform: scale(0.95);
}

/* Layout Control Panel */
.content-layout-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    min-width: 400px;
    max-width: 90vw;
}

.content-layout-panel h3 {
    margin: 0 0 20px 0;
    color: #007bff;
    font-size: 1.5rem;
}

.content-layout-panel .layout-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-layout-panel .layout-type-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.content-layout-panel .layout-type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.content-layout-panel .layout-type-btn.active {
    border-color: #007bff;
    background: #e7f3ff;
    color: #007bff;
}

.content-layout-panel .layout-type-btn:hover {
    border-color: #007bff;
}

.content-layout-panel .column-width-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.content-layout-panel .column-width-btn {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.content-layout-panel .column-width-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.content-layout-panel .column-width-btn:hover {
    border-color: #007bff;
}

.content-layout-panel .panel-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

.content-layout-panel .panel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.content-layout-panel .panel-btn-primary {
    background: #007bff;
    color: white;
}

.content-layout-panel .panel-btn-primary:hover {
    background: #0056b3;
}

.content-layout-panel .panel-btn-secondary {
    background: #6c757d;
    color: white;
}

.content-layout-panel .panel-btn-secondary:hover {
    background: #545b62;
}

.content-layout-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Add Block Modal */
.content-add-block-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    min-width: 400px;
    max-width: 90vw;
}

.content-add-block-modal h3 {
    margin: 0 0 20px 0;
    color: #28a745;
    font-size: 1.5rem;
}

.content-add-block-modal .form-group {
    margin-bottom: 16px;
}

.content-add-block-modal label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.content-add-block-modal input,
.content-add-block-modal select,
.content-add-block-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
}

.content-add-block-modal textarea {
    min-height: 100px;
    resize: vertical;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .content-add-block-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        right: 10px;
        opacity: 0.8;
    }
    
    .content-delete-block-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        right: 55px; /* Adjusted to account for larger button size and spacing */
        opacity: 0.8;
    }
    
    .content-layout-control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        opacity: 0.8;
    }
    
    .content-layout-panel,
    .content-add-block-modal {
        min-width: 90vw;
        padding: 20px;
    }
    
    .content-layout-panel .column-width-presets {
        grid-template-columns: repeat(2, 1fr);
    }
}

 
