body {
  font-family: Helvetica, Arial, sans-serif;
}
h1, h2, h3, p, a, ul, li {
  font-family: Helvetica, Arial, sans-serif;
}


:root {
    --back: #363333;
    --backhover: #222222;
    --text: #f5f3eb;
    --title: #c7e7d7;
    --link: #a0d4ff;
    --subtitle: #e7c7e7;
    --hover: #e09ea3;
  }
 
@media screen and (max-width: 1080px) {
    :root {
        --texts:4vw;
        --padding: 20px;
        --navlinks: 6.5vw;
        --subtitles: 7vw;
        --titles: 12vw;
        --top: 30vw;
        --lenght: 12px;
        --position: -52px;
        --lenght2: 36px;
        --mimage: 600px;
    }

    .image-container {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: var(--padding);
        justify-items: center;
    }
        .image-container2 {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: var(--padding);
        justify-items: center;
    }
    .image-item img {
        width: 80vw; /* Set width to 80% of viewport width */
        height: auto; /* Let the browser calculate the height to maintain aspect ratio */
        transition: transform 0.3s; /* Add a smooth transition for the image */
        border-radius: 10vw;
    }
        .image-item2 img {
        width: 80vw; /* Set width to 80% of viewport width */
        height: auto; /* Let the browser calculate the height to maintain aspect ratio */
        transition: transform 0.3s; /* Add a smooth transition for the image */
        border-radius: 10vw;
    }
    
    .page-selector {
        flex-direction: row;
        align-items: center;
    }

    .page-selector label {
        margin-right: 10px;
    }

    .news {
        display: block; /* Default block layout stacks content */
        text-align: center; /* Optional: Centers text and image */
    }
    
    .news img {
        width: auto;
        height: 90vh;
        border-radius: 2vh;
        object-fit: cover;
        margin-bottom: var(--padding); /* Space between image and text */
    }
    .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background-color: transparent; /* remove solid here */
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: visible;
}

/* Create full-width background behind sidebar */
.sidebar::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 45vw; /* or whatever % of the screen you want */
    height: 100vh;
    background-color: var(--back);
    z-index: -1;
}

}


@media screen and (min-width: 1081px) {
    :root {
        --texts:22px;
        --padding: 20px;
        --navlinks: 28px;
        --subtitles: 40px;
        --titles: 80px;
        --top: 100px;
        --lenght: 12px;
        --position: -52px;
        --lenght2: 36px;
        --mimage: 600px;
    }
    .image-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--padding);
        justify-items: center;
        margin-left: 10vw; 
    }
        .image-container2 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        justify-items: center;
        
    }
    .image-item img {
        max-width: 17vw;
        max-height: 17vw;
        transition: transform 0.3s; /* Add a smooth transition for the image */
        border-radius: 2vw;
    }
        .image-item2 img {
        max-width: 250px;
        max-height: 250px;
        transition: transform 0.3s; /* Add a smooth transition for the image */
        border-radius: 30px;
    }
    .news {
        display: flex;
        align-items: center;
        gap: 20px; /* Space between image and text */
    }
    
    .news img {
        width: 100%;
        height: auto;
        border-radius: 10px;
        object-fit: cover;
    }
    .image-item img {
  transition: transform 0.3s ease;
  cursor: pointer;
}
    .image-item2 img {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.image-item:hover img {
  transform: scale(1.05); /* Slight zoom on hover */
}
.image-item2:hover img {
  transform: scale(1.05); /* Slight zoom on hover */
}
.nav-buttons {
  position: fixed; /* fixed to viewport */
  top: 0;
  left: 0;
  width: 100vw;  /* full viewport width */
  height: 100vh; /* full viewport height */
  pointer-events: none; /* only children clickable */
}

.prev, .next, .prev2, .next2 {
  pointer-events: all;
  color: white;
  font-size: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  position: absolute;
  top: 50%;
  /* Shift vertically and horizontally to center the arrow on the point */
  transform: translate(-50%, -50%);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

.prev {
  left: calc(50% - 452px);
}

.next {
  left: calc(50% + 450px);
}

.prev2 {
  left: calc(50% - 502px);
}

.next2 {
  left: calc(50% + 500px);
}

}

@media (min-width: 1351px) and (max-width: 1450px) {
  .image-container {
    grid-template-columns: repeat(3, 1fr);
    margin-left: 15vw; /* optional: adjust margin */
  }
      .image-item img {
        max-width: 25vw;
        max-height: 25vw;
        transition: transform 0.3s; /* Add a smooth transition for the image */
        border-radius: 2vw;
    }
}

@media (min-width: 1080px) and (max-width: 1350px) {
  .image-container {
    grid-template-columns: repeat(2, 1fr);
    margin-left: 18vw; /* optional: adjust margin */
  }
      .image-item img {
        max-width: 35vw;
        max-height: 35vw;
        transition: transform 0.3s; /* Add a smooth transition for the image */
        border-radius: 2vw;
    }

}


body {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: var(--back);
    overflow-y: scroll;
    /* Add vertical scrollbar */
}

.nav-links {
    margin-bottom: var(--padding);
}

.nav-links nav a {
    text-decoration: none;
    color: var(--text);
    margin: 0 10px;
    transition: color 0.3s, font-size 0.3s;
}
.nav-links nav a {
    font-size: var(--navlinks); /* Font size*/
}

.nav-links nav a:hover {
    color: var(--link);
}

.text-container {
    color: var(--text);
    /* Set the default text color to white */
    max-width: 800px;
    padding: var(--padding);
}

.text-container h2 {
    color: var(--subtitle);
    font-size: var(--subtitles);
    font-weight: normal; /* or use 400 for standard */
}

.text-container h1 {
    color: var(--title);
    /* Set the color for headings */
    font-size: var(--titles);
    text-align: center;
    /* Center align the heading */
    margin: 0;
    /* Remove top and bottom margin */
}


.text-container a {
    text-decoration: none;
    color: var(--text);
    /* Set link color */
    transition: color 0.3s;
}


.nav-links .dropdown {
    position: relative;
    display: inline-block;
}

.nav-links .dropdown-content {
    display: none;
    position: absolute;
    border-radius: 5px;
    padding: 5px;
    background-color: rgba(20, 18, 18, 0.8); /* Adjust the fourth value (0.8) to control transparency */
    min-width: 165px;
    z-index: 1;
}

.nav-links .dropdown:hover .dropdown-content {
    display: block;
}

.counters {
    margin-top: var(--padding);
    text-align: center;
}

/* Apply styling similar to the text in the text-container */
.counters p {
    font-size: var(--texts);
    color: var(--text);
    margin: 5px 0;
    /* Adjust the margin to reduce the space between counters */
}

.counters span {
    font-size: var(--texts);
    color: var(--subtitle);
}


.text-container .link-type1 {
    text-decoration: none;
    color: var(--subtitle);
    /* Set link color for type 1 */
    transition: color 0.3s;
}

.text-container .link-type1:hover {
    color: var(--hover);
    /* Change color on hover for type 1 */
}

.text-container .link-type2 {
    text-decoration: none;
    color: var(--text);
    /* Set link color for type 2 */
    transition: color 0.3s;
}

.text-container .link-type2:hover {
    color: var(--link);
    /* Change color on hover for type 2 */
}

.image-item {
    text-align: center;
    position: relative; /* Add relative positioning */
}

.image-item a {
    text-decoration: none;
    display: block;
    position: relative;
}
.image-item2 {
    text-align: center;
    position: relative; /* Add relative positioning */
}

.image-item2 a {
    text-decoration: none;
    display: block;
    position: relative;
}


.image-item p {
    font-size: var(--texts);
    color: var(--text); /* Set the text color to white */
    margin: 5px 0;
    cursor: pointer; /* Add pointer cursor to indicate clickability */
    transition: color 0.3s; /* Add transition effect */
}

.image-item p:hover {
    color: var(--link); /* Apply the blue hover effect to text */
}

.nav-links {
position: relative;
}

.nav-links a {
text-decoration: none;
display: inline-block;
margin-right: 10px;
}

.nav-links .dropdown {
position: relative;
display: inline-block;
}


.image-container-type2 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-item-type2 {
    margin: -1px; /* Overlap images by one pixel */
    padding: 0; /* Remove padding around image items */
    line-height: 0; /* Remove spacing between inline-block elements */
}

.image-item-type2 img {
    display: block; /* Remove any remaining inline attributes */
    margin: 0; /* Remove margin around images */
    padding: 0; /* Remove padding around images */
    width: 100%; /* Ensure images take up the full width */
    height: auto; /* Maintain aspect ratio */
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--padding);
}

.pagination-button {
    text-decoration: none;
    background-color: var(--link);
    color: var(--back);
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
}

/* Additional Page Selector Styles */
.page-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 10px;
}

.page-selector select {
    padding: 5px;
}

/* Style for "Select a chapter:" label */
.page-selector label {
    color: var(--text); /* Set the color for the label */
    font-size: var(--texts);
    margin: 5px 5px 5px 0; /* Add spacing around the label */
}

/* Style for chapter select dropdown */
.page-selector select {
    padding: 5px;
    margin-right: 10px;
}

/* Style for "Next Chapter" and "Previous Chapter" buttons */
.page-selector button {
    background-color: var(--subtitle);
    color: var(--back);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s; /* Add smooth transition effect */
}

.page-selector button:hover {
    background-color: var(--hover); /* Change the background color on hover */
    color: var(--back) /* Change the text color on hover */
}

.nav-links nav {
    display: flex;
    flex-wrap: nowrap; /* Ensure that flex items do not wrap */
}

.text-container p {
    font-size: var(--texts);
    margin: 5px 0;
}


.text-container-type2 p {
    font-size: var(--texts);
    margin: 5px 0;
} 

/* Base container for images */
.magazine-container {
    display: flex;
    flex-wrap: wrap;
}

/* Style for each image on large screens */
.magazine-item {
    width: 48%; /* Default 2 images per row on large screens */
    height: auto;
    margin-bottom: 10px;
}

/* Apply the following CSS for the images inside magazine-container */
.magazine-item img {
    height: 100vh;  /* Set height to full viewport height */
    width: auto;    /* Allow the width to adjust automatically to maintain aspect ratio */
    object-fit: contain; /* Ensure image fits within the box without distortion */
}


/* Container for the navigation controls */
.navigation-bar-controls {
    position: fixed; /* Fix the controls to the left side of the screen */
    top: 50%; /* Center vertically */
    left: 0; /* Align to the left edge of the screen */
    transform: translateY(-50%); /* Adjust for perfect vertical centering */
    padding: 10px; /* Add some padding for spacing */
    background-color: rgba(0, 0, 0, 0.5); /* Optional: semi-transparent background */
    color: white; /* Text color */
    border-radius: 5px; /* Rounded corners for the navigation bar */
    z-index: 1000; /* Ensure it's on top of other elements */
}

/* Style buttons */
.navigation-bar-controls button {
    display: block;
    width: 100%; /* Make buttons fill the width */
    padding: 10px;
    margin-bottom: 10px;
    background-color: #007bff; /* Blue button color */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.navigation-bar-controls button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* Style for the page dropdown */
.navigation-bar-controls label,
.navigation-bar-controls select {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 5px;
    background-color: #fff; /* White background for the select input */
    border: 1px solid #ccc; /* Light gray border */
    border-radius: 5px;
}

.navigation-bar-controls select {
    cursor: pointer;
}

/* Initially hide the navigation controls on small screens */
@media (max-width: 768px) {
        :root {
        --mimage: 80vw;
    }
    .navigation-bar-controls {
        display: none;
        position: fixed; /* Fix it to the bottom */
        bottom: 0;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.7); /* Optional: Add a background to improve visibility */
        color: white;
        padding: 10px;
        transition: opacity 0.3s ease;
        opacity: 0;
        z-index: 1000; /* Make sure it's on top of other elements */
    }

    .navigation-bar-controls.show {
        display: block;
        opacity: 1;
    }

    .navigation-bar-controls button,
    .navigation-bar-controls select {
        background-color: #fff;
        color: #333;
        border: 1px solid #ddd;
        padding: 5px;
        margin: 5px;
        font-size: 16px;
    }
        .magazine-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .magazine-item {
        flex: 0 0 100%; /* Each image takes up the full width of the container */
        scroll-snap-align: start;
    }
}


/* Position the sidebar vertically on the left */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background-color: var(--back);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar a {
    padding: 12px 30px;
    text-decoration: none;
    white-space: nowrap;          /* prevent text wrapping */
    color: var(--text);
    display: block;
}

.sidebar a:hover:not(.logo) {
    background-color: var(--backhover);
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -30px;          /* extend hover effect left */
    padding-left: 60px;          /* keep text aligned */
    margin-right: -30px; 
}


/* Hide the sidebar by default on small screens */
.sidebar.hidden {
    transform: translateX(-220%);
    transition: transform 0.3s ease;
}

/* Show the sidebar */
.sidebar {
    transition: transform 0.3s ease;
    z-index: 1001;
}


/* Dropdown styling */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    flex-direction: column;
    background-color: var(--back);
    margin-left: 10px;
}

.dropdown-content.show {
    display: flex;
}
.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
}

.logo img {
    max-width: 120%;
    height: auto;
    object-fit: contain;
    margin-left: 30px; /* shift image to the right */
    margin-top: -6px;

}

@media screen and (max-width: 530px) {
    .logo img {
    max-width: 30%;
    height: auto;
    object-fit: contain;
    margin-left: 30px; /* shift image to the right */
    margin-top: -6px;
}
:root {
    --position: -34px;
    --lenght: 0px;
    --lenght2: 30px;
}}

.sidebar nav a {
    font-size: var(--navlinks);
}

.search-container {
  position: sticky;
  top: 20px; /* adds space even while sticky */
  background-color: transparent;
  display: flex;
  justify-content: center;
  z-index: 1000;
  margin: 20px 0;

}

.search-wrapper {
  position: relative;
  width: 300px;
  margin-left: var(--position);
}

.search-icon-img {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.7;
}

#search-input {
  width: 100%;
  padding: 8px var(--lenght) 8px var(--lenght2); /* extra space for icon */
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
}

.hamburger-menu {
  position: fixed;       /* Keeps it in place even when scrolling */
  top: 16px;             /* Distance from the top */
  left: 7px;            /* Distance from the left */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
}

.hamburger-icon {
  width: 30px;
  height: auto;
}

.main-image {
  position: relative;
  display: inline-block;
  width: var(--mimage);
}

.main-image img {
  width: 100%;
  height: auto;
  display: block;
}

.main-image img.placeholder {
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.5s ease;
  z-index: 2;
}

.main-image img.main {
  position: relative;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  border: 0 !important;
}
.text-container h2 {
  margin-top: 3rem;   /* space above the title */
  margin-bottom: 0.5rem; /* smaller space below the title */
}

/* General spacing for paragraphs */
.text-container p {
  margin-top: 0;
  margin-bottom: 1.5rem; /* spacing before next section/title */
}

/* Tighter spacing for consecutive paragraphs */
.text-container p + p {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

ul li {
    font-size: var(--texts);
    color: var(--text);
    margin: 5px 0;
    /* Adjust the margin to reduce the space between counters */
}


.modal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
}
.modal.hidden {
    display: none;
}

.modal-content {
    width: 900px;
    max-width: 90%;
    max-height: 80%;
    margin: 0 auto; /* only horizontal centering */
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    display: block; /* remove inline spacing */
    margin: auto;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    cursor: pointer;
}


body.modal-open {
    overflow: hidden;
}