/* Import Open Sans from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,500;0,700;1,300;1,500&display=swap');

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Be Vietnam Pro,Helvetica,Ariel', sans-serif;
  background-color: #0c263d;
  color: #fff;
  line-height: 1.6;
}

/* Centered column layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}
.article {
    text-align: center;
	max-width: 800px;
    margin: 0 auto;
  	padding: 20px;
  	box-sizing: border-box;
  	align-content: center;
  	color: purple;
  	background-color: wheat;
}

/* Responsive images inline with text */
img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
}
a {
    color: red;
}

/* Optional: spacing for paragraphs and other block elements */
p {
  margin-bottom: 1.2em;
}

aside {
    float: right;
    width: 30%;
    padding: 5px;
    margin-left: 25px;  
    font-style: italic;
    color: darkblue;
    background-color: aliceblue;
}  

/* articles white background */
stories {
    background-color: #e8eaf6;
    padding: 60px 45px;
}

/* This .stories inner creates a flexible grid: 
It fits as many columns as possible with a minimum width of 250px each. */

.stories-inner {
    display: grid !important;
    /* We change 1fr to 200px to stop the 'stretching' */
    grid-template-columns: repeat(auto-fill, 200px) !important;
    gap: 15px;
    padding: 20px 0;
    justify-content: center; /* This keeps the whole grid centered on the page */
}

.story-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #1a3a5a;
    
    /* 1. Tighten the interior space */
    padding: 10px 15px; 
    
    /* 2. Remove the big height and let it be natural */
    min-height: 60px; 
    
    /* 3. This ensures the box doesn't grow to fill the whole row height */
    align-self: start; 
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: 0.3s ease;
}

.story-item a {
    color: cyan !important; /* Forces all titles to be cyan */
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.2;
    display: block;
    width: 100%;
    transition: color 0.3s ease;
}

/* Optional: Make them turn white or glow when you hover */
.story-item a:hover {
    color: #ffffff; 
}
.story-item a strong {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.hidden-story {
    display: none !important;
}

/* Mobile fix: on small screens, let them take full width */
@media (max-width: 600px) {
    .story-item {
        max-width: 100%;
        flex: 1 1 100%;
    }
}
.story-item h3 {
    color: #283593;
    font-size: 1.5rem;
    font-weight: normal;
    margin: 0;
}

.story-item p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}
	
/* Make sure the layout is responsive on all screen sizes */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
}
table, th, td {
  border: 2px solid cyan;
  border-collapse: collapse; }
  /* td { width: 20em; } */
  table td:nth-child(2) { text-align: right; }
  
  /* Initially hide items via JavaScript, but we need button styling */
.btn-load-more {
    background-color: rgba(0, 255, 255, 0.05); /* Very subtle cyan tint */
    color: cyan;
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 12px 40px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0; /* Square edges look more 'coded' and professional */
    transition: all 0.4s ease;
    outline: none;
}

.btn-load-more:hover {
    background-color: cyan;
    color: #0c263d; /* Dark blue background color from your body */
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px); /* Slight lift on hover */
}

.btn-load-more:active {
    transform: translateY(0); /* Sinks back down when clicked */
}

/* We will use this class in JS to hide items */
.hidden-story {
    display: none !important;
}

iframe {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* Keeps the cinematic shape */
}

/* The outer container */
.bordered-figure {
    border: 1px solid #ddd;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    background-color: #99baf0; 
 /* The Magic Line: Horizontal Offset | Vertical Offset | Blur | Color */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
    transition: transform 0.2s ease; /* Optional: adds a smooth feel */
    /* ADD THESE */
    max-width: fit-content;    /* Shrinks the blue box to fit the image */
    text-align: left;        /* Centers the caption and image in */
}

/* ADD THIS to handle the image itself */
.bordered-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 0.5rem auto; /* Centers image and adds space above caption */
    border-radius: 4px;         /* Optional: softens the image corners */
}

/* Optional: This makes the box "lift" slightly when you hover over it */
.bordered-figure:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* The wrapper for your inner content */
.bordered-paragraph {
    border-left: 4px solid #007acc; /* Adds a nice accent "callout" border */
    padding-left: 1rem;
    margin-bottom: 1rem;
    font-style: italic;
    color: black;
}

/* Styling the caption */
.bordered-figure figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    border-top: 1px dashed #ccc;
    padding-top: 0.5rem;
}

/* This ensures the text inside doesn't have double-spacing at the top/bottom */
.bordered-paragraph p {
    margin: 0;
}

footer {
    max-width: 500px;    /* Limits the box width so it looks like a neat block */
    margin: 40px auto;   /* 40px space above/below, 'auto' centers it horizontally */
    border: 2px solid cyan;
    text-align: center;
    padding: 20px;       /* Adds breathing room inside the box */
    box-sizing: border-box;
}

mark {
  background-color: white !important;
  color: black !important;
  display: inline;
}

.play-script p {
    display: flex;
    align-items: baseline; /* Keeps the name level with the first line of text */
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* This targets the initials (everything before the dialogue) */
.play-script p strong:first-child, 
.play-script p b:first-child {
    min-width: 40px;       /* Fixed width for the 'lane' */
    margin-right: 15px;    /* Gap between name and dialogue */
    flex-shrink: 0;        /* Prevents the name from being squished */
    display: inline-block;
    text-align: right;     /* Keeps initials tidy against the gap */
}

.site-footer {
    display: block;
    clear: both;
    
    /* MATCH THE ARTICLE WIDTH */
    max-width: 800px; 
    
    /* MATCH THE ARTICLE CENTERING */
    margin: 80px auto; 
    
    /* MATCH THE ARTICLE PADDING */
    padding: 20px;
    
    border: 2px solid cyan;
    text-align: center;
    box-sizing: border-box;
}

.site-footer p {
    margin: 0.5em 0;
}