/* ===== Variables CSS ===== */
:root {
    --color-bg-page: #ddd6fe;
    --color-bg-card: #e5e7eb;
    --color-accent: #7e22ce;
    --color-accent-hover: #6b21a8;
    --color-accent-active: #581c87;
    --color-accent-rgb: 0, 0, 0;
}

/* ===== Estilos Base ===== */
html { scroll-padding-top: 5rem; }
body { font-family: 'Inter', sans-serif; background-color: var(--color-bg-page); color: #1f2937; }
h1, h2, h3, h4, .font-serif { font-family: 'Playfair Display', serif; }
.hidden { display: none; }
.page { animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Componentes de Formulario ===== */
.rich-text-editor { 
    border: 1px solid #D1D5DB; 
    border-radius: 0.375rem; 
    padding: 0.75rem; 
    min-height: 150px; 
    background-color: #FFFFFF; 
    border-top-left-radius: 0; 
    border-top-right-radius: 0; 
}

/* Estilos para listas dentro del editor Y contenido renderizado */
.rich-text-editor ul,
.rich-text-editor ol,
.rich-text-content ul,
.rich-text-content ol {
    margin-left: 0;
    padding-left: 2rem;
    list-style-position: inside;
}

.rich-text-editor ul,
.rich-text-content ul {
    list-style-type: disc;
}

.rich-text-editor ol,
.rich-text-content ol {
    list-style-type: decimal;
}

.rich-text-editor li,
.rich-text-content li {
    margin-bottom: 0.25rem;
}

/* --- Estilos de viñetas personalizadas --- */
/* 1. Viñeta "Ninguna" */
.rich-text-editor .lista-ninguna,
.rich-text-content .lista-ninguna {
    list-style-type: none;
}

/* 2. Viñeta "Círculo" (Disc) */
.rich-text-editor .lista-circulo,
.rich-text-content .lista-circulo {
    list-style-type: disc;
}

/* 3. Viñeta "Flecha" (Personalizada) */
.rich-text-editor .lista-flecha,
.rich-text-content .lista-flecha {
    list-style-type: none;
    padding-left: 1.2em;
}

.rich-text-editor .lista-flecha li::before,
.rich-text-content .lista-flecha li::before {
    content: '►';
    color: currentColor;
    display: inline-block;
    width: 1.2em;
    margin-left: -1.2em;
    margin-right: 0.3em;
}

/* 4. Viñeta "Check" (Personalizada) */
.rich-text-editor .lista-check,
.rich-text-content .lista-check {
    list-style-type: none;
    padding-left: 1.2em;
}

.rich-text-editor .lista-check li::before,
.rich-text-content .lista-check li::before {
    content: '✓';
    color: currentColor;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Ocultar marcadores por defecto en listas anidadas con clases personalizadas */
.rich-text-editor .lista-flecha ul,
.rich-text-editor .lista-check ul,
.rich-text-content .lista-flecha ul,
.rich-text-content .lista-check ul {
    list-style-type: none;
}

/* Asegurar que las listas anidadas dentro de listas personalizadas también sean personalizadas */
.rich-text-editor .lista-flecha li ul,
.rich-text-content .lista-flecha li ul {
    list-style-type: none;
    padding-left: 1.2em;
}

.rich-text-editor .lista-check li ul,
.rich-text-content .lista-check li ul {
    list-style-type: none;
    padding-left: 1.2em;
}

/* Estilo para enlaces en el editor y contenido renderizado */
.rich-text-editor a,
.rich-text-content a {
    color: #0000EE;
    text-decoration: underline;
}

.rich-text-editor a:visited,
.rich-text-content a:visited {
    color: #551A8B;
}
input[type="file"]::file-selector-button { 
    background-color: var(--color-accent); 
    color: white; 
    border: none; 
    padding: 0.5rem 1rem; 
    border-radius: 0.375rem; 
    cursor: pointer; 
    transition: background-color 0.2s; 
}
input[type="file"]::file-selector-button:hover { background-color: var(--color-accent-hover); }
.prose { max-width: 65ch; margin-left: auto; margin-right: auto; text-align: left; }
.preserve-lines { white-space: pre-wrap; }

/* ===== Notificaciones ===== */
#notification { 
    position: fixed; 
    top: 1.5rem; 
    right: 1.5rem; 
    padding: 1rem 1.5rem; 
    border-radius: 0.5rem; 
    color: white; 
    z-index: 1000; 
    transform: translateX(200%); 
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}
#notification.show { transform: translateX(0); }

/* ===== Navegación Admin ===== */
.admin-nav-link { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    border-left: 4px solid transparent; 
    transition: all 0.2s ease-in-out; 
}
.admin-nav-link.active { 
    background-color: #EDE9FE; 
    color: var(--color-accent); 
    border-left-color: var(--color-accent); 
    font-weight: 600; 
}
.admin-nav-link.active svg { stroke: var(--color-accent); }

/* ===== Botones y Enlaces ===== */
.main-nav-link.active { background-color: var(--color-accent-active) !important; cursor: default; }
.btn-accent { background-color: var(--color-accent); }
.btn-accent:hover { background-color: var(--color-accent-hover); }
.main-nav-link, .mobile-nav-link, #login-form button, #admin-panel button, #admin-content-area button { 
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, box-shadow 0.2s; 
}
.main-nav-link:hover:not(.active), .mobile-nav-link:hover, #login-form button:hover, 
#admin-panel button:hover, #admin-content-area button:hover { transform: translateY(-2px); }
.delete-portfolio-item:hover, .delete-event-item:hover, .admin-nav-link:hover, 
.delete-contact-item:hover, .delete-cv-item:hover, .delete-doc-item:hover { transform: none; }
.main-nav-link:active, .mobile-nav-link:active, #login-form button:active, 
#admin-panel button:active, #admin-content-area button:active { 
    transform: translateY(0) scale(0.97); 
    transition-duration: 0.05s; 
}
#gallery-grid img:active { transform: scale(1.02); }

/* ===== Sombras ===== */
.shadow-md { box-shadow: 0 4px 6px -1px rgba(var(--color-accent-rgb), 0.08), 0 2px 4px -2px rgba(var(--color-accent-rgb), 0.08); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(var(--color-accent-rgb), 0.1), 0 4px 6px -4px rgba(var(--color-accent-rgb), 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(var(--color-accent-rgb), 0.15), 0 8px 10px -6px rgba(var(--color-accent-rgb), 0.15); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(var(--color-accent-rgb), 0.25); }

/* ===== Animaciones de Scroll ===== */
.scroll-animate { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.scroll-animate.visible { opacity: 1; transform: translateY(0); }

/* ===== Lightbox ===== */
#lightbox, #video-lightbox { 
    z-index: 999; 
    background-color: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(4px); 
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; 
}
#lightbox.hidden, #video-lightbox.hidden { opacity: 0; visibility: hidden; }
#lightbox-content { 
    max-width: 90vw; 
    max-height: 85vh; 
    transform: scale(0.95); 
    transition: transform 0.3s ease-in-out; 
}
#lightbox:not(.hidden) #lightbox-content { transform: scale(1); }
#video-lightbox-content iframe, #video-lightbox-content video { 
    width: 100%; 
    height: 100%; 
    border-radius: 0.5rem; 
}

/* ===== Video Thumbnails ===== */
.video-thumbnail { 
    cursor: pointer; 
    position: relative; 
    overflow: hidden; 
    border-radius: 0.5rem; 
    box-shadow: 0 4px 6px -1px rgba(var(--color-accent-rgb), 0.08), 0 2px 4px -2px rgba(var(--color-accent-rgb), 0.08); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
.video-thumbnail:hover { 
    transform: scale(1.03); 
    box-shadow: 0 10px 15px -3px rgba(var(--color-accent-rgb), 0.1), 0 4px 6px -4px rgba(var(--color-accent-rgb), 0.1); 
}
.video-thumbnail::after { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.3); 
    opacity: 1; 
    transition: opacity 0.3s ease; 
}
.video-thumbnail:hover::after { opacity: 0; }
.play-icon { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 64px; 
    height: 64px; 
    background-color: rgba(255, 255, 255, 0.9); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    pointer-events: none; 
    transition: transform 0.3s ease, background-color 0.3s ease; 
}
.video-thumbnail:hover .play-icon { 
    transform: translate(-50%, -50%) scale(1.1); 
    background-color: white; 
}
.play-icon svg { 
    width: 32px; 
    height: 32px; 
    color: var(--color-accent); 
    margin-left: 4px; 
}

/* ===== Fondo Animado ===== */
#animated-bg { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: -1; 
    overflow: hidden; 
}
.blob { 
    position: absolute; 
    border-radius: 50%; 
    background: rgba(var(--color-accent-rgb), 0.2); 
    filter: blur(80px); 
    will-change: transform; 
    animation: move 20s infinite alternate ease-in-out; 
}
@keyframes move { 
    from { transform: translate(-10vw, -10vh) rotate(-90deg) scale(1); } 
    to { transform: translate(10vw, 10vh) rotate(90deg) scale(1.2); } 
}

/* ===== Galería Masonry ===== */
#gallery-grid { column-count: 2; column-gap: 1rem; }
@media (min-width: 768px) { #gallery-grid { column-count: 4; } }

/* ===== Botón Volver Arriba ===== */
#back-to-top-btn { 
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s; 
    transform: translateY(10px); 
}
#back-to-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top-btn:hover { background-color: var(--color-accent-hover); }

/* ===== Elementos Arrastrables ===== */
.card-background { background-color: var(--color-bg-card); }
.sortable-item { cursor: grab; }
.sortable-item:active { cursor: grabbing; }
.sortable-ghost { opacity: 0.4; background-color: #c7d2fe; border: 2px dashed var(--color-accent); }

/* ===== Modal de Confirmación ===== */
#confirm-modal { transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out; }
#confirm-modal.hidden { opacity: 0; visibility: hidden; }
#confirm-modal-content { transform: scale(0.95); transition: transform 0.2s ease-in-out; }
#confirm-modal:not(.hidden) #confirm-modal-content { transform: scale(1); }
#confirm-modal-confirm { background-color: #ef4444; }
#confirm-modal-confirm:hover { background-color: #dc2626; }

/* ===== Editor de Texto ===== */
.editor-toolbar { 
    background-color: #f9fafb; 
    border: 1px solid #d1d5db; 
    border-bottom: none; 
    padding: 0.5rem; 
    border-top-left-radius: 0.375rem; 
    border-top-right-radius: 0.375rem; 
    display: flex; 
    gap: 0.25rem; 
    flex-wrap: wrap; 
    align-items: center;
}
.editor-toolbar button { 
    background-color: #fff; 
    border: 1px solid #d1d5db; 
    border-radius: 0.25rem; 
    padding: 0.25rem 0.5rem; 
    cursor: pointer; 
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.editor-toolbar button:hover { 
    background-color: #f3f4f6; 
    border-color: #9ca3af;
    transform: none; 
}
.editor-toolbar button.active { 
    background-color: #EDE9FE; 
    color: var(--color-accent); 
    border-color: var(--color-accent); 
}
.editor-toolbar-separator {
    width: 1px;
    height: 24px;
    background-color: #d1d5db;
    margin: 0 2px;
}
.editor-toolbar-select-container {
    position: relative;
}
.editor-toolbar-select {
    padding: 6px 24px 6px 8px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 6px center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    min-width: 100px;
    height: 32px;
    appearance: none;
}
.editor-toolbar-select:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Selectores de color estilo Office */
.editor-toolbar-color-palette {
    position: relative;
    display: inline-block;
}
.editor-toolbar-color-btn {
    padding: 4px 8px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    transition: all 0.15s;
}
.editor-toolbar-color-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}
.color-indicator {
    width: 18px;
    height: 18px;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    display: inline-block;
}
.color-palette-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 12px;
    z-index: 1000;
    min-width: 220px;
    display: none;
}
.color-palette-dropdown.show {
    display: block;
}
.color-palette-section {
    margin-bottom: 12px;
}
.color-palette-section:last-of-type {
    margin-bottom: 8px;
}
.color-palette-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.color-swatch {
    width: 24px;
    height: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}
.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-color: #9ca3af;
    z-index: 1;
}
.more-colors-btn {
    width: 100%;
    padding: 8px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #374151;
    transition: all 0.15s;
    position: relative;
}
.more-colors-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}
.more-colors-btn svg {
    width: 16px;
    height: 16px;
}
.hidden-color-input {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 36px;
    opacity: 0;
    cursor: pointer;
}

/* Selectores de listas estilo Office */
.editor-toolbar-list-selector {
    position: relative;
    display: inline-block;
}
.editor-toolbar-list-btn {
    padding: 4px 8px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 32px;
    transition: all 0.15s;
}
.editor-toolbar-list-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}
.list-style-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px;
    z-index: 1000;
    min-width: 360px;
    display: none;
}
.list-style-dropdown.show {
    display: block;
}
.list-dropdown-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}
.list-style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.list-style-option {
    padding: 16px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    font-size: 14px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.list-style-option:hover {
    background-color: #f9fafb;
    border-color: var(--color-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.list-preview {
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-line;
    font-family: monospace;
}
.form-edit-mode { 
    border: 2px solid var(--color-accent); 
    box-shadow: 0 0 15px rgba(var(--color-accent-rgb), 0.2); 
}
.preview-container { margin-bottom: 1rem; }
.preview-image { 
    max-width: 150px; 
    max-height: 150px; 
    border-radius: 0.5rem; 
    border: 2px solid #ddd; 
}

/* ===== Spinners ===== */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { 
    border: 4px solid rgba(0,0,0,0.1); 
    border-left-color: var(--color-accent); 
    border-radius: 50%; 
    width: 2.5rem; 
    height: 2.5rem; 
    animation: spin 1s linear infinite; 
}
.btn-spinner { 
    border: 3px solid rgba(255,255,255,0.3); 
    border-left-color: #fff; 
    border-radius: 50%; 
    width: 1.25rem; 
    height: 1.25rem; 
    animation: spin 0.8s linear infinite; 
}

/* ===== Repositorio de Documentos ===== */
.docs-container .breadcrumb-link { color: var(--color-accent); font-weight: 500; }
.docs-container .breadcrumb-link:hover { text-decoration: underline; }
.docs-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.doc-item { transition: transform 0.2s, box-shadow 0.2s; }
.doc-item:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); 
}

/* ===== Encabezado de Documentos ===== */
#docs-breadcrumb { 
    display: flex; 
    align-items: center; 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    padding-bottom: 5px; 
}
.breadcrumb-part { 
    display: flex; 
    align-items: center; 
    gap: 0.25rem; 
    padding: 0.25rem 0.5rem; 
    border-radius: 0.375rem; 
    font-weight: 500; 
    white-space: nowrap; 
    transition: background-color 0.2s; 
}
.breadcrumb-link { color: #4b5563; cursor: pointer; }
.breadcrumb-link:hover { background-color: #f3f4f6; }
.breadcrumb-current { color: var(--color-accent); background-color: #EDE9FE; }
.breadcrumb-separator { color: #9ca3af; }

/* ===== SIDEBAR MENU LATERAL ===== */
#sidebar {
    --sidebar-bg: rgba(30, 30, 42, 0.6);
    --sidebar-border: rgba(255, 255, 255, 0.1);
    --accent-color: var(--color-accent);
    --text-main: #e0e0e0;
    --text-subtle: #a0a0a0;
    --highlighter-gradient: linear-gradient(90deg, rgba(130, 114, 255, 0.2) 0%, transparent 100%);
    
    width: 256px;
    position: fixed;
    height: 100%;
    left: 0;
    top: 0;
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--sidebar-border);
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 40;
}

#sidebar.light-theme {
    --sidebar-bg: #e5e7eb;
    --sidebar-border: #d1d5db;
    --text-main: #1f2937;
    --text-subtle: #6b7280;
    --highlighter-gradient: linear-gradient(90deg, rgba(108, 99, 255, 0.15) 0%, transparent 100%);
}

#main-site-with-sidebar {
    margin-left: 256px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    width: calc(100% - 256px);
    position: relative;
}

.page:not(.hidden) {
    display: block;
}

#sidebar-nav { position: relative; }

#nav-highlighter {
    position: absolute;
    left: 0;
    width: calc(100% - 16px);
    margin: 0 8px;
    background: var(--highlighter-gradient);
    border-radius: 6px;
    transition: top 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    z-index: 0;
    opacity: 0;
}

.sidebar-nav-link {
    color: var(--text-main);
    transition: color 0.2s ease, transform 0.2s ease;
    border-left: 4px solid transparent;
    z-index: 1;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.sidebar-nav-link:hover {
    transform: translateX(5px);
}

.sidebar-nav-link svg {
    color: var(--text-subtle);
    transition: color 0.2s ease;
}

.sidebar-nav-link:hover svg {
    color: var(--accent-color);
}

.sidebar-nav-link.active {
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

.sidebar-nav-link.active svg {
    color: var(--accent-color);
}

.sidebar-section-title {
    color: var(--text-subtle);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 1rem 0.5rem 0.25rem;
}

#sidebar-search {
    position: relative;
}

#sidebar-search input {
    width: 100%;
    padding: 0.375rem 0.75rem 0.375rem 2rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: 0;
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    border: 1px solid var(--sidebar-border);
}

#sidebar-search input:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--accent-color);
}

#sidebar-search svg {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--text-subtle);
}

#mobile-sidebar-btn {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: var(--color-accent);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

#mobile-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 30;
}

.submenu-arrow {
    color: var(--text-subtle);
    transition: transform 0.3s ease;
}

.sidebar-nav-link.submenu-open .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    padding-left: 1.5rem;
}

.sidebar-submenu.open {
    display: block;
}

#sidebar-logo {
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

#sidebar-logo svg {
    color: var(--accent-color);
    width: 2rem;
    height: 2rem;
}

#theme-switcher-sidebar {
    cursor: pointer;
}

#salir-link-sidebar {
    background-color: #DC4C64 !important;
    color: white !important;
}

#salir-link-sidebar:hover {
    background-color: #c3445a !important;
    transform: translateX(0px) !important;
}

#salir-link-sidebar svg {
    color: white !important;
}

@media (max-width: 1023px) {
    #sidebar {
        transform: translateX(-100%);
    }
    
    #sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
    }
    
    #main-site-with-sidebar {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    #mobile-sidebar-btn {
        display: block;
    }
    
    #mobile-sidebar-overlay.show {
        display: block;
    }
    
    /* Ajustar márgenes del main para que las tarjetas no toquen los bordes */
    #main-site-with-sidebar main {
        padding: 2rem 1rem !important;
        max-width: none !important;
    }

    /* Ajustes para tarjetas en móvil - tarjetas más anchas */
    #main-site-with-sidebar main .card-background,
    .container.mx-auto.card-background {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 0 auto !important;
        padding: 1.5rem 1rem !important;
    }

    /* Ajustar tamaño de fuentes en móvil */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.875rem !important;
    }
    
    /* Ajustar imágenes para móvil */
    #main-photo {
        max-width: 200px !important;
    }
    
    /* Ajustar galería en móvil */
    #gallery-grid {
        column-count: 2 !important;
        column-gap: 0.5rem;
    }
    
    /* Notificaciones en móvil */
    #notification {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
    }
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 640px) {
    #gallery-grid {
        column-count: 1 !important;
    }

    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Asegurar márgenes consistentes también en pantallas muy pequeñas */
    #main-site-with-sidebar main {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Ajustar márgenes de tarjetas para pantallas muy pequeñas */
    .card-background {
        margin: 0 0.75rem !important;
    }
}

/* Content transitions - Slider style */
.content-section {
    position: relative;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    display: none; /* Todas ocultas por defecto */
}

.content-section.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}

.content-section.slide-in-right {
    transform: translateX(100%);
    opacity: 0;
}

.content-section.active-section {
    display: block; /* Mostrar solo la activa */
    transform: translateX(0);
    opacity: 1;
}
