/* /static/css/globals.scss */
@import url('https://fonts.googleapis.com/css2?family=Playfair Display:wght@400;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
  :root {
    --background-topbar: #9da2b3; /* Burns sky Blue */
    --background-footer: ##482321; /* Burns jacket Brown */
    --background-sidebars: #5d6769; /* Burns hills */
   
    --ivory-white: #f2f3ed; /* Burns shirt */
    --text-dark: #482321; /* deep brown */ 
    --accent-primary: #d9b310; /* gold leaf */ 


    --font-family: 'Playfair Display', serif; /* All headings & text */
    --font-family: 'Roboto', sans-serif; /* Lists */
    --font-family: cursive, sans-serif; /* fancy headings */
  
}

/*================================================ 
    BASIC RESET 
================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Explanation: A basic reset helps normalize default browser styles, ensuring 
 consistent rendering across different browsers.
*/

.hidden {
  display: none !important;
}


/* ================================================
   GLOBAL VARIABLES
================================================ */
:root {
  --breakpoint-mobile: 768px;
  --breakpoint-desktop: 769px;
}

/* ================================================
   LAYOUT CONTAINERS
================================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  /* Explanation: Likely a primary container to center content and set a maximum width. */
}

.main-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  /* Explanation: Keeps flexbox enabled, spaces sidebars and main content, and allows wrapping as specified. */
}

/* ================================================
   SIDEBARS
================================================ */
.left-sidebar,
.right-sidebar {
  /* Default styles for all screen sizes */
  flex: 1 1 250px;
  background-color: rgba(93, 103, 105, 0.8);
  padding: 20px;
  /* Explanation: Adjusted flex properties for responsiveness, sets background color and padding. */
}

.sidebar-heading {
  margin-top: -10px;
  padding: 20px;
  text-align: center;
  text-transform: lowercase;
  font-size: 24px;
  font-weight: 100;
  font-family: cursive, sans-serif;
  text-decoration: none;
  color: #f2f3ed;
  /* Explanation: Styles for the sidebar heading. */
}

/* Search Input Styles */
#search-input {
  width: 80%;
  height: 40px;
  margin: 0 auto 20px;
  display: block;
  border-radius: 20px;
  font-size: 16px;
  padding: 0 10px;
  background-color: white;
  border: 1px solid #ccc;
  /* Explanation: Styles for the search input within the sidebar. */
}

#search-input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  background: url('data:image/svg+xml;utf8,<svg fill="%23f00" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>') center/contain no-repeat;
  cursor: pointer;
  /* Explanation: Styles for the clear button within the search input. */
}

/* Sidebar List Styles */
#titles-list {
  list-style-type: none;
  padding-left: 0;
  font-family: 'Roboto', sans-serif;
  color: white;
  /* Explanation: Styles for the list within the sidebar. */
}

#titles-list li {
  margin-bottom: 0;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  padding: 10px;
  /* Explanation: Styles for individual list items within the sidebar. */
}

#titles-list a {
  text-decoration: none;
  color: inherit;
  display: block;
  /* Explanation: Styles for links within the list items. */
}

#titles-list li:hover {
  background-color: rgba(0, 0, 0, 0.2);
  color: gold;
  /* Explanation: Hover styles for list items. */
}

/* Media Queries for Responsive Layouts */
@media (max-width: var(--breakpoint-mobile)) {
  /* Mobile-specific styles */
  .left-sidebar {
    order: -1;
    max-height: 200px;
    overflow-y: auto;
    /* Explanation: Height and order adjustments for sidebar in mobile view. */
  }
}

@media (min-width: var(--breakpoint-desktop)) {
  /* Desktop-specific styles */
  .left-sidebar {
    height: auto;
    max-height: none;
    /* Explanation: Resetting sidebar height for desktop view. */
  }
}

/*================================================ 
  BODY STYLING 
================================================ */
body {
  background-image: url("../images/robert_burns.jpg");
  background-color: #482321;
  background-size: cover;
  background-attachment: fixed;
  background-position: center top;
  background-repeat: no-repeat;
}

@media screen and (max-width: 768px) {
  body {
    background-size: contain;
    background-position: center top;
  }
}

  min-height: 100vh; /* Ensures the minimum height of the body is at least the viewport height */
  width: 100vw; /* Ensures the body takes full viewport width */
  margin: 0; /* Removes default margin */
  display: flex;
  flex-direction: column;

  font-family: 'Playfair Display', serif;
  color: #482321; 
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}



/*================================================ 
   MANUSCRIPT 
================================================ */

/*=============== LOGO & STRAPLINE */

.logo-container {
  display: flex; /* Maintain flex layout for alignment */
  align-items: center;
  padding-top: 100px;
  padding-left: 20px; /* Adding padding around the logo */
}

.logo-image {
  height: 200px; /* Set initial height */
  width: auto;   /* Automatically maintain aspect ratio */
  margin-right: 15px;  /* Add some space between logo and title */
}

.main-title {
  font-size: 60px;      /* Adjust the size as needed */
  font-weight: bold;    /* Make the text bold */
  color: #f2f3ed;         /* White text */
}


/*=============== SEARCH BOX */

.query-prompt h2 {
  margin-top: 100px;
  color: #f2f3ed;
  text-shadow: 2px 2px 4px var(--text-dark);
  font-size: 36px;
  text-align: center;
}

.nav-home-search {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: auto;
  width: 100%;
}

.search-box-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  z-index: 2; /* Higher z-index than results */
  position: relative;
}

.search-input {
  margin-top: 20px;
  width: 700px;
  height: 60px;
  background-color: #f2f3ed;
  border: 2px solid var(--text-dark);
  color: var(--text-dark);
  padding: 0 50px 0 20px;
  font-size: 16px;
  border-radius: 25px;
  outline: none;
}

.search-input-clear {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 18px;
  vertical-align: middle;
  visibility: hidden;
}

.search-input:focus + .search-input-clear {
  visibility: visible;
}

.search-results {
  width: 700px;
  max-height: 400px;
  overflow-y: auto;
  background-color: rgba(72, 35, 33, 0.9); /* Dark semi-transparent background */
  color: #f2f3ed; /* Text color */
  border: 2px solid var(--text-dark);
  
  border-radius: 25, 0, 25, 0px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: absolute;
  z-index: 1; /* Lower than search box to keep it on top */
  display: none; /* Initially hidden */
  margin-top: var(--search-results-top-margin, 440px); /* Variable for top margin, default 70px */
  padding-top: var(--search-results-top-padding, 30px); 
}

.search-results.visible {
  display: block; /* Show results when there are items to display */
}

.search-result {
  padding: 10px;
  border-bottom: 1px solid rgba(242, 243, 237, 0.2);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result a {
  text-decoration: none;
  color: #f2f3ed;
}

.search-result-flag {
  float: right;
  padding: 2px 6px;
  font-size: 12px;
  color: #482321;
  background-color: #f2f3ed;
  border-radius: 4px;
}

/*=============== NAV BOXES */

/* Container styling */
.container-1400px {
 
  max-width: 1400px; /* Maximum width */
  margin: 0 auto; /* Centering the container */
  padding: 32px; /* Outer padding for some spacing */
  text-align: center; /* Center aligning the text */
}

/* Row styling to ensure it handles the grid of boxes */
.row {
  padding-top: 100px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Centers items when they don't fill a full row */
  margin: -15px; /* Adjust margin for spacing between boxes */
}

/* Column styling for responsiveness and padding */
.col-lg-3, .col-md-6, .col-sm-12 {
  padding: 15px; /* Padding around each box for spacing */
  flex: 0 0 100%; /* Default to full width for mobile */
  max-width: 100%; /* Prevents boxes from stretching beyond 100% width */
}

@media (min-width: 768px) { /* For tablets and above */
  .col-md-6 {
    flex: 0 0 50%; /* 2 boxes in a row */
    max-width: 50%;
  }
}

@media (min-width: 992px) { /* For desktops and above */
  .col-lg-3 {
    flex: 0 0 25%; /* 4 boxes in a row, but grouped as 2x2 */
    max-width: 25%;
  }
}

/* Nav box styling */
.nav-box {
  display: block;
  background-color: rgba(217, 179, 16, 0.6); /* Gold background with 50% transparency */
  color: black; /* Text color - adjust as needed */
  padding: 40px; /* Padding inside each nav box */
  border-radius: 8px; /* Optional: Rounds corners */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Soft shadow for depth - adjust as needed */
  transition: background-color 0.3s ease; /* Smooth transition for background change */
}

.nav-box:hover {
  background-color: rgba(217, 179, 16, 1); /* Solid gold background on hover */
}

/* Heading and paragraph styling inside nav box */
.nav-box h2, .nav-box p {
  margin: 0 0 15px; /* Spacing between elements, adjust as needed */
}

.nav-box h2 {
  margin-bottom: 20px; /* Additional bottom margin for h2 */
}


/*=============== MANUSCRIPT STORY */

.robert-burns-story {
  background-color: rgba(242, 243, 237, 0.9); /* Ivory background with 90% transparency */
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
  padding: 80px; /* Padding inside the article for spacing */
  margin: 40px auto; /* Margin for spacing outside the article */
  max-width: 800px; /* Maximum width to maintain readability */
  border-radius: 5px; /* Slightly rounded corners for a softer look */
}

.robert-burns-panel {
  color: #333; /* Darker text for better readability against the light background */
  font-family: 'Playfair Display', serif; /* A serif font for a classic look, adjust as needed */
  line-height: 1.6; /* Increased line height for readability */
}

.robert-burns-panel h2 {
  font-size: 30px;
  margin-bottom: 40px; /* Space below headings */
  font-family: 'Playfair Display', serif; /* A more decorative serif font for headings */
  color: #5a4a42; /* A deeper color for headings to stand out */
}

.robert-burns-panel p {
  text-align: justify; /* Justified text for a more formal appearance */
  margin-bottom: 15px; /* Space below paragraphs */
}

/* Enhancement: Adding a parchment-like texture */
.robert-burns-story::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('..images/parchment-texture.jpg'); /* Path to a parchment texture image */
  opacity: 0.8; /* Adjust opacity for a subtle texture effect */
  z-index: -1; /* Ensure the texture is behind the text content */
  border-radius: 5px; /* Match the border-radius of the parent */
}

/* Note: Adjust the URL path to your parchment texture image in the .robert-burns-story::before selector. */



/*================================================ 
  HEADER 
================================================ */
.topbar {
  flex: 0 0 80px; /* Maintain width if needed, otherwise 'auto' would work */
  background-color: rgba(157, 162, 179, 0.8);/* Burns sky */
  padding: 20px;
  height: 80px; /* Reduced height */
  display: flex; /* Enable flexbox for easy alignment */
  align-items: center;  /* Vertically center the content */
  justify-content: space-between; /* Distribute elements with space between */
}

.topbar-title {
  display: flex; /* Makes .topbar-title a flex container */
  justify-content: flex-start; /* Aligns children (like <a>) to the left */
  align-items: center; /* Vertically centers the children */
  width: 100%; /* Full width */
}

.topbar-title a {
  text-decoration: none; /* Removes underline from the link */
  color: #f2f3ed; /* ivory text */
  white-space: nowrap; /* Prevents text from wrapping */
}



/*================================================ 
  MAIN CONTENT AREA 
================================================ */
  
.main-content-area { 
  flex: 1 1 auto; /*  Allows expansion */
  overflow-y: auto; /* Adds scroll within main content if needed */  
  background-color: rgba(95, 62, 62, 0.2); /* Ivory white, mostly transparent */
  padding: 20px;
}

/*================================================ 
  MAIN PAGE TITLE (OUTSIDE MANUSCRIPT) 
================================================ */

.section-page-outer-title-container {
  display: flex;
  align-items: center;  /* Centers content vertically */
  justify-content: center;  /* Centers content horizontally */
  margin-top: 60px;  margin-bottom: 20px;
  padding: 0;
  max-width: 600px;
  width: 100%;  /* Ensure the container takes full width of its parent if needed */
  height: auto;  /* Auto height based on content */
  position: relative;
  overflow: hidden;
}

.section-page-outer-title {
  font-family: 'Playfair Display', serif;  /* Stylish serif font */
  font-size: 36px;
  font-weight: bold;
  color: #f2f3ed;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);  /* Soft shadow for depth */
  background-color: rgba(72, 35, 33, 0.6);   /* Semi-transparent brown background */
  padding: 20px;
  border-radius: 10px;
  margin: 0 auto;  /* Zero margin to ensure it centers correctly */
  text-align: center;  /* Ensure text itself is centered if it's multi-line */
  width: calc(100% - 160px); /* Adjust width to account for padding and ensure it is centered */
}



/*================================================ 
  FOOTER
================================================ */

.footer {
  height: 200px; /* Increased height */
  background-color: rgba(72, 35, 33, 0.8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.footer-section {
  flex: 1;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the logo and caption */
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: -10px;
}

.footer-logo {
  transform: scale(0.5); /* Adjusted scale to avoid squashing */
}

.footer-strapline {
  line-height: 1.5;
  color: gold;
  text-align: center; /* Center the caption text */
}

.footer-strapline-text {
  margin-bottom: 5px;
}

.footer-link {
  color: #fff;
  text-decoration: none;
}

.footer-middle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-middle .footer-link {
  margin-bottom: 10px;
}

.footer-right {
  text-align: right;
}

/*================================================ 
  SECTION PAGE 
================================================ */

.footer-logo  {
    font-size: 3em; /* Adjust the size as necessary */
    font-weight: bold;
    text-align: center; /* Centers the text horizontally */
    width: 100%; /* Ensures the container spans the full width of its parent */
    margin: 0 auto; /* Applies auto margins on both sides */
    display: flex; /* Enables flexbox */
    justify-content: center; /* Centers children (text) horizontally in the flex container */
    align-items: center; /* Centers children (text) vertically in the flex container */
    height: 100px; /* Adjust the height as necessary to give space for vertical centering */
}


/*================================================ 
  MANUSCRIPT 
================================================ */

.manuscript {
  position: relative; /* Added to ensure the ::before pseudo-element is positioned relative to this container */
  background-color: rgba(242, 243, 237, 0.9); /* Ivory background with 90% transparency */
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
  padding: 80px; /* Padding inside the article for spacing */
  margin: 40px auto; /* Margin for spacing outside the article */
  max-width: 800px; /* Maximum width to maintain readability */
  border-radius: 5px; /* Slightly rounded corners for a softer look */
  font-family: 'Playfair Display', serif; /* A serif font for a classic look */
  font-size: 20px;
  color: #482321;; /* Darker text for better readability */
  line-height: 1.6; /* Increased line height for readability */
  text-align: justify; /* Justified text for a formal appearance */
  overflow: hidden; /* Ensures that the ::before content does not overflow the border-radius */
}

.manuscript h1 {
  font-size: 30px;
  margin-top: 40px; /* Adjust if you need space above the h1 */
  margin-bottom: 40px; /* Increased spacing below h1 for clear separation */
  font-family: 'Playfair Display', serif; /* Ensures h1 uses this font */
  color: #482321; /* Ensuring color consistency */
}

.manuscript h2 {
  font-size: 24px;
  margin-top: 40px; /* Ensures space above h2 for clear separation */
  margin-bottom: 20px; /* Spacing below h2 */
  font-family: 'Playfair Display', serif; /* Ensures h2 uses this font */
  color: #482321; /* Ensuring color consistency */
}

.manuscript p {
  margin-bottom: 15px; /* Spacing between paragraphs */
}
.manuscript::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/parchment-texture.jpg'); /* Ensure this path is correct */
  background-size: cover; /* Cover the area without repeating */
  opacity: 0.5; /* Adjusted for a more subtle texture effect */
  z-index: -1;
  border-radius: 5px; /* Ensuring the texture adheres to the container's rounded corners */
}


.menu-direction .take-note {
  align-items: center;
  align-self: center;
  text-align: center;
  width: 60%; /* The width of the paragraph */
  color: #d9b310;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  background-color: rgba(93, 103, 105, 0.8);
  padding: 10px;
  margin-top: -60px;
  margin-bottom: 20px;
  margin-left: -100px;
}

/*================================================ 
  SPECIAL COMPONENTS 
================================================ */

body .permission_para {
  background-color: rgba(18, 9, 9, 0.8); /* Dark background */
  color: #f2f3ed; /* Light color text */
  text-align: left; /* Text aligned to the left */
  padding: 20px; /* Padding around the text */
  width: 50%; /* The width of the paragraph */
  margin: 0 auto; /* Center the paragraph */
  line-height: 1.6; /* Increase line spacing */
}

body .permission_para a {
  color: rgb(22, 157, 157);
}



  /* Keyframes for background fade effect */
  @keyframes fadeOutBackground {
      0%, 100% { background-color: rgba(255, 0, 0, 0.5); }
      50% { background-color: rgba(255, 0, 0, 0); }
  }
  

/* Explanation: Styles for the footer, likely includes similar behavior for minimizing. */
/*================================================ 
  CONTENT ADJUSTMENT 
================================================ */











/*================================================ 
   HOMEPAGE 
================================================ */

/*=============== LOGO & STRAPLINE */

.logo-container {
  display: flex; /* Maintain flex layout for alignment */
  align-items: center;
  padding-top: 100px;
  padding-left: 20px; /* Adding padding around the logo */
}

.logo-image {
  height: 200px; /* Set initial height */
  width: auto;   /* Automatically maintain aspect ratio */
  margin-right: 15px;  /* Add some space between logo and title */
}

.main-title {
  font-size: 60px;      /* Adjust the size as needed */
  font-weight: bold;    /* Make the text bold */
  color: #f2f3ed;         /* White text */
}


/*=============== SEARCH BOX */

.query-prompt h2 {
  margin-top: 100px;
  color: #f2f3ed;
  text-shadow: 2px 2px 4px var(--text-dark);
  font-size: 36px;
  text-align: center;
}

.nav-home-search {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: auto;
  width: 100%;
}

.search-box-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  z-index: 2; /* Higher z-index than results */
  position: relative;
}

.search-input {
  margin-top: 20px;
  width: 700px;
  height: 60px;
  background-color: #f2f3ed;
  border: 2px solid var(--text-dark);
  color: var(--text-dark);
  padding: 0 50px 0 20px;
  font-size: 16px;
  border-radius: 25px;
  outline: none;
}

.search-input-clear {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 18px;
  vertical-align: middle;
  visibility: hidden;
}

.search-input:focus + .search-input-clear {
  visibility: visible;
}

.search-results {
  width: 700px;
  max-height: 400px;
  overflow-y: auto;
  background-color: rgba(72, 35, 33, 0.9); /* Dark semi-transparent background */
  color: #f2f3ed; /* Text color */
  border: 2px solid var(--text-dark);
  
  border-radius: 25, 0, 25, 0px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: absolute;
  z-index: 1; /* Lower than search box to keep it on top */
  display: none; /* Initially hidden */
  margin-top: var(--search-results-top-margin, 440px); /* Variable for top margin, default 70px */
  padding-top: var(--search-results-top-padding, 30px); 
}

.search-results.visible {
  display: block; /* Show results when there are items to display */
}

.search-result {
  padding: 10px;
  border-bottom: 1px solid rgba(242, 243, 237, 0.2);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result a {
  text-decoration: none;
  color: #f2f3ed;
}

.search-result-flag {
  float: right;
  padding: 2px 6px;
  font-size: 12px;
  color: #482321;
  background-color: #f2f3ed;
  border-radius: 4px;
}

/*=============== NAV BOXES */

/* Container styling */
.container-1400px {
 
  max-width: 1400px; /* Maximum width */
  margin: 0 auto; /* Centering the container */
  padding: 32px; /* Outer padding for some spacing */
  text-align: center; /* Center aligning the text */
}

/* Row styling to ensure it handles the grid of boxes */
.row {
  padding-top: 100px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Centers items when they don't fill a full row */
  margin: -15px; /* Adjust margin for spacing between boxes */
}

/* Column styling for responsiveness and padding */
.col-lg-3, .col-md-6, .col-sm-12 {
  padding: 15px; /* Padding around each box for spacing */
  flex: 0 0 100%; /* Default to full width for mobile */
  max-width: 100%; /* Prevents boxes from stretching beyond 100% width */
}

@media (min-width: 768px) { /* For tablets and above */
  .col-md-6 {
    flex: 0 0 50%; /* 2 boxes in a row */
    max-width: 50%;
  }
}

@media (min-width: 992px) { /* For desktops and above */
  .col-lg-3 {
    flex: 0 0 25%; /* 4 boxes in a row, but grouped as 2x2 */
    max-width: 25%;
  }
}

/* Nav box styling */
.nav-box {
  display: block;
  background-color: rgba(217, 179, 16, 0.6); /* Gold background with 50% transparency */
  color: black; /* Text color - adjust as needed */
  padding: 40px; /* Padding inside each nav box */
  border-radius: 8px; /* Optional: Rounds corners */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Soft shadow for depth - adjust as needed */
  transition: background-color 0.3s ease; /* Smooth transition for background change */
}

.nav-box:hover {
  background-color: rgba(217, 179, 16, 1); /* Solid gold background on hover */
}

/* Heading and paragraph styling inside nav box */
.nav-box h2, .nav-box p {
  margin: 0 0 15px; /* Spacing between elements, adjust as needed */
}

.nav-box h2 {
  margin-bottom: 20px; /* Additional bottom margin for h2 */
}
