/*
    -------------------------------------------
    GLOBAL VARIABLES & BOX-SIZING
    -------------------------------------------
*/
:root {
    /* Fonts */
    --header-font: 'Lora', serif; /* Serif font for headings */
    --body-font: 'Merriweather', serif; /* Serif font for body text */

    /* Colors (Minimal Theme - Medium-like) */
    --background: #fcfcfc; /* Light gray background */
    --text: #2e2e2e; /* Dark gray text */
    --card: #ffffff; /* White card background */
    --link: #007bff; /* Medium Blue for links */
    --shadow: rgba(0, 0, 0, 0.1); /* Subtle shadow */
	--button: #f0f0f0;
}

* {
    box-sizing: border-box;
}

/*
    -------------------------------------------
    TAG FILTER BUTTONS (Show All / Hide All)
    -------------------------------------------
*/
#hide_all_btn,
#show_all_btn.off {
    border-radius: 50%;
    color: transparent;
    box-shadow:
        0.2rem 0.2rem .3rem 0 var(--shadow) inset,
        -.0rem -.0rem .1rem 0 var(--card);
}

#show_all_btn,
#hide_all_btn.off {
    border-radius: 50%;
    color: transparent;
    box-shadow:
        0.3rem 0.3rem .3rem 0 var(--shadow),
        -.0rem -.0rem .1rem 0 var(--card);
}

#hide_all_btn:hover,
#show_all_btn:hover {
    color: var(--text);
    text-shadow: 0 0 0.4rem var(--text);
}


/*
    -------------------------------------------
    BASIC HTML STYLES
    -------------------------------------------
*/
html {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--body-font);
    background-color: var(--background);
    color: var(--text);
}

html * {
    transition: all 0.1s ease-in-out;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 90%;
    padding: 1rem;
    margin: 0 auto;
    line-height: 1.7; /* Increased line height for better readability */
}

/*
    -------------------------------------------
    NAVIGATION
    -------------------------------------------
*/
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    font-size: 1rem;
    color: var(--text);
    gap: 0.7rem;
    margin-bottom: .7rem;
    flex-wrap: wrap;
}

nav a {
    display: block;
    padding: 0.1rem 0.3rem;
    margin: 0rem;
    text-decoration: none;
    color: var(--text);
    background-color: var(--button);
    border-radius: 0.15em;
    filter: opacity(100%);
    text-shadow: none;
	box-shadow:
        0.1rem 0.1rem .2rem 0 var(--shadow),
        -.0rem -.0rem .1rem 0 var(--background);
}

nav a:hover {
    background-color: var(--background);
	color: var(--text);
	box-shadow: none;
}

/*
    -------------------------------------------
    IMAGES
    -------------------------------------------
*/
img {
    max-width: 100%;
    height: auto;
    align-self: center;
}

.detail img {
    max-height: 20rem;
    padding-bottom: 2rem;
}

/*
    -------------------------------------------
    ARTICLE DETAIL BOX
    -------------------------------------------
*/
.detail {
    border-radius: 0.4em;
    background-color: var(--card);
    padding: 1.5rem;
    margin: 0 0 1rem;
    border: none;
    box-shadow:
        .1rem .1rem .3rem 0 var(--shadow);
    color: var(--text);
}

details summary {
    cursor: pointer;
    padding-bottom: 1rem;
}

.headline {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    column-gap: 1rem;
    margin: 0 0 .5rem;
}

.description {
    padding: 0;
    margin: 0;
}

/*
    -------------------------------------------
    BUTTONS
    -------------------------------------------
*/
button {
    width: fit-content;
    border: none;
    padding: 0.3rem 0.5rem;
    border-radius: 0.15rem;
    cursor: pointer;
    font-size: .9rem;
    font-family: var(--body-font);
    color: var(--text);
    background-color: var(--button);
	box-shadow:
        0.1rem 0.1rem .2rem 0 var(--shadow),
        -.0rem -.0rem .1rem 0 var(--background);
}

button:hover {
    box-shadow: none;
	background-color: var(--background);
}

.off {
	box-shadow:
        0.1rem 0.1rem .2rem 0 var(--shadow) inset,
        -.0rem -.0rem .1rem 0 var(--background) inset;
}

.off:hover {
    opacity: 30%;
	box-shadow:
        0.1rem 0.1rem .2rem 0 var(--shadow) inset,
        -.0rem -.0rem .1rem 0 var(--background) inset;
}

/*
    -------------------------------------------
    HEADER STYLES
    -------------------------------------------
*/
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0 0 1rem;
}

header h1 {
    margin: 0 0 1rem;
    padding: 0;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--header-font);
    text-transform: none; /* Remove uppercase text */
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    text-align: center;
}

header h2 {
    margin: 0 0 1rem;
    padding: 0;
    font-size: 1rem;
    font-weight: 400;
    font-family: var(--header-font);
    opacity: 70%;
    margin-bottom: 1.5rem;
    text-align: center;
}

header a {
    align-self: flex-start;
    text-align: left;
}

/*
    -------------------------------------------
    TYPOGRAPHY
    -------------------------------------------
*/
h1,
h2,
h3,
h4,
h5,
p,
a {
    text-align: justify;
    text-justify: inter-word;
    margin: 0.5rem 0;
}

h1,
h2,
h3 {
    letter-spacing: 0.02em;
    margin-bottom: 1.2em;
}

p {
    font-size: 1.1rem; /* slightly bigger font-size*/
    text-indent: 1.5rem;
    line-height: 160%; /* Increased line-height for better readability*/
    font-family: var(--body-font);
    margin-bottom: 1rem;
}


a {
    text-decoration: none;
    font-weight: 500;
    color: var(--link);
	text-shadow: none;
}

a:hover {
	text-decoration: underline;
    color: var(--link);
	text-shadow: none;
}

h1 {
    font-size: 1.8rem;
    font-family: var(--header-font);
}

h2 {
    font-size: 1.4rem;
    font-family: var(--header-font);
}

h3 {
    font-size: 1.2rem;
    font-family: var(--header-font);
}

h4 {
    font-size: 1.1rem;
    font-family: var(--header-font);
}

h5 {
    font-size: 1.0rem;
    font-family: var(--header-font);
}

/*
    -------------------------------------------
    ARTICLE INFO / METADATA
    -------------------------------------------
*/
.info {
    display: flex;
    flex-direction: column;
    row-gap: 0.2rem;
    align-items: end;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--text);
    opacity: 0.8;
    width: min-content;
    flex-grow: 10;
}

.date {
    padding: 0;
    margin: 0;
    font-size: 0.6rem;
    color: var(--text);
    filter: brightness(80%);
    width: max-content;
}

/*
    -------------------------------------------
    LIST STYLES
    -------------------------------------------
*/
/* Unordered list styles */
ul {
    margin-left: 1.5rem; /* Initial indentation */
    padding-left: 0; /* Remove default padding */
    list-style-type: disc; /* Use bullets for all levels, but sublists will have smaller size.*/
    margin-bottom: 1rem;
}

ul ul {
    margin-left: 2rem; /* Increased indentation for nested ul */
    list-style-type: circle;
}

ul ul ul{
     margin-left: 2.5rem; /* Increased indentation for nested ul */
     list-style-type: square;
}

/* Ordered list styles */
ol {
    margin-left: 1.5rem; /* Initial indentation */
    padding-left: 0; /* Remove default padding */
    list-style-type: decimal;
    margin-bottom: 1rem; /* Add some bottom margin for spacing */
    
}

ol ol {
    margin-left: 2rem; /* Increased indentation for nested ol */
    list-style-type: upper-roman;  
}

ol ol ol{
    margin-left: 2.5rem; /* Increased indentation for nested ol */
    list-style-type: decimal;
}

li {
  margin-bottom: .5rem; /* Consistent bottom margin for list items */
}

/*
    -------------------------------------------
    INPUTS
    -------------------------------------------
*/
input[type=checkbox] {
    accent-color: var(--link);
    filter: saturate(1.5);
}

/*
    -------------------------------------------
    ASIDE ELEMENT
    -------------------------------------------
*/
aside {
    margin: 0 0 0 1rem;
    padding: 0;
    display: flex;
}

aside img {
    height: 1.5rem;
    width: 1.5rem;
    margin: 0.5rem;
}

aside img:hover {
    filter: opacity(25%);
}

/*
    -------------------------------------------
    TAGS CONTAINER & FILTER
    -------------------------------------------
*/
#buttons,
.tags {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    gap: .8rem;
    margin: 0 0 0.1rem;
    padding: 0;
    flex-wrap: wrap;
}

/*
    -------------------------------------------
    FOOTER
    -------------------------------------------
*/
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/*
    -------------------------------------------
   SEARCH STYLES
    -------------------------------------------
*/
#search-input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    outline: none;
    border: none;
    border-radius: 0.7rem;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--card-background-color);
	box-shadow:
        0.1rem 0.1rem .2rem 0 var(--shadow) inset,
        -.0rem -.0rem .1rem 0 var(--background) inset;
}

#search-input:focus {
    border-radius: 0.15rem;
    box-shadow:
        0.1rem 0.1rem .3rem 0 var(--shadow),
        -.0rem -.0rem .2rem 0 var(--background);
}

#search-results {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 1rem;
    border: none;
    border-radius: 0.25rem;
    background-color: var(--card-background-color);
	box-shadow:
        0.1rem 0.1rem .3rem 0 var(--shadow),
        -.0rem -.0rem .2rem 0 var(--background);
}

#search-results li {
    padding: 0.5rem 1rem;
}

#search-results li a {
    color: var(--link);
    text-decoration: none;
    font-size: 1rem;
}

#search-results li a:hover {
    color: var(--text);
	text-decoration: underline;
}