/* Layout principal simplificado */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Header del blog */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #007bff;
}

.page-header h1 {
    color: #333;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-weight: 400;
}

.blog-main-content {
    width: 100%;
}

.blog-main-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: none;
    display: block;
  }
  


/* Grid de 3 columnas para posts */
.blog-grid-3-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* Grid original para compatibilidad */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #000;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.blog-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-card-meta {
    color: #6c757d;
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-card-meta i {
    margin-right: 3px;
}

.blog-card-meta .badge {
    font-size: 11px;
    padding: 3px 8px;
}

.blog-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a:hover {
    color: #007bff;
}

.blog-card-excerpt {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    font-size: 14px;
    margin-top: auto;
}

.blog-card-link:hover {
    color: #0056b3;
}

.blog-card-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.blog-card-link:hover i {
    transform: translateX(3px);
}

.nota-extracto {
    margin-top: 20px;
    padding: 5px 20px;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    text-align: left;
}

.nota-extracto .lead {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 0;
    font-style: italic;
}

/* Forzar alineación a la izquierda en vista individual */
.page-header.text-start h1,
.page-header.text-start p,
.page-header.text-start .nota-extracto {
    text-align: left !important;
}

.nota-imagen img {
    width: 100%;
    height: auto;
    display: block;
}

.nota-contenido {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    max-width: 100%;
    padding-bottom: 10px;
    overflow-wrap: break-word;
}

.ir-atras{
    padding: 10px 15px;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}
    



/* Párrafos */
.nota-contenido p {
    margin-bottom: 6px;
}

/* Encabezados */
 h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 6px 0;
    line-height: 1.2;
    padding-bottom: 10px;
}
.nota-contenido h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #34495e;
    margin: 20px 0 6px 0;
    line-height: 1.3;
    padding-left: 15px;
}

.nota-contenido h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #34495e;
    margin: 20px 0 6px 0;
    line-height: 1.4;
}

.nota-contenido h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #34495e;
    margin: 20px 0 6px 0;
    line-height: 1.4;
}

.nota-contenido h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
    margin: 20px 0 6px 0;
    line-height: 1.4;
}

.nota-contenido h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #34495e;
    margin: 20px 0 6px 0;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Texto en negrita y enfatizado */
.nota-contenido b,
.nota-contenido strong {
    font-weight: 700;
    color: #2c3e50;
}

.nota-contenido em,
.nota-contenido i {
    font-style: italic;
    color: #34495e;
}

.nota-contenido small {
    font-size: 0.875rem;
    color: #7f8c8d;
}

/* Enlaces */
.nota-contenido a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.nota-contenido a:hover {
    color: #2980b9;
    text-decoration: none;
}

/* Listas */
.nota-contenido ul,
.nota-contenido ol {
    margin: 20px 0;
    padding-left: 30px;
}

.nota-contenido ul li {
    list-style-type: disc;
    margin-bottom: 8px;
    line-height: 1.6;
}

.nota-contenido ol li {
    list-style-type: decimal;
    margin-bottom: 8px;
    line-height: 1.6;
}

.nota-contenido ul ul,
.nota-contenido ol ol,
.nota-contenido ul ol,
.nota-contenido ol ul {
    margin: 10px 0;
}

.nota-contenido li p {
    margin-bottom: 10px;
}

/* Líneas horizontales */
.nota-contenido hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #bdc3c7, transparent);
    margin: 20px 0;
}

/* Citas */
.nota-contenido blockquote {
    margin: 25px 0;
    padding: 10px 10px 10px 45px;
    background: #f8f9fa;
    font-style: italic;
    color: #34495e;
    position: relative;
}

.nota-contenido blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #bdc3c7;
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: Georgia, serif;
}

.nota-contenido blockquote p:last-child {
    margin-bottom: 0;
}

.nota-contenido cite {
    font-style: normal;
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Código */
.nota-contenido code {
    background: #f1f2f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e74c3c;
}

.nota-contenido pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.4;
}

.nota-contenido pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Span personalizado */
.nota-contenido span.highlight {
    background: #f39c12;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.nota-contenido span.badge {
    background: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Saltos de línea */
.nota-contenido br {
    line-height: 0;
    display: none;
    margin: 0;
    padding: 0;
}

/* Tablas */
.nota-contenido table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.nota-contenido th,
.nota-contenido td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.nota-contenido th {
    background: #34495e;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.nota-contenido tr:hover {
    background: #f8f9fa;
}

/* Imágenes dentro del contenido */
.nota-contenido img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.nota-contenido img:hover {
    transform: scale(1.02);
}

/* Contenedores especiales */
.nota-contenido .info-box {
    background: #e8f4fd;
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.nota-contenido .warning-box {
    background: #fef9e7;
    border: 1px solid #f39c12;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.nota-contenido .success-box {
    background: #eafaf1;
    border: 1px solid #27ae60;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .blog-description {
        font-size: 1rem;
        line-height: 1.4;
    }

    .nota-contenido {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .nota-contenido h1 {
        font-size: 2rem;
    }
    
    .nota-contenido h2 {
        font-size: 1.5rem;
    }
    
    .nota-contenido h3 {
        font-size: 1.25rem;
    }
    
    .nota-contenido ul,
    .nota-contenido ol {
        padding-left: 20px;
    }
    
    .nota-contenido blockquote {
        padding: 15px 20px;
        margin: 20px 0;
    }
    
    .nota-contenido table {
        font-size: 0.9rem;
    }
    
    .nota-contenido th,
    .nota-contenido td {
        padding: 8px 10px;
    }
}

.no-content {
    text-align: center;
    padding: 60px 20px;
}

.no-content i {
    display: block;
    margin: 0 auto 20px;
}

.pagination-container {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
}

.pagination {
    margin-bottom: 0;
    display: inline-flex;
    list-style: none;
    gap: 5px;
}

.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    margin: 0;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    background: white;
    text-decoration: none;
    min-width: 40px;
    text-align: center;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
    margin-top: 15px;
}

/* Responsive - Tablets */
@media (max-width: 1000px) {
    .blog-grid-3-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .blog-container {
        padding: 25px 15px;
    }
}

/* Responsive - Móviles */
@media (max-width: 600px) {
    .blog-grid-3-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-container {
        padding: 20px 15px;
    }
    
    .blog-card-image {
        height: 180px;
    }
}

/* ======================================
    Botón flotante de secciones
======================================= */

.sections-float {
    position: fixed;
    bottom: 20px;
    right: 15px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    user-select: none;
    animation: pulse-sections 2s infinite;
}

.sections-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3, #004085);
}

.sections-float i {
    font-size: 16px;
}

@keyframes pulse-sections {
    0% {
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 123, 255, 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    }
}

/* ======================================
    Menú deslizante de secciones
======================================= */

.sections-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.sections-menu.active {
    right: 0;
}

.sections-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sections-menu-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-sections {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-sections:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sections-menu-content {
    padding: 20px;
}

.section-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.section-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
    text-decoration: none;
    color: #333;
}

.section-item.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-left-color: #004085;
}

.section-item.active:hover {
    color: white;
}

.section-item.empty {
    opacity: 0.6;
}

.section-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.section-item span:first-of-type {
    flex: 1;
    font-weight: 500;
}

.section-count {
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    min-width: 25px;
    text-align: center;
}

.section-item.active .section-count {
    background: rgba(255, 255, 255, 0.2);
}

.section-item.empty .section-count {
    background: #6c757d;
}

/* Overlay para cerrar el menú */
.sections-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sections-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive para pantallas menores a 860px */
@media (max-width: 860px) {
    .sections-float {
        bottom: 80px; /* Subir el botón para evitar que lo tape el footer */
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .sections-menu {
        width: 300px;
        right: -300px;
    }
    
    .sections-float {
        bottom: 80px; /* Mantener la altura elevada */
        right: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .sections-float span {
        display: none;
    }
    
    .sections-float {
        border-radius: 50%;
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
    }
    
    .section-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .sections-menu-header {
        padding: 15px;
    }
    
    .sections-menu-content {
        padding: 15px;
    }
}

/* Estilos para botones de compartir */
.share-buttons, .share-buttons-end {
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
    padding-top: 10px;
}

.share-title {
    color: #495057;
    text-align: center;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
}

/* Botones con iconos (debajo de la imagen) */
.share-buttons-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 0 15px 0;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.share-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn.facebook {
    background-color: #1877f2;
    color: white;
}

.share-btn.facebook:hover {
    background-color: #166fe5;
    color: white;
}

.share-btn.whatsapp {
    background-color: #25d366;
    color: white;
}

.share-btn.whatsapp:hover {
    background-color: #22c55e;
    color: white;
}

.share-btn.telegram {
    background-color: #0088cc;
    color: white;
}

.share-btn.telegram:hover {
    background-color: #0077b5;
    color: white;
}

.share-btn.twitter {
    background-color: #000000;
    color: white;
}

.share-btn.twitter:hover {
    background-color: #333333;
    color: white;
}



/* Estilos para la sección "Te puede interesar" */
.related-posts {
    border-top: 2px solid #e9ecef;
    padding-top: 30px;
    margin-bottom: 30px;
}

.related-posts-title {
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.related-posts-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #007bff;
    border-radius: 2px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.related-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.related-post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 20px;
}

.related-post-title {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.related-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #007bff;
    text-decoration: none;
}

.related-post-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.related-post-meta {
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.related-post-meta small {
    color: #999;
    font-size: 0.85rem;
}

.related-post-meta i {
    margin-right: 5px;
    color: #007bff;
}

/* Responsive para botones de compartir */
@media (max-width: 768px) {
    .share-buttons-group {
        justify-content: center;
    }
    
    .share-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    /* Responsive para posts relacionados */
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-post-image {
        height: 200px;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}