/* Estilos básicos para el blog */

.template-blog-index .card,
.template-blog-list .card,
.template-blog-page .card {
    transition: transform 0.3s ease;
}

.template-blog-index .card:hover,
.template-blog-list .card:hover,
.template-blog-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Estilos para tarjetas clickables */
.card.clickable {
    cursor: pointer;
}

.card.clickable:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Desactivar efecto hover y sombras para cards en el sidebar */
.sidebar .card {
    box-shadow: none;
}

.sidebar .card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.template-blog-page img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.blog-post h1 {
    color: var(--bs-heading-color);
    margin-bottom: 1rem;
}

.blog-post .featured-image {
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.blog-post .lead {
    color: var(--bs-body-color);
    font-size: 1.15rem;
    border-left: 3px solid var(--bs-link-color);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.blog-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--bs-body-color);
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    color: var(--bs-heading-color);
}

.blog-content blockquote {
    border-left: 4px solid var(--bs-border-color);
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-style: italic;
    margin: 1.5rem 0;
    background-color: var(--bs-card-cap-bg);
    border-radius: 0.25rem;
    color: var(--bs-body-color);
}

.blog-content img {
    margin: 1.5rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Estilos para las etiquetas y categorías */
.badge {
    margin-right: 5px;
    text-decoration: none;
}

/* Estilos para el sidebar */
.sidebar .card-header {
    font-weight: bold;
    color: var(--bs-heading-color);
}

.sidebar .badge {
    transition: all 0.3s;
    display: inline-block;
    padding: 0.4em 0.8em;
    font-size: 0.85em;
}

.sidebar .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* Paginación */
.pagination .page-link {
    color: var(--bs-body-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-link-color);
    border-color: var(--bs-link-color);
    color: white;
}

/* Enhanced social sharing section */
.social-share {
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--bs-card-cap-bg) 0%, rgba(var(--bs-primary-rgb), 0.05) 100%);
    border-radius: 0.75rem;
    border: 1px solid var(--bs-border-color);
    margin: 2rem 0;
}

.social-share h5 {
    color: var(--bs-heading-color);
    margin-bottom: 0.5rem;
}

.social-share h5 i {
    color: var(--bs-primary);
    margin-right: 0.5rem;
}

/* Enhanced social sharing buttons - Gray theme */
.social-share a,
.social-share .btn-copy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--bs-card-cap-bg);
    color: var(--bs-body-color);
    border-radius: 50%;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--bs-border-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.social-share .btn-copy-link {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* Hover effects - subtle platform colors on hover only */
.social-share a:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    color: white;
}

.social-share a[title*="Facebook"]:hover {
    background-color: #1877f2;
    border-color: #1877f2;
}

.social-share a[title*="Twitter"]:hover,
.social-share a[title*="X"]:hover {
    background-color: #1da1f2;
    border-color: #1da1f2;
}

.social-share a[title*="LinkedIn"]:hover {
    background-color: #0077b5;
    border-color: #0077b5;
}

.social-share a[title*="WhatsApp"]:hover {
    background-color: #25d366;
    border-color: #25d366;
}

.social-share a[title*="Telegram"]:hover {
    background-color: #0088cc;
    border-color: #0088cc;
}

.social-share .btn-copy-link:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Active states */
.social-share .btn-copy-link.copied {
    background: linear-gradient(135deg, var(--bs-success) 0%, #4caf50 100%);
    color: white;
    border-color: var(--bs-success);
    transform: scale(1.1);
    animation: pulseSuccess 0.6s ease-out;
}

.social-share .btn-copy-link.copy-error {
    background: linear-gradient(135deg, var(--bs-danger) 0%, #f44336 100%);
    color: white;
    border-color: var(--bs-danger);
    transform: scale(1.05);
    animation: shakeError 0.6s ease-out;
}

/* Animations */
@keyframes pulseSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); box-shadow: 0 0 20px rgba(40, 167, 69, 0.6); }
    100% { transform: scale(1.1); }
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Icon sizing */
.social-share .bi {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.social-share a:hover .bi,
.social-share .btn-copy-link:hover .bi {
    transform: scale(1.1);
}

/* Enhanced mobile responsive styles for social sharing */
@media (max-width: 768px) {
    .social-share {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0;
    }
    
    .social-share a,
    .social-share .btn-copy-link {
        width: 45px;
        height: 45px;
        margin: 0.3rem;
    }
    
    .social-share .bi {
        font-size: 1.2rem;
    }
    
    .social-share .d-flex {
        gap: 0.5rem !important;
    }
    
    .social-share h5 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .social-share {
        padding: 1rem 0.5rem;
    }
    
    .social-share a,
    .social-share .btn-copy-link {
        width: 40px;
        height: 40px;
        margin: 0.2rem;
    }
    
    .social-share .bi {
        font-size: 1rem;
    }
    
    .social-share h5 {
        font-size: 1rem;
    }
    
    .social-share p.text-muted {
        font-size: 0.85rem;
    }
}

/* Dark mode enhancements for social sharing - Gray theme */
[data-bs-theme="dark"] .social-share {
    background: linear-gradient(135deg, var(--bs-card-cap-bg) 0%, rgba(var(--bs-primary-rgb), 0.1) 100%);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .social-share a {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .social-share .btn-copy-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

[data-bs-theme="dark"] .social-share a:hover,
[data-bs-theme="dark"] .social-share .btn-copy-link:hover {
    box-shadow: 0 10px 25px rgba(255,255,255,0.1);
}

/* Autor del post */
.author-info {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--bs-card-cap-bg);
    border-radius: 0.5rem;
    margin: 2rem 0;
    color: var(--bs-body-color);
}

.author-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1.5rem;
}

.author-info h5 {
    margin-bottom: 0.3rem;
    color: var(--bs-heading-color);
}

/* Responsive para dispositivos móviles */
@media (max-width: 576px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .sidebar {
        margin-top: 2rem;
    }
    
    .blog-post .lead {
        font-size: 1rem;
    }
    
    .blog-content {
        font-size: 1rem;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .author-info img {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Dark mode specific overrides for better readability */
[data-bs-theme="dark"] .blog-content {
    /* Slightly lighter than default dark mode text for better readability */
    color: #f0f0f0;
}

[data-bs-theme="dark"] .blog-post h1 {
    color: #ffffff;
}

[data-bs-theme="dark"] .blog-content h2,
[data-bs-theme="dark"] .blog-content h3,
[data-bs-theme="dark"] .blog-content h4 {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .blog-post .lead {
    color: #e1e1e1;
    border-left-color: #6ea8fe;
}

/* Make code blocks more readable in dark mode */
[data-bs-theme="dark"] .blog-content pre,
[data-bs-theme="dark"] .blog-content code {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e1e1e1;
}

/* Enhance blockquote visibility in dark mode */
[data-bs-theme="dark"] .blog-content blockquote {
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: #6ea8fe;
}

/* Fix links inside blog content for dark mode */
[data-bs-theme="dark"] .blog-content a {
    color: var(--bs-link-color);
    text-decoration: underline;
}

[data-bs-theme="dark"] .blog-content a:hover {
    color: var(--bs-link-hover-color);
}

/* Ensure form elements in blog content are visible */
[data-bs-theme="dark"] .blog-content input,
[data-bs-theme="dark"] .blog-content textarea,
[data-bs-theme="dark"] .blog-content select {
    background-color: #333;
    border-color: #555;
    color: #e1e1e1;
}

/* Ensure Wagtail rich text content is properly styled in dark mode */
[data-bs-theme="dark"] .rich-text {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .rich-text h1,
[data-bs-theme="dark"] .rich-text h2,
[data-bs-theme="dark"] .rich-text h3,
[data-bs-theme="dark"] .rich-text h4,
[data-bs-theme="dark"] .rich-text h5,
[data-bs-theme="dark"] .rich-text h6 {
    color: var(--bs-heading-color);
}

[data-bs-theme="dark"] .rich-text a {
    color: var(--bs-link-color);
}

[data-bs-theme="dark"] .rich-text a:hover {
    color: var(--bs-link-hover-color);
}

[data-bs-theme="dark"] .rich-text table {
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .rich-text table th,
[data-bs-theme="dark"] .rich-text table td {
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .rich-text hr {
    border-color: var(--bs-border-color);
}

/* Wagtail image captions in dark mode */
[data-bs-theme="dark"] .rich-text .figure-caption,
[data-bs-theme="dark"] .rich-text figcaption {
    color: #adb5bd;
}

/* Divider block styles */
.divider-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.divider-block hr {
    width: 100%;
    border: 0;
    border-top: 1px solid;
    margin: 0;
}

.divider-block hr.border-2 {
    border-top-width: 2px;
}

/* Ensure divider colors are properly themed */
[data-bs-theme="dark"] .divider-block .text-muted {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .divider-block .text-light {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .divider-block .text-dark {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] .divider-block .border-muted {
    border-color: #6c757d !important;
}

[data-bs-theme="dark"] .divider-block .border-light {
    border-color: #f8f9fa !important;
}

[data-bs-theme="dark"] .divider-block .border-dark {
    border-color: #e9ecef !important;
}

/* Responsive spacing for divider blocks */
@media (max-width: 576px) {
    .divider-block {
        margin-left: 0;
        margin-right: 0;
    }
}
