:root {
    --color-light: hsl(0deg 0% 100%);
    --color-principal: hsl(201.57deg 95.7% 36.47%);
    --color-secundario: hsl(201.67deg 54.55% 87.06%);
    --color-text: hsl(25.71deg 41.18% 3.33%);
    --color-bg: hsl(0deg 0% 94.9%);
    --lg: 1180px;
    --md: 799px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: "Inter", sans-serif;
    font-weight: 300;
    line-height: 1.4em;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2em;
}

header svg.icon__xl {
    height: 1.2em;
    width: auto;
    fill: currentColor;
}

.header {
    width: 100%;
    background-color: var(--color-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.logo {
    max-width: 140px;
    height: auto;
}

.logo img {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

nav.main-nav li a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 500
}

nav.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav.main-nav ul li a {
    text-decoration: none;
    font-weight: 500;
    color: var(--color-text);
}

nav.main-nav .box-buttons {
    margin-left: 20px;
}

@media (max-width: 799px) {

    /*  hamburguesa */
    .hamburger {
        display: block;
    }

    /* Ocultar menú horizontal */
    nav.main-nav ul,
    nav.main-nav .box-buttons {
        display: none;
    }

    /* Menu activo al abrir hamburguesa */
    nav.main-nav.active ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        background-color: var(--color-light);
        position: absolute;
        top: 134px;
        /* ajustar según el header */
        right: 20px;
        width: 100%;
        padding: 15px;
        border: 1px solid #ccc;
        border-radius: 6px;
        z-index: 100;
    }

    nav.main-nav.active .box-buttons {
        display: block;
        margin-top: 10px;
    }

    nav.main-nav.active ul li a {
        font-weight: 500;
        color: var(--color-text);
    }
}

.main-post {
    background: var(--color-bg);
    padding: 50px 20px;
    width: 100%;
}

.main-blog {
    display: block;
    background: var(--color-bg);
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
}

.content-box {
    max-width: var(--lg);
    margin: 0 auto;
    width: 100%;
    background: var(--color-light);
    display: flex;
}

.content-box div {
    box-sizing: border-box;
}

/* columnas */
.box-texto {
    flex: 0 0 50%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;

}

.box-texto h2 {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 10px;
}

.box-imagen {
    flex: 0 0 50%;
    padding: 0;
}

.box-imagen img {
    width: 100%;
}

/*------------------- Botón --------------------------*/

.btn-blue {
    display: inline-block;
    background-color: var(--color-principal);
    /* azul similar al de la imagen */
    color: var(--color-light);
    padding: 12px 30px;
    font-size: 20px;
    text-decoration: none;
    border-radius: 2px;
    /* borde sutilmente redondeado */
    border: 1px solid transparent;
    font-weight: 500;
}

.main-post .imagen img {
    width: 100%;
    border-radius: 8px;
}

.social-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    justify-content: center;

}

.social-footer ul li a {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--color-text);
}

.social-footer ul li a:hover {
    color: var(--color-principal);
}

.section-2 {
    background-color: var(--color-light);
    padding: 50px 20px;
}

.section-3 {
    background-color: var(--color-light);
    padding: 50px 20px;
}

.content {
    width: 100%;
    max-width: var(--lg);
    margin: 20px auto;
}

.post .content {
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
}

.post figure img {
    width: 100%;
    height: auto;
}


.post-header.content,
.post-footer.content {
    padding: 20px 20px;

}

.post figure {
    padding: 20px 0;
    margin: 0;
}

.grid-cards {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.section-3 .card {
    background-color: #bad7ea;
    border: 1px solid #abc7da;
}


.card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-tags {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.tag {
    background: #eee;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
}

.time {
    color: #333;
    padding-top: 6px;
}

.content h2 {
    font-size: 30px;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 400;
}

.content h4 {
    font-size: 12px;
    font-weight: 600;
    padding-bottom: 15px;
}

.card h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 10px;
}

p {
    color: #555;
    margin-bottom: 20px;
    font-size: 16px;
}

.read-more {
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-size: 16px;
}

.read-more:hover {
    text-decoration: underline;
}

.center {
    text-align: center;
}

/*------------------- footer --------------------------*/
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    background-color: var(--color-light);
    text-align: center;
}

.subir {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-text);
    color: white;
    text-decoration: none;

    font-size: 1.5rem;
    border-radius: 50%;
    opacity: 0.8;
    transition: opacity 0.3s;

}

.subir:hover {
    opacity: 1;
}

html {
    scroll-behavior: smooth;
}


footer p {
    margin: 0;
}

.social-footer ul {
    display: flex;
    list-style: none;
    gap: 20px;
    /* espacio entre los íconos o links */
    padding: 0;
    margin: 0;
    justify-content: center;
}



@media (max-width: 768px) {
    .content-box {
        flex-direction: column;
    }

    .box-imagen {
        order: 0;
    }

    .box-texto {
        order: 1;
    }

    .box-texto h2 {
        font-size: 26px;
        margin-bottom: 10px;
    }
}

/* === LAYOUT GENERAL CON SIDEBAR === */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    width: 100%;
    padding: 2rem 1rem;
    max-width: 1180px;
    margin: 10px auto 0 auto;
    background-color: var(--color-light);
}

/* === SIDEBAR === */
.sidebar-toc {
    position: sticky;
    top: 120px;
    /* ajusta según tu header */
    align-self: start;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.sidebar-toc h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-toc ul li {
    margin-bottom: 0.5rem;
}

.sidebar-toc a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
}

.sidebar-toc a:hover {
    color: #007bff;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-toc {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
}

.content p {
    margin-bottom: 20px;
    line-height: 1.6;
}