:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Georgia', serif;
  
  --color-text: #333;
  --color-text-light: #555;
  --color-primary: #FF9933; /* Saffron */
  --color-primary-dark: #E68A2E;
  --color-secondary: #138808; /* Green */
  --color-accent: #000080; /* Navy Blue */
  --color-bg: #FDFDFD;
  --color-bg-alt: #F5F5F5;
  --color-border: #EAEAEA;
  --color-white: #FFFFFF;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease-in-out;
}

/* Basic Reset & Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Lighter gray */
    color: #212529; /* Darker text for better contrast */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures the body takes at least the full viewport height */
}/* /css/style.css */

/* General Reset/Base */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Responsive Container */
.container {
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

/* Breakpoints for container max-width (adjust as needed) */
@media (min-width: 576px) { /* Small devices (landscape phones) */
  .container { max-width: 540px; }
}
@media (min-width: 768px) { /* Medium devices (tablets) */
  .container { max-width: 720px; }
}
@media (min-width: 992px) { /* Large devices (desktops) */
  .container { max-width: 960px; }
}
@media (min-width: 1200px) { /* Extra large devices (large desktops) */
  .container { max-width: 1140px; }
}

/* Header and Navigation */
header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 0.5rem 0; /* Reduced padding slightly */
}

.navbar {
  position: relative; /* Crucial for positioning the absolute mobile menu */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px; /* Adjusted min-height */
}

.nav-logo {
  text-decoration: none;
  color: #007bff;
  font-size: 1.75rem;
  font-weight: bold;
}

.nav-logo:hover {
  color: #0056b3;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; /* For desktop: items in a row */
  align-items: center;
}

.nav-item {
  margin-left: 1.5rem; /* Spacing between items */
}
.nav-item:first-child {
    margin-left: 0;
}

.nav-link {
  text-decoration: none;
  color: #007bff;
  padding: 0.5rem 0; /* Vertical padding for easier clicking, no horizontal for tighter fit */
  display: block;
  transition: color 0.15s ease-in-out;
}

.nav-link:hover,
.nav-link:focus {
  color: #0056b3;
}

.nav-link i {
  margin-right: 0.4em; /* Space between icon and text */
}

/* Hamburger Toggle Button - Hidden on larger screens by default */
.nav-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: 1px solid transparent; /* For consistent sizing, can be colored on focus */
  border-radius: .25rem;
  font-size: 1.5rem;
  color: #343a40;
  cursor: pointer;
  padding: 0.25rem 0.5rem; /* Make it easier to tap */
  line-height: 1; /* Ensure icon is centered */
}
.nav-toggle:hover {
    color: #007bff;
}
.nav-toggle:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}


/* Mobile Navigation Styles */
@media (max-width: 991.98px) { /* Breakpoint before large devices (e.g., Bootstrap's lg breakpoint is 992px) */
  .nav-menu {
    display: none; /* Hidden by default on smaller screens */
    flex-direction: column; /* Stack items vertically */
    width: 100%;
    position: absolute;
    top: 100%; /* Position below the navbar */
    left: 0;
    background-color: #fff; /* White background for the dropdown */
    border-top: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.1);
    z-index: 1000; /* Ensure it's above other content */
    padding: 0.5rem 0; /* Padding for the dropdown container */
  }

  .nav-menu.is-active {
    display: flex; /* Show when toggled */
  }

  .nav-item {
    margin-left: 0;
    width: 100%;
  }

  .nav-link {
    padding: 0.75rem 1rem; /* More padding for touch targets in dropdown */
    border-bottom: 1px solid #f1f1f1; /* Light separators */
    text-align: left;
  }
  .nav-item:last-child .nav-link {
    border-bottom: none;
  }

  .nav-toggle {
    display: block; /* Show hamburger button */
  }

  .nav-container {
    /* Allow logo and toggle to take full width if needed, then wrap */
    /* flex-wrap: wrap; */ /* Uncomment if logo + toggle is too wide */
  }
}

/* Main Content Area */
main {
  padding-top: 2rem;
  padding-bottom: 2rem;
  /* Simple way to push footer down if content is short */
  min-height: calc(100vh - 100px - 70px); /* Adjust 100px (header approx) and 70px (footer approx) based on actual heights */
}

/* Footer */
footer {
  background-color: #343a40;
  color: #adb5bd; /* Lighter text color for dark background */
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9em;
}

.footer-container p {
  margin: 0;
  color: #fff;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  display: block; /* Removes bottom space under images if they are inline */
}

/* Accessibility: Focus visible for keyboard navigation */
:focus-visible {
  outline: 3px solid #007bff;
  outline-offset: 1px;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}


.container {
    width: 90%;
    max-width: 1140px; /* Common max-width for responsiveness */
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Header & Navbar */
header {
    background: #343a40; /* Dark gray */
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%; /* Ensure header spans full width */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: bold;
}

.nav-logo:hover {
    color: #adb5bd; /* Lighter gray for hover */
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.nav-item {
    margin-left: 1.5rem; /* Spacing between nav items */
}

.nav-link {
    color: #f8f9fa; /* Lighter text for links */
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 0; /* Add some padding for easier clicking and for border-bottom */
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    border-bottom: 2px solid transparent; /* For hover/active effect */
}

.nav-link:hover,
.nav-link.active { /* You might need JavaScript to dynamically add 'active' class */
    color: #007bff; /* Bootstrap primary blue, or your preferred accent color */
    border-bottom-color: #007bff;
}

.nav-link i {
    margin-right: 0.5rem; /* Space between icon and text */
}

/* Main Content Area */
main {
    flex-grow: 1; /* Allows main to fill available vertical space, pushing footer down */
    padding-top: 2rem;
    padding-bottom: 2rem;
    width: 100%; /* Ensure main content spans full width before container limits it */
}

/* Footer */
footer {
    background: #343a40; /* Match header */
    color: #adb5bd; /* Lighter text for footer */
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto; /* Pushes footer to bottom if content is short */
    width: 100%; /* Ensure footer spans full width */
}

/* In /css/style.css */

/* Styles for the shloka card's tag section */
.shloka-tags-section {
  margin-bottom: 10px;
  margin-top: 10px; /* Adds some space above the tags section */
  /* If you want "Tags:" and the tags to be more tightly coupled as a block: */
  /* display: flex; */
  /* align-items: baseline; */
}

.shloka-tags-section strong {
  margin-right: 8px; /* Space between "Tags:" label and the first tag */
  vertical-align: middle; /* Helps align the label with the tags if they wrap */
}

.shloka-tags-section .tags-container {
  display: inline-flex; /* Allows tags to flow inline with the "Tags:" label */
  flex-wrap: wrap;     /* Allows tags to wrap to the next line */
  gap: 8px;            /* Spacing between individual tag items */
  vertical-align: middle; /* Aligns the group of tags with the "Tags:" label */
}


.shloka-text-heading {
  font-family: 'Vesper Libre', serif; /* This line applies the font */
  font-size: 1.5em;
  font-weight: bold;
  color: #b33c24;
  margin-bottom: 0.75em;
  line-height: normal;
  text-align: center;
}

.shloka-transliteration {
  margin-top: 8px; /* Space below the main shloka text */
  margin-bottom: 15px; /* Space above the meaning */
  /* font-weight: bold; */
  color: #195fa0; /* Slightly darker for better readability */
  line-height: 1.65; /* A bit more spacing for IAST characters */
  font-size: 1.5rem; /* Adjust as needed, e.g., slightly smaller than main shloka */
  text-align: center; /* Optional: if you want it centered like tags */
}

/* Media query for mobile screens */
@media (max-width: 768px) { /* Adjust breakpoint as needed */
  .shloka-text-heading {
    font-size: 1em; /* Font size for mobile screens */
  }
  .shloka-transliteration {
    font-size: 1em;
  }
}

/* Optional: Style the "more-tags-toggle" button to make it look more clickable if needed */
.more-tags-toggle {
    cursor: pointer;
    color: black;
    /* Add other styles if it doesn't look like a button/link via the .tag-item class */
}

/* Ensure this file exists at src/css/style.css or create it. */
/* It is linked in base.njk. */

/* Add minimum 10px padding on left/right for main content on mobile */
@media screen and (max-width: 736px) { /* Adjust 736px if your theme uses a different breakpoint */
  #main.container {
    padding-left: 10px;
    padding-right: 10px;
    /* HTML5 UP themes usually have box-sizing: border-box; globally, which is good. */
    /* If not, you might want to add it here: box-sizing: border-box; */
  }
}



.top-advertisement-banner {
  background-color: #e0f2fe; /* Light Sky Blue */
  color: #0c5460; /* Darker Blue/Teal for text */
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #b8daff; /* Slightly darker blue for border */
  font-family: Arial, sans-serif; /* Or your site's default font */
}
.top-advertisement-banner p {
  margin: 0 0 10px 0;
  font-size: 1.1em;
}
.top-advertisement-banner p:last-child {
  margin-bottom: 0;
  font-size: 0.95em;
}
.top-advertisement-banner a {
  color: #0056b3; /* Standard link blue */
  font-weight: bold;
  text-decoration: underline;
}
.top-advertisement-banner a:hover {
  color: #003d80; /* Darker blue on hover */
}
.top-advertisement-banner code {
  background-color: #f8f9fa; /* Light grey background for code */
  color: #383d41; /* Dark grey text for code */
  padding: 3px 6px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  display: inline-block;
  margin-top: 5px;
  border: 1px solid #ced4da; /* Light border for code block */
}
.top-advertisement-banner small {
  display: block;
  margin-top: 5px;
  color: #545b62; /* Muted text color for the note */
  font-size: 0.85em;
}

.search-result-tags {
  text-align: center;
}

/* ======================== */
/* CONTRIBUTION CTA         */
/* ======================== */
.contribution-cta {
  text-align: center;
  padding: 35px 30px;
  margin-top: px;
  margin-bottom: 18px;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--color-bg), var(--color-bg-alt));
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.contribution-cta:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Margin modifiers for positioning */
.contribution-cta--top {
  margin-bottom: 40px;
}

.contribution-cta__icon {
  font-size: 2.5em;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.contribution-cta__title {
  font-size: 1.8em;
  color: var(--color-accent);
  margin-top: 0;
  margin-bottom: 10px;
}

.contribution-cta__text {
  font-size: 1.1em;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 25px auto;
}

.contribution-cta__subtext {
  font-size: 0.9em;
  color: #777;
  margin-top: 15px;
  margin-bottom: 0;
}


/* ======================== */
/* SHLOKA CARD COMPONENT    */
/* ======================== */
.shloka-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.shloka-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Wrapper can be an 'a' or 'div' tag */
.shloka-card__wrapper {
  padding: 25px;
  color: inherit;
  text-decoration: none;
  flex-grow: 1;
}

/* --- Card Text & Translation --- */
.shloka-card__text {
  font-family: var(--font-serif);
  font-size: 1.4em;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 15px 0;
}

.shloka-card__translation {
  color: var(--color-text-light);
  font-size: 1em;
  line-height: 1.6;
  margin: 0;
}
.shloka-card__translation strong {
  color: var(--color-text);
}

.shloka-card__more-link {
  color: var(--color-primary-dark);
  font-weight: bold;
}

/* --- Card Footer & Tags --- */
.shloka-card__footer {
  padding: 0 25px 20px;
}
.shloka-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.shloka-card__tag-item {
  display: inline-block;
  padding: 5px 12px;
  background-color: var(--color-bg-alt);
  border-radius: 15px;
  font-size: 0.85em;
  color: var(--color-text-light);
  text-decoration: none;
  transition: var(--transition);
}
.shloka-card__tag-item:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

/* --- Special Styles for Detail Mode --- */
.shloka-card--detail {
  box-shadow: none;
  border: none;
  background-color: transparent;
}
.shloka-card--detail:hover {
  transform: none;
}
.shloka-card--detail .shloka-card__text {
  font-size: 1.8em;
  padding-left: 20px;
  border-left: 3px solid var(--color-primary);
}
.shloka-card--detail .shloka-card__id {
  display: block;
  font-size: 0.9em;
  color: var(--color-text-light);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- "More Tags" Toggle --- */
.tag-item--hidden {
  display: none;
}
.shloka-card__more-tags-toggle {
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85em;
  color: var(--color-accent);
  background-color: var(--color-bg-alt);
  font-weight: bold;
}
.shloka-card__more-tags-toggle:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

/* ======================== */
/* TAG COMPONENT (Global)   */
/* ======================== */
.tag {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  transition: var(--transition);
}

.tag:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-white);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Modifier for the 'more tags' button */
.tag--toggle {
  cursor: pointer;
  font-weight: bold;
  color: var(--color-accent);
}

.tag--toggle:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

/* This class is still needed for the JS functionality */
.tag-item--hidden {
  display: none;
}

.tag-item {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-light);
  font-size: 0.9em;
  text-decoration: none;
  transition: var(--transition);
}
.tag-item:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
  transform: translateY(-2px);
}
