/* ==============================
   Banner Principal (Imagen de fondo)
   ============================== */
.blog-banner {
    position: relative;
    display: flex;
    width: 100%;
    height: 100px;
    background-size: cover;
    background-position: center;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 3rem;
}

.blog-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: black;
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    width: 1080px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.banner-content h1{
    color: white;
    text-align: center;
}

/* ==============================
   Contenedor Principal del Blog
   ============================== */
.blog-content {
    display: grid;
    grid-template-columns: 320px 1fr; /* TOC + contenido */
    gap: 80px;
    width: 100%;
    max-width: 1280px;
    box-sizing: border-box;
    margin: 0 auto;
    align-items: start;
    padding: 0 1.5rem;
}

/* ==============================
   Tabla de Contenido (TOC)
   ============================== */
.blog-toc {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    background: transparent;
    border-left: 2px solid var(--main);
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    padding: 0 1.5rem;
    margin-top: 2rem;
}

.blog-toc h2 {
    margin-bottom: 1rem;
    color: var(--main);
}

.blog-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc a {
    text-decoration: none;
    transition: opacity 0.25s ease;
    display: inline-block;
    color: black;
    margin-bottom: 12px;
}

.blog-toc a:hover,
.blog-toc a:focus {
    opacity: 0.7;
    outline: none;
}

/* ==============================
   Contenido principal del blog
   ============================== */
.blog-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-section {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
}

.blog-text {
    flex: 1 1 400px;
    box-sizing: border-box;
}

.blog-image {
    flex: 0 0 400px; /* ancho fijo */
    max-width: 100%;
}

.blog-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

/* ==============================
   Imágenes dentro del blog
   ============================== */
.blog-img {
    width: 100%;
    height: auto;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

/* ==============================
   Botón de llamada a la acción (CTA)
   ============================== */
.cta-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #0073e6;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #005bb5;
}

/* ==============================
   Margen para desplazamiento suave (scroll)
   ============================== */
section[id] {
    scroll-margin-top: 80px;
}

/* ==============================
   Video responsivo
   ============================== */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==============================
   Responsive: una sola columna
   ============================== */
@media (max-width: 1080px) {
    .blog-banner {
        margin-bottom: 0;
    }
    
    .blog-content {
        grid-template-columns: 1fr;
    }

    .blog-toc {
        position: static;
    }
    
    .blog-content {
        gap: 40px;
    }
}
