/**
 * Blog / Noticias - Sección Empresa
 * Diseño moderno y amigable basado en las secciones del tema
 */

.blog-main {
    max-width: 1600px;
    margin: 0 auto;
    padding: calc(70px + 2rem) 1rem 3rem;
}

.blog-hero {
    margin-bottom: 2.5rem;
}

.blog-hero__inner {
    text-align: center;
}

.blog-hero__title {
    font-family: var(--font-heading, 'Neue Haas Grotesk Display', sans-serif) !important;
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    font-weight: 100 !important;
    font-style: normal;
    -webkit-text-stroke: 0.5px currentColor;
    letter-spacing: 0.01em;
    line-height: 1.15;
    color: var(--color-text, #111827);
    margin: 0 0 0.5rem;
}

.blog-hero__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.blog-content {
    position: relative;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.blog-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #111827;
    min-height: 320px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.blog-card__link {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.blog-card__image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.blog-card__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
    opacity: 0.7;
}

.blog-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
}

.blog-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blog-card__category {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fbbf24;
    margin-bottom: 0.25rem;
}

.blog-card__date {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
}

.blog-card__title {
    font-family: var(--font-heading, 'Neue Haas Grotesk Display', sans-serif) !important;
    font-size: 1.25rem !important;
    font-weight: 100 !important;
    font-style: normal;
    -webkit-text-stroke: 0.5px currentColor;
    letter-spacing: 0.01em;
    line-height: 1.25;
    color: #fff !important;
    margin: 0;
}

.blog-card__excerpt {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin: 0.25rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #dc2626;
    margin-top: 0.5rem;
    transition: gap 0.2s ease;
}

.blog-card:hover .blog-card__cta {
    gap: 0.75rem;
}

.blog-card__cta svg {
    flex-shrink: 0;
}

/* Featured card (primera entrada) */
.blog-card--featured {
    min-height: 420px;
}

.blog-card--featured .blog-card__content {
    padding: 2rem;
}

.blog-card--featured .blog-card__title {
    font-size: 1.75rem !important;
}

.blog-card--featured .blog-card__excerpt {
    -webkit-line-clamp: 3;
}

/* Paginación */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.blog-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    background: #f9fafb;
    border-radius: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: #dc2626;
    color: #fff;
}

.blog-pagination .page-numbers.dots {
    background: transparent;
}

.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.blog-empty__text {
    font-size: 1.125rem;
    color: #6b7280;
}

.blog-hero__subtitle--html {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 auto;
}

/* Single post - hero usa internal-hero (estilos en style.css) */
.internal-hero a.internal-hero__tag {
    color: #fff;
    text-decoration: none;
}

.internal-hero a.internal-hero__tag:hover {
    background: rgba(255, 255, 255, 0.3);
}

.single-post__content {
    font-size: 1.0625rem;
    line-height: 1.7;
}

.single-post__content p {
    margin-bottom: 1.25rem;
}

.single-post__content h2,
.single-post__content h3 {
    font-family: var(--font-heading, 'Neue Haas Grotesk Display', sans-serif) !important;
    font-weight: 100 !important;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.single-post__footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.single-post__back {
    font-size: 0.9375rem;
    color: #dc2626;
    font-weight: 500;
}

.single-post__back:hover {
    text-decoration: underline;
}

/* Post with sidebar */
.post-with-sidebar {
    padding: 2rem 0;
}

.post-with-sidebar__container {
    max-width: var(--container-width, 1400px);
    margin: 0 auto;
    padding: 0 var(--container-padding, 1.5rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.post-with-sidebar__main {
    min-width: 0;
}

.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-sidebar__block {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.post-sidebar__block--news {
    padding: 0;
    background: transparent;
}

.post-sidebar__block--news .post-sidebar__title {
    padding: 0 1.25rem;
    margin-bottom: 1rem;
}

.post-sidebar__block--contact {
    background: #111827;
    color: #fff;
}

.post-sidebar__news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.post-sidebar__news-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.post-sidebar__news-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.post-sidebar__news-img {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 0.375rem;
    overflow: hidden;
    background: #f3f4f6;
    background-size: cover;
    background-position: center;
}

.post-sidebar__news-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.post-sidebar__news-body {
    flex: 1;
    min-width: 0;
}

.post-sidebar__news-cat {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #dc2626;
    margin-bottom: 0.25rem;
}

.post-sidebar__news-title {
    font-family: var(--font-heading, 'Neue Haas Grotesk Display', sans-serif) !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    line-height: 1.3;
    color: #111827;
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-sidebar__news-card:hover .post-sidebar__news-title {
    color: #dc2626;
}

.post-sidebar__news-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.post-sidebar__news-arrow {
    flex-shrink: 0;
    color: #9ca3af;
    margin-top: 0.25rem;
    transition: transform 0.2s, color 0.2s;
}

.post-sidebar__news-card:hover .post-sidebar__news-arrow {
    color: #dc2626;
    transform: translateX(2px);
}

.post-sidebar__block--news .post-sidebar__more {
    display: block;
    margin: 1rem 1.25rem 0;
    padding: 0.625rem 0;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    border-top: 1px solid #e5e7eb;
}

.post-sidebar__title {
    font-family: var(--font-heading, 'Neue Haas Grotesk Display', sans-serif) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #111827;
    margin: 0 0 1rem;
}

.post-sidebar__block--contact .post-sidebar__title {
    color: #fff;
}

.post-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-sidebar__item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.post-sidebar__item:last-child {
    border-bottom: none;
}

.post-sidebar__list--projects .post-sidebar__item {
    border-bottom: none;
    padding: 0.375rem 0;
}

.post-sidebar__link {
    display: block;
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.3;
}

.post-sidebar__link:hover {
    color: #dc2626;
}

.post-sidebar__item--project .post-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-sidebar__thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 0.25rem;
    overflow: hidden;
}

.post-sidebar__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-sidebar__text {
    flex: 1;
    min-width: 0;
}

.post-sidebar__date {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.post-sidebar__more {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #dc2626;
}

.post-sidebar__more:hover {
    text-decoration: underline;
}

.post-sidebar__empty {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
}

.post-sidebar__contact-text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.post-sidebar__cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: #dc2626;
    color: #fff;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.post-sidebar__cta:hover {
    background: #b91c1c;
    color: #fff;
}

.post-sidebar__contact-details {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.post-sidebar__contact-details p {
    margin: 0.25rem 0;
}

.post-sidebar__contact-details a {
    color: rgba(255, 255, 255, 0.95);
}

.post-sidebar__contact-details a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-card--featured {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }

    .blog-card--featured {
        grid-column: span 3;
        min-height: 380px;
    }

    .blog-card--featured .blog-card__content {
        max-width: 50%;
    }

    .post-with-sidebar__container {
        grid-template-columns: 1fr 320px;
        gap: 3rem;
    }

    .post-sidebar {
        position: sticky;
        top: calc(70px + 2rem);
    }
}
