/* ===== Reset some default styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Base HTML and Body styles ===== */
html, body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  /*overflow-x: hidden;*/ /* Prevent horizontal scrolling. Removed to enable sticky position for .rightblock */
}

/* ===== Dividers ===== */
.divider {
  background-color: #000000;
  height: 5px;
  margin-top: 18px;
}

.divider2 {
  height: 2px;
  background-color: rgb(21, 96, 130);
}

.divider-CV {
  height: 2px;
  background-color: rgb(0, 0, 0);
  margin-bottom: 12px;
}

/* ===== Overall Page Layout Container ===== */
/* This .layout class is the main wrapper for your entire page content. */
/* It ensures all content respects the 1600px max-width and is centered. */
.layout {
  max-width: 1400px; /* Max width for the entire page content */
  margin: 0 auto; /* Center the page content */
  padding: 0 20px; /* Horizontal padding for spacing from screen edges */
  text-align: left;
}

/* Specific layout for the top navigation (logo and buttons) */
/* IMPORTANT: Make sure your HTML div for the top navigation has this class: <div class="layout top-nav"> */
.layout.top-nav {
    display: flex; /* Use flexbox for horizontal alignment */
    flex-wrap: wrap; /* Allow items to wrap if screen is too narrow (before media query kicks in) */
    justify-content: space-between; /* Pushes logo to left, buttons to right */
    align-items: center; /* Vertically aligns logo and buttons */
    padding-top: 20px;
    padding-bottom: 10px;
}

/* Container for the navigation buttons to help with spacing and wrapping */
/* Add this to your HTML around your buttons: <div class="nav-buttons"> ... buttons ... </div> */
.navbar {
  display: flex; /* Make buttons a flex container */
  flex-wrap: wrap; /* Allow buttons to wrap to next line if needed */
  gap: 10px; /* Space between buttons */
  align-items: center; /* Vertically align buttons if they have different heights */
  justify-content: flex-start;
  gap: 10px; /* optional, adds spacing between buttons */
  margin: 10px 0;
}

/* ===== Main Content Section (Article area + Right Sidebar) ===== */
/* This mainsection now defines the side-by-side layout for desktop */
.mainsection {
  display: flex; /* Use flexbox for article and rightblock to sit side-by-side */
  gap: 20px; /* Space between article and rightblock */
  /* max-width is handled by the parent .layout for the whole page */
  margin: 0 auto; /* Center within its container if it gets smaller than parent */
  padding: 0; /* Remove padding from here, it's handled by .article */
  text-align: left;
  flex-wrap: nowrap; /* Prevent wrapping on desktop screens */
  align-items: flex-start; /* Align items to the top */
}

/* The Article Section - contains the article content or the article grid */
.article {
  flex-grow: 1; /* Allow article to grow and take available space */
  flex-shrink: 1; /* Allow it to shrink if needed */
  flex-basis: 0; /* Distribute space based on flex-grow */
  min-width: 60%; /* Ensure article doesn't shrink below a reasonable width on desktop */
  padding: 20px 0; /* Consistent vertical padding for article content */
  margin-right: 100px; /* Existing margin */
}

/* Global section padding */
section {
  padding-bottom: 28px;
}

/* ===== Images ===== */
/* General responsive image rule */
img {
  max-width: 100%; /* Images will not overflow their containers */
  height: auto;    /* Maintain aspect ratio */
  display: block;  /* Prevents extra space below images */
}

/* Default padded-img style (for desktop) */
.padded-img {
  padding-top: 20px;
  padding-right: 15px;
  padding-bottom: 0px;
  padding-left: 0px;
  height: 150px; /* Default height for desktop. IMPORTANT: Remove style="height: 150px;" from your HTML <img> tag. */
  vertical-align: middle; /* Retain alignment as specified */
  object-fit: contain; /* Prevents stretching if width changes too much */
}

.emblem {
  width: 50%; /* Default width for emblem */
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Article Images in line */
.articleimage {
  height: auto;
  width: 60%;
  padding: 4px 12px 4px 12px;
  border: 2px solid black;
  background-color: white;
}

/* ===== Right Sidebar Block ===== */
.rightblock {
  flex-shrink: 0; /* Prevent rightblock from shrinking */
  width: 300px; /* Fixed width for desktop */
  background-color: #f5f5f5;
  border-top: 2px solid rgb(21, 96, 130);
  padding: 6px; /* Reduced padding for consistency */
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  background-color: rgb(209, 211, 212);
  color: #333;
  line-height: 1.2;
  position: sticky; /* Sticky for desktop */
  top: 20px;
  align-self: flex-start; /* Align to the start of the flex container */
  margin-top: 100px; /* Existing margin-top */
}

.a2akit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.a2akit {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid #ddd;
    margin: 10px 0;
    text-decoration: none;
    color: #333;
}

/* ===== Article Grid (for index.html) ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* Adaptive columns */
  gap: 20px;
  flex-grow: 1; /* This was here, keeps it */
}

/* ===== Article Cards ===== */
.article-card,
.article-card-emblem {
  position: relative;
  flex-direction: column;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 16 / 9; /* Maintain aspect ratio */
  background-size: cover;
  background-position: center;
  text-decoration: none;
  color: white; /* Default for overlay text, overridden by specific text colors */
  display: flex;
  align-items: flex-end; /* Align content to the bottom */
  overflow: hidden; /* Hide overflowing content */
  border-radius: 6px;
  transition: transform 0.2s ease;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin: 0;
  text-align: left;
}

.article-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Cover the card area */
}

.article-card-emblem img {
  width: 30%; /* Specific width for emblem in card */
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain; /* Contain within the area */
}

/* Hover effects for cards */
.article-card:hover .card-title,
.article-card:hover .card-meta,
.article-card:hover .card-text,
.article-card:hover h3,
.article-card-emblem:hover .card-title,
.article-card-emblem:hover .card-meta,
.article-card-emblem:hover .card-text,
.article-card-emblem:hover h3 {
  transform: scale(1.02);
  text-decoration: underline;
}

/* ===== Typography ===== */
h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  padding-left: 0px;
  font-size: 36px;
  color: #000000;
}
h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 100; /* Original: 100 */
  padding-left: 0px;
  padding-bottom: 20px; /* Original: 20px */
  font-size: 16px; /* Original: 16px */
  color: #000000;
}
h3 {
  font-size: 16px; /* Original: 12px */
  color: #333;
  padding-top: 6px; /* Original: 6px */
  padding-bottom: 24px; /* Original: 24px */
  text-align:left;
}
.articleimage h4 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #000000;
    padding: 12px 0px 4px 0px;
    text-align: justify;
    font-weight: normal;
}

.articleimage h4 strong {
    font-weight: bold; /* Ensures the strong tag remains bold */
}

.articletitle {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 600; /* Original: 600 */
  padding-top: 28px; /* Original: 28px */
  padding-left: 0px;
  padding-bottom: 16px; /* Original: 16px */
  font-size: 36px; /* Original: 36px */
  color: #000000;
}

.introtext {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  border-color:#000000;
  font-size: 24px;
  color: #000000;
  font-weight: 500;
  padding-top: 24px;
  padding-bottom: 24px;
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  padding: 12px;
  text-align: left;
}

.card-meta {
  font-size: 12px;
  color: #555;
  padding: 4px 12px 12px 12px;
}

.card-text {
  font-size: 14px;
  color: #000000;
  padding: 4px 12px 12px 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.asidetext {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* ===== Links ===== */
a {
  color: #3498db;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Buttons ===== */
.btn {
  background-color: #000000;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 500;
  white-space: nowrap; /* Prevent text wrapping inside buttons */
  padding: 10px 15px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* Button hover effect */
.btn:hover {
  background-color: #2980b9;
}

.comments-container {
  display: flex;
  flex-direction: column;
  max-width: 1400px; /* Max width for the entire page content */
  margin: 0 auto; /* Center the page content */
  padding: 0 20px; /* Horizontal padding for spacing from screen edges */
  text-align: left;
}

.video-container {
  display: flex; /* Establishes a flex container */
  flex-direction: column;
  justify-content: center; /* Horizontally centers the video */
  overflow: hidden;
  max-width: 70%;
  max-width: 800px;
  margin: 0 auto;
}

.responsive-video {
  /* Makes the video responsive */
  width: 100%;
  height: auto;
}

.video-container h4 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #000000;
    padding: 12px 0px 4px 0px;
    text-align: justify;
    font-weight: normal;
}

.video-container video {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.no-bullets {
  list-style-type: none;
}

.subscribe a {
  display: flex;
  align-items: center; /* This vertically centers the icon and text */
  justify-content: flex-start;
  gap: 10px; /* This adds some space between the icon and the text */
  margin: 12px 0px 12px 0px;
}

.subscribe img {
  height:auto;
}

/* ===== Footer ===== */
footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 1em 0;
  margin-top: 2em;
}

/* Styling for the link containing the image */
.popup-trigger {
    cursor: pointer;
}

/* The pop-up container (hidden by default) */
.image-popup {
    display: none; /* Initially hide the pop-up */
    position: fixed; /* Position it relative to the viewport */
    z-index: 1000; /* Make sure it's on top of other content */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255); /* Dark, semi-transparent background */
    overflow: auto; /* Allows scrolling if the image is too large */
}

/* The content inside the pop-up */
.popup-content {
  display: flex;
  flex-direction: column;
  justify-content: center; 
  margin: 5% auto;
  top: 50%;
  width: 90%;
  max-width: 800px; /* Limit the max width of the pop-up image */
}

/* The enlarged image */
.popup-image {
    max-width: 100%;
    max-height: 80vh; /* 90% of the viewport height */
    display: block;
    margin-bottom: 12px;
}

/* The close button */
.popup-close {
position: fixed;
top: 20px;
right: 36px;
color: #000000;
font-size: 36px;
font-weight: bold;
cursor: pointer;
transition: 0.3s;
z-index: 1002; /* Ensure it's above the image (which has a default z-index of auto, effectively 0) */
}
.popup-close:hover,
.popup-close:focus {
color: #000000;
text-decoration:#2980b9;
}

/* A class to show the pop-up */
.image-popup.show {
    display: flex; /* Using flexbox to easily center the content */
    justify-content: center;
    align-items: center;
}

/* Add styling for the caption inside the pop-up */
.popup-caption {
    color: #000000;
    text-align: justify;
    padding: 10px 0;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.4;
}

/* Ensure the pop-up content adjusts to the new element */
.popup-content {
    /* ... existing styles ... */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.iframe {
  /* Set display to flex to make it a flex container */
  display: flex;
  /* Make the container take up 100% of the width and give it a height */
  flex-direction: column;
  width: 100%;
  height: 450px; /* 'vh' stands for viewport height, a good starting point */
  Border: 2px solid #000000;
  border-color: #000000;
  margin: 12px;
}

.iframe h4{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #000000;
    padding: 12px 0px 4px 0px;
    text-align: justify;
    font-weight: normal;
    margin: 8px;
    }

.datatable {
  /* The key is to set both width and height to 100% */
  width: 100%;
  height: 100%;
  /* Optional: remove any default borders for a cleaner look */
  border: none;
}

.article-table {
   color: #000000;
   text-decoration: none;
}

.asidesubscribe {
  display: flex;
  align-items: center; /* This vertically centers the icon and text */
  justify-content: flex-start;
  gap: 10px; /* This adds some space between the icon and the text */
  margin: 12px 0px 12px 0px;
}

.asidesubscribe img {
  height:auto;
  width: 24px;
  margin-left: 4px;
}

.aside-newsletter {
  display: flex;
  align-items: center; /* This vertically centers the icon and text */
  justify-content: flex-start;
  gap: 10px; /* This adds some space between the icon and the text */
  margin: 12px 0px 12px 0px;
}

.aside-newsletter img {
  height:auto;
  width: 32px;

}
.indent-list {
  margin-left: 40px;
  margin-bottom: 24px;
}

q {
  font-size: 18px;
  font-weight:600;
}

/* Basic styling for the modal and overlay */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 999;
}

#modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 16px;
  border-radius: 8px;
  display: none;
  z-index: 1000;
}

#modal-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.close-button {
  display: flex;
  justify-content: flex-end;
  margin: 0px 0px 0px 0px;
  font-size: 42px;
  cursor: pointer;
}

.form-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 500;
  color:#000000;
}

.form-text{
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 500;
  color:#000000;
}

.text-input {
  font-family: Arial, Helvetica, sans-serif;
  width: 50%;
  height: 32px;
  font-size: 16px;
}

.subscribe-disclaimer {
  margin-top: 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
}

.submit {
  background-color: #000000;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 500;
  white-space: nowrap; /* Prevent text wrapping inside buttons */
  padding: 10px 15px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* ========================================================================== */
/* ======================== MEDIA QUERIES FOR RESPONSIVENESS ======================== */
/* ========================================================================== */

/* Hide AddToAny vertical share bar when screen is less than 981 pixels wide */
@media screen and (max-width: 980px) {
    .a2a_floating_style.a2a_vertical_style { display: none; }
}

/* --- Tablets and Smaller Phones (max-width: 768px) --- */
@media (max-width: 768px) {
  html, body {
    font-size: 15px; /* Slightly smaller base font size */
  }

  /* Adjust padding for the overall layout container on smaller screens */
  .layout {
    padding: 0 15px;
  }

  /* Adjust top navigation layout (logo + buttons) */
  .layout.top-nav {
    flex-direction: column; /* Stack logo and buttons vertically */
    align-items: center; /* Center items for a cleaner mobile header */
    padding-top: 15px;
    padding-bottom: 5px;
  }

  /* Container for navigation buttons on mobile */
  .nav-buttons {
      width: 100%; /* Make button container full width */
      flex-direction: column; /* Stack buttons vertically */
      gap: 10px; /* Gap between stacked buttons */
      margin-bottom: 15px; /* Padding below the buttons when stacked */
      display: flex;
      flex-wrap: wrap;
  }

  /* Specific padded-img style for mobile */
  .padded-img {
    height: 100px; /* Smaller logo on mobile */
    padding: 0; /* Remove padding for mobile */
    margin-bottom: 10px; /* Add space below logo when stacked */
  }

  .btn {
    width: 100%; /* Make navigation buttons full width */
    text-align: center; /* Center button text */
    margin: 0; /* Remove horizontal margin for stacked buttons */
  }

  /* Adjust main content layout (article + rightblock) */
  .mainsection {
    flex-direction: column; /* Stack main section and sidebar vertically */
    padding: 10px 0; /* Adjust vertical padding for smaller screens */
    gap: 30px; /* Space between stacked sections */
  }

  .article,
  .rightblock {
    flex: none; /* Remove flex sizing */
    width: 100%; /* Take full width */
    padding: 0; /* Reset padding to be handled by individual content */
    position: static; /* Remove sticky behavior on mobile */
    top: auto; /* Reset top property */
    margin-right: 0; /* Remove right margin on article for mobile */
    margin-top: 0; /* Remove top margin on rightblock for mobile */
  }

  .rightblock {
    padding: 15px; /* Add some padding back for the sidebar content */
    border-top: 2px solid rgb(21, 96, 130); /* Re-add top border for separation if desired */
    border-radius: 8px; /* Add border-radius for a card-like appearance */
  }

  /* Adjust article grid for smaller screens */
  .article-grid {
    grid-template-columns: 1fr; /* Single column layout for articles */
    gap: 15px; /* Adjust gap */
  }

  /* Adjust typography for better readability on mobile */
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 14px;
    padding-bottom: 10px;
  }
  h3 {
    font-size: 16px;
    padding: 8px;
  }
  h4 { /* Added h4 adjustments for mobile */
    font-size: 18px;
    padding: 10px 0;
  }
  .articletitle {
    font-size: 20px;
    padding-bottom: 10px;
  }
  .introtext {
    font-size: 20px;
    padding-top: 15px;
    padding-bottom: 15px;
  }
  .card-title {
    font-size: 18px;
    padding: 8px;
  }
  .card-meta, .card-text, .asidetext {
    font-size: 0.9em; /* Slightly smaller body text */
    padding: 8px 12px; /* Adjust padding for text within cards/aside */
  }
  .asidetext {
    padding-top: 8px;
    padding-bottom: 8px;
  }
    .popup-close {
        /* Position the close button closer to the corner for small screens */
        top: 5px;
        right: 15px;
        font-size: 30px; /* Make the button slightly smaller to be less intrusive */
    }

    .popup-content {
        /* On small screens, let the content take up more vertical space */
        margin: 0;
        width: 100%;
        max-width: none;
        padding: 12px;
    }

    .popup-image {
        /* On mobile, let the image occupy the full width */
        max-height: 75vh;
        margin-bottom: 5px;
    }

    .popup-caption {
        font-size: 1rem; /* Adjust font size for mobile */
        padding: 5px 0;
}

.image-popup.show {
        align-items: center; /* Keep vertical centering for mobile */
        justify-content: center;
}

#modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 16px;
  border-radius: 8px;
  display: none;
  z-index: 1000;
}

  .form-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 500;
  color:#000000;
}

.form-text{
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color:#000000;
}

.text-input {
  font-family: Arial, Helvetica, sans-serif;
  width: 80%;
  height: 32px;
  font-size: 14px;
}

.subscribe-disclaimer {
  margin-top: 9px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
}
}

/* --- Smaller Phones (max-width: 480px) --- */
@media (max-width: 480px) {
  html, body {
    font-size: 14px; /* Even smaller base font size for tiny screens */
  }

  .layout {
    padding: 0 10px; /* Reduce overall horizontal padding */
  }

  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 12px;
  }
  h3 {
    font-size: 15px;
  }
  h4 {
    font-size: 16px;
  }
  .articletitle {
    font-size: 18px;
  }
  .introtext {
    font-size: 18px;
  }
  .card-title {
    font-size: 16px;
  }
  .card-meta, .card-text, .asidetext {
    font-size: 0.85em;
  }

  .padded-img {
    height: 80px; /* Even smaller logo */
  }

  
  .form-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 500;
  color:#000000;
}

.form-text{
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color:#000000;
}

.text-input {
  font-family: Arial, Helvetica, sans-serif;
  width: 80%;
  height: 26px;
  font-size: 14px;
}

.subscribe-disclaimer {
  margin-top: 9px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
}

.subscribe {
display: flex;
  flex-direction: row;
  align-items: center;
  justify-content:flex-start; /* Correct standard value to align to the start */
  flex-wrap: wrap;
}

.RSSfeed a {
  display: flex;
  align-items: center; /* This vertically centers the icon and text */
  justify-content: flex-start;
  gap: 10px; /* This adds some space between the icon and the text */
  margin: 0px 12px 12px 0px;
}

.RSSfeed img {
  height:auto;
  margin: 0px 0px 0px 4px;
}

.newsletter a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px; /* This adds some space between the icon and the text */
}

.newsletter img {
  height:auto;
  width: 42px;
}
}