/*------------------------------------------------------
| FONT-FAMILY (Google)                                 |
------------------------------------------------------*/

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    --font-family-external-open-sans: 'Open Sans';
}

/*------------------------------------------------------
| COLORS                                               |
------------------------------------------------------*/
:root {
    --bg-color-primary: #FFFFFF;

    --color-primary: #2D2D2D;
    --color-secondary: #8D8D8D;
    --color-third: #C1C0C0;

    --svg-color-fill: var(--color-primary);
    
    --border-color: #E4E4E4;
    --link-color: #00C1E8;
    --link-bg-hover: #E4E4E4;
}

/* TODO: remove this after testing */
body {
    background-color: #efefef;
}

.clear {
    clear: both;
    width: 100%;
    display: block;
    line-height: 0px;
    font-size: 0px;
    height: 0px;
}

/*------------------------------------------------------
| MAIN WRAPPER                                         |
------------------------------------------------------*/
#wrapper-blog {
    width: 100%;
}

/*------------------------------------------------------
| WRAPPER > CONTENT                                    |
------------------------------------------------------*/
#content-blog {
    max-width: 1920px;
    margin: 0 auto;
    padding: 10px 15px;
}

@media (max-width: 1920px) {
    #content-blog {
        max-width: 1600px;
    }
}

@media only screen and (max-width: 1640px) {
    #content-blog {
        max-width: 1440px;
    }
}

@media only screen and (max-width: 1440px) {
    #content-blog {
        max-width: 1200px;
    }
}

@media only screen and (max-width: 1240px) {
    #content-blog {
        max-width: 1020px;
    }
}

/*------------------------------------------------------
| COMPONENT: sidebar                                   |
------------------------------------------------------*/
.sidebar-blog {
    font-size: 12px;
    font-family: var(--font-family-external-open-sans);
    padding: 30px 0 30px 25px;
    width: 20%;
    margin-right: 1%;
    float: left;
    box-sizing: border-box;
    background-color: var(--bg-color-primary);
    border-radius: 8px;
}

.sidebar-blog ul {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-blog li {
    display: flex;
    column-gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

.sidebar-blog li:last-child {
    margin-bottom: 0;
}

.sidebar-blog li::before {
    display: inline-block;
    content: '';
    position: relative;
    width: 27px;
    height: 27px;
    background-repeat: no-repeat;
    background-position: center center;
}

.sidebar-blog li:hover a {
    background-color: var(--link-bg-hover);
}

.sidebar-blog li:has(.icon-jucarii-copii)::before {
    background-image: url("../assets/svg/jucarii-copii.svg");
}

.sidebar-blog li:has(.icon-carucioare-copii)::before {
    background-image: url("../assets/svg/stroller.svg");
}

.sidebar-blog li:has(.icon-scaune-auto)::before {
    background-image: url("../assets/svg/car-seat.svg");
}

.sidebar-blog li:has(.icon-camera-copilului)::before {
    background-image: url("../assets/svg/crib.svg");
}

.sidebar-blog li:has(.icon-la-plimbare)::before {
    background-image: url("../assets/svg/bicycle.svg");
}

.sidebar-blog li:has(.icon-jucarii-de-exterior)::before {
    background-image: url("../assets/svg/swing.svg");
}

.sidebar-blog li:has(.icon-alimentatie)::before {
    background-image: url("../assets/svg/feeding-bottle.svg");
    background-position: 5px center;
}

.sidebar-blog li:has(.icon-igiena-si-ingrijire)::before {
    background-image: url("../assets/svg/shampoo.svg");
    background-position: 4px center;
}

.sidebar-blog li:has(.icon-articole-pentru-gravide)::before {
    background-image: url("../assets/svg/maternity.svg");
    background-position: 2px center;
}

.sidebar-blog li:has(.icon-gradinita-si-scoala)::before {
    background-image: url("../assets/svg/album.svg");
}

.sidebar-blog li:has(.icon-hrana-bebelusi-si-copii)::before {
    background-image: url("../assets/svg/baby-food.svg");
    background-position: 2px center;
}

.sidebar-blog li:has(.icon-haine-si-incaltaminte)::before {
    background-image: url("../assets/svg/pajamas.svg");
}

.sidebar-blog li:has(.icon-articole-de-petrecere)::before {
    background-image: url("../assets/svg/petrecere.svg");
}

.sidebar-blog li a {
    text-decoration: none;
    font-size: 14px;
    color: var(--color-primary);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    width: 100%;
    padding: 10px 0 10px 10px;
}

@media only screen and (max-width: 1440px) {
    .sidebar-blog {
        padding-left: 10px;
    }

    .sidebar-blog li {
        column-gap: 5px;
        margin-bottom: 0;
    }

    .sidebar-blog li::before {
        padding: 5px 0 5px 0;
    }
}

/*------------------------------------------------------
| COMPONENT: article grid                              |
------------------------------------------------------*/
main {
    float: left;
    width: 79%;
}

main .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media only screen and (max-width: 1240px) {
    main .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/*------------------------------------------------------
| COMPONENT: article card                              |
------------------------------------------------------*/
.article-card {
    background-color: var(--bg-color-primary);
    color: var(--color-primary);
    border-radius: 8px;
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

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

.article-card > * {
    font-family: var(--font-family-external-open-sans);
}

.article-card img {
    aspect-ratio: 16/9;
    width: 100%;
    height: 200px;
    object-fit: cover;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.article-card figcaption {
    align-self: flex-start;
    font-size: 14px;
    font-weight: 400;
    padding: 20px 20px 0 20px;
    line-height: 19px;
}

.article-card .card-content > p, 
.article-card .card-content > a {
    font-size: 12px;
    font-weight: lighter;
    line-height: 16px;
}

.article-card .card-content > p {
    margin-bottom: 20px;
}

.article-card .card-content > a {
    color: var(--link-color);
    text-decoration: none;
}

/*------------------------------------------------------
| COMPONENT: article page                              |
------------------------------------------------------*/
.page-article {
    padding: 0 50px;
    box-sizing: border-box;
}

.page-article > * {
    font-family: var(--font-family-external-open-sans);
}

.page-article header {
    margin-bottom: 15px;
}

.page-article header > img {
    aspect-ratio: 16/9;
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.page-article section {
    background-color: var(--bg-color-primary);
    border-radius: 8px;
    padding: 50px;
}

.page-article section h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.page-article section time {
    font-size: 16px;
    color: var(--color-third);
}

.page-article .content {
    margin: 30px 0;
}

.page-article .content p {
    font-size: 14px;
    line-height: 30px;
    font-weight: 300;
    margin-bottom: 30px;
}

.page-article .content .image {
    margin: 30px 0;
    width: 100%;
}

.page-article .content .image.full-width > img {
    width: 100%;
}

.page-article .content .image.centered {
    display: flex;
    justify-content: center;
}

.page-article .content .image-gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    width: 100%;
    justify-content: center;
    margin: 30px 0;
}

.page-article .content .image-gallery a {
    text-decoration: none;
}

.page-article .content .image-gallery img {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 4/3;
    height: auto;
    object-fit: contain;
}

.page-article .content .image-gallery a:hover {
    scale: 1.05;
    transition: all 0.1s ease-in-out;
}

.page-article .content p:has(+ .image-gallery), 
.page-article .content p:has(+ .image) {
    margin-bottom: 0;
}

article footer {
    margin-top: 30px;
}

article .social-sharer {
    display: flex; 
    align-items: center;
    gap: 20px;
}

footer .social-sharer svg {
    width: 35px;
    height: 35px;
}

article .social-sharer > span {
    font-weight: 600;
    font-size: 14px;
}

/*------------------------------------------------------
| COMPONENT: related articles                          |
------------------------------------------------------*/
aside.related-articles {  
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 100px 0;
}

@media only screen and (max-width: 1240px) {
    aside.related-articles {
        grid-template-columns: repeat(3, 1fr);
    }
}
