:root {
    --color-bg: #444444;
    --color-bg-hover: rgb(126, 126, 126);
    --color-article-preview-hover:rgb(90, 90, 90);
    --color-text: rgb(249, 249, 249);

    --color-yellow: rgb(173, 120, 56);
    /* --color-green: rgb(48, 102, 109); */
    --color-green: #155a60;
    /* --color-green-hover: rgb(60, 127, 136); */
    --color-green-hover: rgb(71, 150, 160);
    --color-downloadpdf: #f6e9b3;

    --font-title: "League Spartan", sans-serif;
    --font-text: 'Liberation Sans Narrow';

    --box-border-width: 4px;

    /* only for spacer div in article.html */
    --header-height: 60px; 
    --footer-height: 200px;

    background-color: var(--color-bg);
    color: var(--color-text);
    
    font-family: var(--font-text);
    font-size: 18px;
}
@font-face {
    font-family: 'Liberation Sans Narrow';
    src: url('./fonts/LiberationSansNarrow-Regular.ttf');
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;  
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
}
a {
    text-decoration: none;
    color: var(--color-text);
}

.textarea {
    white-space: pre-wrap;
    word-wrap: break-word;
    text-indent: 0px;
}
.hidden {
    display: none;
}
.anchor {
    position: relative;
    top: -90px;
    visibility: hidden;
}
.anchor-header-editions {
    position: relative;
    top: -170px;
    visibility: hidden;
}
.closed-box {
    border: var(--color-text);
    border-style: solid;
    border-width: var(--box-border-width);
}
.copy-message {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none; /* Ensure the message doesn't interfere with clicks */
    z-index: 1000;
  }


body {
    margin: 0;
    min-height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    
    margin: 0;
}


.authorpage-wrapper {
    width: 100%;
    margin-bottom: 50px;
}
.authorpage-author {
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 50px;

    margin: 25px 0 15px 0;
}
.authorpage-article-wrapper{
    
    padding: 20px;
}
.authorpage-article-wrapper:hover{
    background-color: var(--color-bg-hover);
    
}
.authorpage-article-title {
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 2rem;
}
.authorpage-article-edition {
    font-size: 1.3rem;
}
.pendular-banner-img {
    max-height: 100px;
    max-width: 550px;
    height: auto;
    width: 100%;
    margin-bottom: 20px;
}

/* ----------------HEADERBAR----------------*/

#headerbar{
    display: grid;
    grid-template-columns: repeat(5, 1fr);

    /* align-items: center; */
    text-align: center;

    position: sticky;
    top: 0;
    z-index: 99;

    width: 100%;

    background-color: var(--color-green);
    color: var(--color-text);

    border-bottom-style: solid;
    border-width: 2px;
    border-bottom-color: var(--color-yellow);

    font-family: var(--font-title);
    font-size: 1.2rem;
    
}

.headerbar-entry {
    padding: 20px;
    
    /* border-right-style: solid;
    border-right-color: white;
    border-right-width: 3px; */
    
}
/* .headerbar-entry:last-of-type {
    border-right-style:none;
    border-right-color: var(--color-green);
    border-right-width: 0;
} */
.headerbar-entry:hover {
    background-color: var(--color-green-hover) !important;
    cursor: pointer;
}
.headerbar-entry-fixed-content {
    position: fixed;
    width: 100%;
    z-index: 98;
    /* max-height: 30%; */
    overflow: hide;

    font-family: var(--font-title);
    font-size: 1.2rem;
    background-color: var(--color-green);
    
}
.headercontent-close-btn {
    position: fixed;
    font-size: 2rem;
    right: 20px;
    margin-top: 10px;
    /* margin-bottom: -20px; */

}
.headercontent-close-btn:hover {
    cursor: pointer;
    /* background-color: var(--color-green-hover); */
}

#hamburger {
    display: none;
    /* padding: 0 20px; */
    padding: 20px;
}
.hidemobile {
    display: inline;
}
/* ----------------HEADERBAR HIDDEN CONTENT----------------*/

#editorial {
    overflow-y: scroll;
    max-height: 60%;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
    
}
#editorial-texto {
    padding: 30px 10%;
    /* background-color: var(--color-bg); */
    /* columns: 250px auto;
    column-gap: 20px; */
    text-align: justify;
    font-size: 1rem;
}

#autores {
    overflow-y: scroll;
    max-height: 30%;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}
#autores-texto {
    padding: 30px 10%;
    text-align: center; /* center horizontally */
    align-items: center; /* center vertically */
    font-size: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}
.header-autor {
    margin: 5px;
}
#contactos-texto {
    /* background-color: var(--color-bg-hover); */
    padding: 30px 10%;
    text-align: center;
    font-size: 1rem;
}
#idioma-texto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    
    padding: 30px 10%;
    /* background-color: var(--color-bg-hover); */

    text-align: center;
    font-size: 1rem;
}
#idioma-texto button {
    background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
    /* width: 50%; */
}

#idioma-texto button:hover {
    /* background-color: var(--color-green-hover) !important; */
    cursor: pointer;
}
.idioma-entry:hover {
    /* background-color: var(--color-bg) !important; */
    cursor: pointer;
}


#edicoes {
    overflow-y: scroll;
    max-height: 30%;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

#edicoes-texto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    /* background-color: var(--color-bg-hover); */

    padding: 15px 10%;
    text-align: center;
    font-family: var(--font-title);
    font-size: 1rem;

}

.edicoes-entry {
    margin: 10px;
}
.edicoes-entry-text {
    text-align: center;
}
.edicoes-entry-buttons {
    display: inline-flex;
    text-align: center;
}
.edicoes-entry-button {
    margin-top: 5px;
    margin-inline: 15px;
}
.edicoes-entry-buttons-separator {
    margin-top: 5px;
}

/* ----------------INDICE----------------*/

#indice {
    position: relative;
    right: 0px;
    width: 300px;
    z-index: 100;
}
.indice-close-btn {
    position: fixed;

    right: 10px;
    margin-top: 10px;
    /* height: 100%; */
    
    font-size: 2rem;
    font-family: var(--font-title);
    
    vertical-align: middle;
    text-align: center;
    align-items: center;
    align-self: center;
    
    z-index: 110;
}
.indice-close-btn:hover {
    cursor: pointer;
    /* background-color: var(--color-green-hover); */
}

/* from cinquenta */
/* #sidebarbutton {
    position: fixed;
    padding: 30px;
    right: 0px;
    bottom: 50%;
    z-index: 200; 
    border: none;
    outline: none;
    background-color: #155a6090;
    color: white;
    cursor: pointer;
    clip-path: circle(50% at 100% 49%);
    font-size: 18px;
    transition: 0.2s;
}
#sidebarbutton:hover {
    background-color: var(--color-green-hover);
}
#sidebarbuttontext {
    transform: translateX(20px);
} */


#indice-content {
    right: 0;
    width: 300px;
    padding: 0 30px 200px 30px;
    font-size: 20px;
    position: fixed;
    height: 100%;
    overflow-y: scroll;
    
    background-color: var(--color-green);
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
    
}
.indice-date {
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 1.4rem;

    margin-top: 30px;
    margin-bottom: 20px;
}
.indice-entry {
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 700;
    font-size: 1rem;

    margin-top: 15px;
    margin-bottom: 2px;
}
.indice-autor {
    font-size: 0.85rem;
}

.indice-page {
    display: none;
}  
#indice-page-0 {
    display: inline;
}  
.indice-btn:hover {
    cursor: pointer;
}

/* ----------------MAINCONTENT: SITE TITLE AND EDITIONS----------------*/

#maincontent {
    display: block;
    width: 100%;
    padding: 40px 50px;
    max-width: 2000px;
    
    margin: auto;
    flex: 1;
}
/* #maincontent-peninsulartitle {
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 100px;
    padding-bottom: 50px;
} */


/* ----------------ARTICLE PREVIEW----------------*/

.edition{
    margin-bottom: 100px;
}

.edition-title-and-images {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.edition-pendular-and-title {
    display: grid;
    grid-template-rows: auto auto;
    width: 100%;
    max-height: 500px;
}
.edition-pendular {
    
    width: 100%;
    min-width: 300px;
    /* max-width: 550px; */
    max-height: 200px;

}

.edition-title{
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-size: 1.4rem;

    height: fit-content;
    margin: 10px 10px;
}
.edition-image {

    width: 100%;
    /* min-width: 250px; */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    max-height: 500px;
   
}

.edition-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(297px, 1fr));
    
    color: var(--color-text);
    grid-auto-columns: max-content;

    border: var(--color-text);
    border-bottom: var(--color-bg);
    border-style: solid;
    border-width: var(--box-border-width);

    /* margin: 10px 0; */
}
.edition-vermais {
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 1.8rem;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 100px;
    margin-top: 10px;
}
.edition-vermais:hover {
    cursor: pointer;
}

.article-wrapper:hover {
    background-color: var(--color-article-preview-hover) !important; 
    filter: brightness(120%);
    cursor: pointer;
}

.article-wrapper {
    /* padding: 30px; */
    padding: 20px 30px 30px 30px;
}

.article-preview {
    display: grid;
    position: relative;

    max-width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-preview-title {
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 1.3rem;

    margin-top: 10px; 
}
.article-preview-text {
    text-align: justify;
    font-size: 1rem;

    overflow: hidden;
    
    margin-top: 20px;
    margin-bottom: 20px;

    background: linear-gradient(to bottom, var(--color-text), transparent);
    color: transparent;
    background-clip: text;
}
.article-preview-author {
    font-size: 1rem;
    text-align: right;
}
.article-preview-image{
    position: relative;
    width: 100%;
    height: 130px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
.article-preview-cartoon {
    width: 100%;
    height: auto;
}

/* ----------------ARTICLE POPUP----------------*/

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    
}

.popup.active {
    opacity: 1;
    visibility: visible;
    overflow-y: scroll;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.popup-closebtn{
    all: unset; /* remove button styles */
    font-family: var(--font-title);
    background-color: var(--color-bg);
    height: 30px;
    width: 30px;
    font-size: 2.5rem;
}
.popup-closebtn:focus {
    outline: revert;
}
.popup-closebtn:hover {
    cursor: pointer;
}

#popup-closebtn-1 {
    margin-top: 32px;
    margin-bottom: 30px;
    margin-left: 0;
}
#popup-closebtn-2 {
    margin-top: 32px;
    margin-bottom: 30px;
    margin-left: 0;
}

#popup-content {
    display: relative;
    background-color: var(--color-bg);
    padding: 50px;
    text-align: center;
    width: 80%;
    height: 100%;
    overflow-y: scroll;
    text-align: justify;
    max-width: 1000px;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}
#popup-buttons-wrapper {
    display: flex;
    position:relative;
    right: 0;
}
#popup-buttons-wrapper2 {
    display: none;
    position:relative;
    right: 0;
}

#popup-title {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 2rem;
    margin:20px 30px 20px 0;
    text-align: left;
}
#popup-buttons {
    margin-top: 20px;
    display: flex;
    margin-left: auto;
    margin-right: 0;
    font-size: 0.85rem;
    
}
#popup-buttons2 {
    margin-top: 20px;
    display: flex;
    margin-left: auto;
    margin-right: 0;
    font-size: 0.85rem;
}
.popup-textbtn {
    color: var(--color-bg);
    font-size: 0.85rem;
    background-color:rgb(229, 229, 229);;
    padding: 5px 15px;
    margin: 40px 10px 0 0;
    
    border-radius: 20px;
    height: fit-content;
    text-align: center;
}
.popup-textbtn:hover {
    cursor: pointer;
}
#popup-btn-gotoarticle {
    width: max-content;
}

#popup-text {
    margin-top: 40px;
    max-width: 800px;
    margin: auto;
}
#popup-author {
    margin-top: 20px;
    margin-right: 20px;
    text-align: right;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.image-gallery img {
    max-width: 400px;
    max-height: 400px;
    cursor: pointer;
    /* border: 2px solid #ddd;
    border-radius: 8px; */
    transition: transform 0.2s, border-color 0.2s;
}

.image-gallery img:hover {
    /* transform: scale(1.05); */
    border-color: #333;
}

/* Fullscreen popup image */
#popup-images img.fullscreen {
    max-width: 90%;
    max-height: 90%;
    border: none;
}


/* ----------------ARTICLE DETAIL----------------*/

.article-detail-title {
    font-family: var(--font-title);
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 2rem;

    margin-top: 30px;
}
.article-detail-text {
    text-align: justify;
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}
.article-detail-author {
    font-size: 20px;
    margin-top: 20px;
    text-align: right;
    
}
/* Fullscreen image */
#article-images img.fullscreen {
    max-width: 90%;
    max-height: 90%;
    border: none;
}

#article-btn-share {
    
    width: fit-content;
    font-size: 0.85rem;

}

/* .article-detail-image{
    position: relative;
    width: 450px;
    height: 450px;

    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
} */

/* ----------------Download PDF Strip----------------*/

.download-strip {
    background-color: var(--color-downloadpdf);
    position: absolute;
    color: var(--color-text);
    text-align: center;
     
    display: flex; 
    width: 100%;
    left: 0;
    height: 200px;
    align-items: center; /* This will vertically center the content */
    justify-content: center; /* This will horizontally center the content */
}
.download-strip:hover {
    cursor: pointer;
}
.download-strip-content {
    display: grid;
    /* grid-template-columns: 1fr auto 1fr; */
    grid-template-columns: 1fr auto 1fr;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1600px;
}
.download-strip-left {
    margin: 40px;
}
.download-strip-left-text1 {
    color: var(--color-bg);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 10px;
}
.download-strip-left-text2 {
    color: var(--color-bg);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
    align-content: center;
}
.download-strip-center {
    position: relative;
    max-width: 400px;
    justify-self: center;
    align-items: center;
}
.download-strip-center img {
    height: auto;
    max-width: 100%;
}
.download-strip-right {
    position: relative;
    max-width: 390px;
    min-width: 200px;
    justify-self: center;
    align-items: center;
}
.download-strip-right img {
    height: auto;
    max-width: 100%;
}
#download-2pagecover {
    display: inline;
}
#download-1pagecover {
    display: none;
}

footer {
    background-color: var(--color-green);
    position: relative;
    color: var(--color-text);
    text-align: center;
    width: 100%;
    height: 50px;
    display: flex; 
    align-items: center; /* This will vertically center the content */
    justify-content: center; /* This will horizontally center the content */
    margin-bottom: 46px;
}

.footer-content {
    display: grid;
    /* grid-template-columns: 1fr auto 1fr; */
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: var(--font-title);
    font-size: 1rem;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center; /* Vertically center text */
    justify-content: center; /* Horizontally center text in its space */
    text-align: center;
    z-index: 20;
    
}

.footer-center {
    position: relative;
    max-width: 500px;
    justify-self: center;
    align-items: center;
}

.footer-center img {
    height: auto;
    max-width: 100%;
    margin-top: -50px;
}



@media only screen and (max-width: 700px) {

    footer {
        height: 30px;
        margin-bottom: 20px;
    }
    .footer-content {
        /* grid-template-columns: 1fr auto 1fr; */
        grid-template-columns: auto 1fr;
        font-size: 0.8rem;
        padding: 0 10px;
    }
    .footer-left {
        display: none;
    }
    .footer-center img {
        height: auto;
        max-width: 100%;
        margin-top: -30px;
    }
    
    #hamburger {
        display: inline-block;
    }
    .hidemobile {
        display: none;
    }
    #headerbar {
        grid-template-columns: repeat(4, 1fr);
        font-size: 1rem;
    }
    .headerbar-entry {
        padding: 20px 10px;
    }
    .download-strip-content {
        grid-template-columns: 1fr auto 20px;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .download-strip-left {
        margin: 10px;
    }
    .download-strip-left-text1 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    .download-strip-left-text2 {
        font-weight: 700;
        font-size: 1.7rem;
    }
    #download-2pagecover {
        display: none;
    }
    #download-1pagecover {
        max-width: 150px;
        display: inline-block;
    }
    .download-strip-right img {
        display: none;
    }
    
    #popup-title {
        font-size: 1.7rem;
        margin:20px 30px 20px 0;
    }

    #popup-buttons-wrapper2 {
        display: flex;
    }
    /* #popup-buttons {
        margin-top: 20px;
        display: grid;
        grid-template-rows: 40px 40px 40px;
        position: right;
        font-size: 0.75rem;
    } */
    /* #popup-closebtn-1 {
        grid-row-start: 0;
        grid-row-end: 1;

        margin-top: 32px;
        margin-bottom: -20px;
        margin-left: 80px;
    } */

    #maincontent {
        padding: 20px 20px;     
    }
    #maincontent-peninsulartitle {
        font-size: 70px;
    }

    .edition-image {
        display: none;
    }
    .edition-image-mobile {
        display: block;
        width: 100%;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center bottom;
    }
    .edition-title-and-images {
        grid-template-columns: 3fr 1fr;
    }
    .edition-pendular-and-title {
        display: grid;
        grid-template-rows: auto auto;
        width: 100%; 
    }
    .edition-pendular {
        height: auto;
        width: 100%;
        min-width: 200px;
    }

    .edition-articles {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    /* .article-wrapper {
        padding: 15px;
    }     */
    .article-wrapper {
        padding: 5px 15px 15px 15px;
    }
    .article-preview {
        max-height: 250px;
    }
    .article-preview-title {
        font-size: 1.1rem;
    }
    .article-preview-text {
        font-size: 0.8rem;

        margin-top: 15px;
        margin-bottom: 15px;
    }
    .article-preview-image{
        height: 150px;
    }
    .article-preview-author {
        font-size: 0.9rem;
    }
    
/* 
    .edition-title {
        font-size: 2rem;
    } */

    #popup-content {
        padding: 50px 20px;
        width: 100%;
    }

    .image-gallery img {
        max-width: 200px;
        max-height: 100px;
        cursor: pointer;
        /* border: 2px solid #ddd;
        border-radius: 8px; */
        transition: transform 0.2s, border-color 0.2s;
    }
    /* Fullscreen popup image */
    #popup-images img.fullscreen {
        max-width: 110%;
        max-height: 100%;
        border: none;
    }

}

@media only screen and (min-width: 1600px) {
    .edition-articles {
        grid-template-columns: repeat(4, 1fr);
    }
}
