html, body {
    height: 100%; /* Full height for the html and body */
    margin: 0; /* Remove default margin */
    font-family: Arial, Helvetica, sans-serif; /* Fallback to sans-serif */
}

body{
    min-height: 100vh; /* Ensure the body takes at least the full height of the viewport */
    background-color: #e9eff4;
    background-attachment: fixed; /* Keep the background fixed while scrolling */
    background-size: cover; /* Ensure the background covers the entire area */
}

#container{
    display: flex;
    flex-direction: column; /* Stack children vertically */
    min-height: 100vh; /* Full height of the viewport */
}

#main-content {
    box-sizing: border-box; /* Include padding in the element's total width */
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: auto;
    padding: 0 50px;
}

/*START OF NAVBAR*/
/* 3-column navbar */
.navbar {
  width: 100%;
  background-color: #e30613;
  color: white;
}

.navbar-inner {
  margin: 0 auto;
  padding: 12px 20px;

  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left | center | right */
  align-items: center;
  gap: 16px;
}

/* LEFT */
.nav-left .nav-links {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.nav-left .nav-links a {
    text-decoration: none;
    color: white;
    font-weight: normal;
    padding: 8px 12px; /* required for hover background */
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.nav-left .nav-links a:hover {
    background-color: #ea3a44;
    text-decoration: none;
    font-weight: normal;
}

/* CENTER */
.nav-center {
  justify-self: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}

.logo-image {
  height: 64px;
  width: auto;
}

.logo-text {
  font-size: 24px;
  font-weight: bold;
  white-space: nowrap;
}

/* RIGHT (search) */
.nav-right {
  justify-self: end;
}

.nav-search {
  display: flex;
  border: 2px solid #8B0000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: white;
}

.nav-search input[type="search"] {
  border: none;
  padding: 10px;
  font-size: 16px;
  outline: none;
  min-width: 220px;
}

.nav-search button {
  background-color: #B22222;
  color: white;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 16px;
}

.nav-search button:hover {
  background-color: #b30000;
}

/* Responsive: stack nicely on small screens */
@media (max-width: 900px) {
  .navbar-inner {
    grid-template-columns: 1fr; /* stacked */
    justify-items: center;
  }

  /* IMPORTANT: keep the scrolling rail constrained */
  .nav-left {
    width: 100%;
    overflow: hidden; /* clamps within navbar */
  }

  .nav-left .nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;

    gap: 10px;
    margin: 0;
    padding: 6px 10px;

    /* one row only */
    flex-wrap: nowrap;
    white-space: nowrap;

    /* slider behavior */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;

    /* SHOW scrollbar (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.7) transparent;
  }

  /* SHOW scrollbar (Chrome/Safari/Edge) */
  .nav-left .nav-links::-webkit-scrollbar {
    height: 6px;
  }

  .nav-left .nav-links::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
  }

  .nav-left .nav-links::-webkit-scrollbar-track {
    background: transparent;
  }

  .nav-left .nav-links li {
    flex: 0 0 auto;
    margin: 0;
  }

  .nav-left .nav-links a {
    display: inline-block;
    white-space: nowrap;
    padding: 8px 12px;
  }

  .nav-right {
    justify-self: center;
    width: 100%;
  }

  .nav-search {
    width: 100%;
    max-width: 520px;
  }

  .nav-search input[type="search"] {
    min-width: 0;
    width: 100%;
  }
}



/*END OF NAVBAR*/

/*START OF BREADCRUMB*/
#breadcrumb {
    display: flex; /* Use flexbox for alignment */
    justify-content: center; /* Center the items horizontally */
    align-items: center; /* Center the items vertically */
    margin: 10px 0;
    font-size: 20px;
}

#breadcrumb a {
    text-decoration: none;
    color: #ff3d00;
}

#breadcrumb span {
    margin: 0 5px;
}
/*END OF BREADCRUMB*/

/*START OF FOOTER*/
/* FOOTER OUTER (no background span) */
.site-footer {
  padding: 28px 0 16px 0;
  background: transparent;
}

/* INNER 1200px CONTAINER */
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 16px 20px;

  background-color: white;
  color: black;
  border-top: 5px solid #e30613;
}

/* Top logo */
.footer-top {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo {
  height: 56px;
  width: auto;
}

/* Columns */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}

.footer-col-title {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 700;
}

.footer-col-title a {
  color: black;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 4px;
}

.footer-col-title a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Article list */
.footer-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-article-item {
  margin: 6px 0;
}

.footer-article-item a {
  color: black;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 4px;
  display: inline-block;
}

.footer-article-item a:hover {
  text-decoration: underline;
}

/* Divider */
.footer-divider {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 12px 0;
}

/* Bottom copyright */
.footer-bottom {
  text-align: center;
  font-size: 14px;
  color: #333;
}

/* Responsive */
@media (max-width: 1100px) {
  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }
}
/*END OF FOOTER*/

/*START OF LIST PAGE*/
.page-list {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center align items horizontally */
    margin-top: 40px;
}

.page-list.home {
    margin-top: 0;
}

.page-list h1{
    font-size: 50px;
    text-align: center;
}

.page-item{
    display: none;
    margin-bottom: 20px;
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit text color from parent */
    justify-content: center; /* Center align content within each item */
    width: 100%; /* Ensure items take full width for centering */
    max-width: 1000px; /* Optional: Set a max width for the items */
    font-size: 1.2em;
    border: 2px solid white;
    background-color: rgba(255, 255, 255, 0.808);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional shadow for depth */
    padding: 10px;
}

.page-authors-container{
    display: flex;
    flex-direction: column; /* or row, depending on your layout */
    align-items: center; /* centers items horizontally */
    justify-content: center; /* centers items vertically if needed */
}

.styled-hr {
    border: none; /* Remove default border */
    height: 2px; /* Increase height for a wider line */
    background-color: rgba(128, 128, 128, 0.3); /* Set a gray color with reduced opacity */
    margin: 20px 0; /* Add some space above and below the line */
  }

/* START OF AUTHOR SINGLE */
.single-author-profile {
    width: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column; /* Change to column layout */
    align-items: center; /* Center items horizontally */
    box-sizing: border-box;
    border: 1px solid #ccc; /* Border color */
    border-radius: 10px; /* Rounded corners */
    margin: 20px 0; /* More flexible padding */
    background-color: rgba(255, 255, 255, 0.808);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional shadow for depth */
}

.author-posts {
    width: 90%; /* Make sure it takes full width */
    padding: 10px;
    display: flex;
    flex-direction: column; /* Stack posts vertically */
    align-items: center; /* Center posts horizontally */
    box-sizing: border-box;
}

.author-posts h1{
    font-size: 3em;
}

.single-author-box {
    display: flex;
    flex-direction: row; /* Ensure the flex direction is row by default */
    width: 90%; /* Ensure the box takes full width of the profile */
    height: auto;
    margin: 0 auto; /* Center the box horizontally */
    box-sizing: border-box; /* Ensure padding/borders don't affect the width */
    font-size: 1.2em;
}

.single-author-icon {
    display: flex;
    width: 30%;
    height: auto;
    margin-right: 15px; /* Space between icon and text */
    display: flex;
    justify-content: center;
    align-items: center;
}

.single-author-icon img {
    border-radius: 50%; /* Make the icon circular */
    width: 100%; /* Set width to 100% to fill the container */
    max-width: 312px;
    height: auto; /* Set height to 100% to fill the container */
    object-fit: cover; /* Ensure the image covers the entire area */
}

.single-author-details {
    flex: 1; /* Allow the details to take the remaining space */
}

.single-author-bio {
    margin-top: 5px; /* Space between name and bio */
}

/* AUTHORS LIST: override page-image sizing */
.page-authors-container .page-image {
    width: 200px;
    height: 200px;       /* square */
    margin-right: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

/* Make the image fill the square without distortion */
.page-authors-container .page-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 50%; /* circular avatar */
}

.single-author-icon {
    display: flex;
    width: 30%;
    height: auto;
    margin-right: 15px; /* Space between icon and text */
    display: flex;
    justify-content: center;
    align-items: center;
}

.single-author-icon img {
    border-radius: 50%; /* Make the icon circular */
    width: 100%; /* Set width to 100% to fill the container */
    max-width: 312px;
    height: auto; /* Set height to 100% to fill the container */
    object-fit: cover; /* Ensure the image covers the entire area */
}

/* Media query for screens 1400px or smaller */
@media (max-width: 1400px) {
    .single-author-box {
        flex-direction: column; /* Change flex direction to column */
        align-items: center; /* Center items horizontally */
    }

    .single-author-icon {
        margin-right: 0; /* Remove right margin */
        margin-bottom: 15px; /* Add space below the icon */
    }

    .single-author-icon {
        width: 60%;
    }
}

@media (max-width: 800px) {
    .single-author-profile{
        padding: 40px 0;
    }
}
/* END OF AUTHOR SINGLE */

/* START OF SWIPER */
.page-item-home {
    display: flex;
    flex-direction: column; /* Change to column layout */
    align-items: center; /* Center align items horizontally */
    border: 1px solid #ccc; /* Change the color and style as needed */
    padding: 10px; /* Optional: Add some padding inside the border */
    margin: 10px 0; /* Optional: Add some margin between items */
    border-radius: 5px; /* Optional: Add rounded corners */
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit text color from parent */
    justify-content: space-between; /* Distribute space evenly */
    font-size: 1.2em;
    background-color: rgba(255, 255, 255, 0.808);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional shadow for depth */
    max-height: 550px;
    min-height: 550px; /* Set a minimum height for consistency */
  }
  
  .swiper-container {
    width: 100%;
    height: 650px;
    position: relative;
    overflow: hidden; /* Hide extra slides */
  }

  .swiper-wrapper {
    display: flex;
  }
  
  .swiper-slide {
    display: flex; /* Use flexbox for each slide */
    flex-direction: column; /* Stack content vertically */
    justify-content: space-between; /* Distribute space evenly */
    align-items: center; /* Center align items horizontally */
    height: 550px; /* Set a fixed height for all slides */
  }
/* END OF SWIPER */

.page-item-home:hover .page-title,
.page-item:hover .page-title{
    text-decoration: underline;
}

.page-image {
    width: 200px;          /* Fixed width */
    height: 135px;         /* Fixed height (same as your max-height) */
    overflow: hidden;      /* Crop overflow */
    flex-shrink: 0;        /* Prevent shrinking in flex layouts */
    margin-right: 20px;
}

.page-image.latest{
    margin-right: 0;
}

.page-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* Crop without distortion */
    object-position: center;
    display: block;
}

body::before {
    content: "EXERCISE";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);

    font-size: 20vw;              /* Big text, scales with screen */
    font-weight: bold;
    color: rgba(255, 0, 0, 0.08); /* Light red, non-intrusive */

    pointer-events: none;         /* Click-through */
    z-index: 9999;                   /* Behind content */
    white-space: nowrap;
}

#container{
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    min-height: 100vh; /* Full height of the viewport */
}

.page-content {
    flex: 1; /* Take the remaining space */
}

.page-title {
    font-size: 1.5em;
    margin: 0;
}

.page-description {
    margin: 5px 0;
}

.page-date {
    color: gray; /* Style for the date */
    font-size: 0.9em;
}

.button-container {
    display: flex; /* Use flexbox to center the button */
    justify-content: center; /* Center the button horizontally */
    margin: 20px auto; /* Space above the button */
}

#load-more {
    background-color: #B22222; /* Green background */
    color: white; /* Button text color */
    border: none; /* Remove border */
    display: none;
    padding: 10px 20px; /* Padding for the button */
    font-size: 16px; /* Font size */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s; /* Smooth background color transition */
}

#load-more:hover {
    background-color: #8b0000;/* Darker shade on hover */
}

#load-more:focus {
    outline: none; /* Remove outline on focus */
}
/*END OF LIST PAGE*/

/*START OF SINGLE PAGE*/
.post{
    font-size: 1.2em;
    width: 60%;
    margin: 0 auto; /* This centers the element */
}

.post-title {
    font-size: 2em; /* Adjust as needed */
    margin-bottom: 0.5em; /* Space below the title */
}

.post-date {
    font-size: small;
    color: grey;
    margin-bottom: 1em; /* Space below the date */
    font-size: 1em;
}

.post-author {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Center items vertically */
    font-size: small;
    color: grey;
    margin-bottom: 1em; /* Space below the date */
    font-size: 1em;
}

.author-icon {
    vertical-align: middle;
    margin-right: 5px;
    width: 40px;
    height: auto;
}

.post-image {
  width: 100%;
  margin-bottom: 1em;
}

/* Image viewport */
.post-image-inner {
  width: 100%;
  height: 420px;
  overflow: hidden;
}

/* Image itself */
.post-image-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Caption */
.post-image .image-alt {
  margin-top: 6px;
  color: #888;
  font-size: 0.9em;
}

.post-description {
    font-weight: bold;
    margin-bottom: 1em;
    line-height: 1.7;
    font-size: 18px;
    text-align: justify;
}

.post-content{
    margin-bottom: 5em;
    line-height: 1.7;
    font-size: 18px;
    text-align: justify;
}
/*END OF SINGLE PAGE*/

/*START OF HOME PAGE*/
.image-container {
    position: relative;
    width: 60%;
    overflow: hidden;
    margin: 0 auto; /* Center horizontally */
    margin-bottom: 1em;
}

.image-container a{
    text-decoration: none;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.5s ease-in-out; /* Increased duration and smoother timing function */
}

.image-title {
    position: absolute;
    top: 70%;
    left: 5%;
    width: 60%;
    background-color: #e25d56; /* Less intense semi-transparent red background */
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    padding: 10px; /* Add some padding */
    border-radius: 5px; /* Optional: rounded corners */
    transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out; /* Increased duration for both properties */
}

/* Hover effects */
.image-container:hover img {
    filter: brightness(0.5); /* Darken the image */
}

.image-container:hover .image-title {
    background-color: #db3529; /* Lighten the box color to a more opaque but still less intense red */
    color: white; /* Change text color for better contrast */
}
/*END OF HOME PAGE*/

/*START OF LOADING BUTTON*/
[id^="summary-"] {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

.loading-container {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center;    /* Center vertically */
}

.search-loading {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #e74c3c;
    width: 120px;
    height: 120px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
  }
  
  /* Safari */
  @-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
/*END OF LOADING BUTTON*/

@media (max-width: 1250px) {
    .image-container{
        border-radius: 15px;
        width: 80%;
    }

    .image-title {
        position: static; /* Change position to static */
        top: auto; /* Reset top */
        left: auto; /* Reset left */
        width: 100%; /* Make it full width */
        background-color: rgba(253, 88, 88, 0.7); /* Keep the same background color */
    }
}

@media screen and (max-width: 1100px) {
    .future-content {
        margin-top: 10px; /* Add some space between logo and search bar */
        width: 100%; /* Make search bar take full width */
    }

    #search-query {
        width: 100%; /* Make the search input take full width */
        padding: 10px; /* Add some padding for better appearance */
        font-size: 16px; /* Adjust font size as needed */
    }

    button {
        padding: 10px; /* Add padding to the button */
        font-size: 16px; /* Adjust font size as needed */
    }

    .nav-links {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items horizontally */
    }

    .nav-links li {
        margin: 10px 0; /* Add vertical spacing between items */
        border-bottom: 3px solid transparent; /* Use a transparent border by default */
    }

    .nav-links {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items horizontally */
        display: none; /* Hide links by default */
        width: 100%; /* Full width for the menu */
    }

    .nav-links.active {
        display: flex; /* Show links when active */
    }

    .burger-menu {
        display: flex; /* Show burger menu */
    }

    .page-item, 
    .page-item-home{
        display: flex;
        flex-direction: column; /* Change to column layout */
        align-items: center; /* Center align items horizontally */
        border: 1px solid #ccc; /* Change the color and style as needed */
        padding: 10px; /* Optional: Add some padding inside the border */
        margin: 10px 0; /* Optional: Add some margin between items */
        border-radius: 5px; /* Optional: Add rounded corners */
    }

    .page-item{
        display: none;
    }

    .page-image {
        margin-right: 0; /* Remove right margin for column layout */
        margin-bottom: 5px; /* Add bottom margin for spacing */
    }

    .post{
        width: 90%;
    }

    #breadcrumb {
        flex-direction: column; /* Change to column layout */
        align-items: center; /* Center items in the column */
        text-align: center; /* Center text within the breadcrumb */
    }

    #breadcrumb span {
        margin: 5px 0; /* Adjust margin for vertical spacing */
    }

    .image-container{
        width: 100%;
    }
}


/* HOME HERO */
.home-hero {
  width: 100%;
  margin: 0 auto 22px auto;
}

.home-hero-link {
  position: relative;
  display: block;
  width: 100%;
  text-decoration: none;
}

.home-hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  border-radius: 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0.1) 60%, rgba(0,0,0,0));
}

.home-hero-title {
  margin: 0;
  color: white;
  font-size: 40px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

/* HOME GRID (3 cards per row) */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 18px auto 0 auto;
}

/* CARD */
.home-card {
  position: relative; /* IMPORTANT: anchors the badge */
  display: flex;
  flex-direction: column;

  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  overflow: hidden;

  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.home-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.10);
}

/* Top half: image */
.home-card-media {
  position: relative;
  width: 100%;
  height: 190px;
  background: #f3f3f3;
}

.home-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.home-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Section badge bottom-left */
.home-card-section {
  position: absolute;
  left: 0;
  top: calc(190px - 0px); /* bottom of the image area (since image height is 190px) */
  transform: translateY(-100%); /* pull it onto the image bottom edge */
  z-index: 2;

  padding: 6px 10px;
  background: white;
  color: #084185;
  font-size: 15px;
  letter-spacing: 0.08em;

  text-decoration: none;
  transition: color 0.15s ease;
}

.home-card-section:hover {
  color: #052d5c;
  text-decoration: underline;
}

.home-card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.home-card-body:hover .home-card-title {
  text-decoration: underline;
}

.home-hero-link:hover .home-hero-title {
  text-decoration: underline;
}

.home-card-body{
    padding: 15px;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero-img {
    height: 360px;
  }

  .home-hero-title {
    font-size: 32px;
  }
}

@media (max-width: 650px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-img {
    height: 280px;
  }

  .home-hero-title {
    font-size: 26px;
  }
}
