/*
CANUCKINGTON POST STYLESHEET - MODIFIED FOR SEPIA AND GRAY THEME & MODERN MENU & CAROUSEL CONTINUO & LEFT ALIGNED HEADER/MENU & MODAL & MAIN STORY IMAGE FLOAT & INCREASED SPACING & TWO MAIN STORIES
A SKYROCKET LABS FREE XHTML/CSS TEMPLATE - BASE
http://www.skyrocketlabs.com
fred@skyrocketlabs.com
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Roboto:wght@400;500&display=swap');

/* Color Palette (CSS Variables) - Adjusted for Sepia and Gray */
:root {
    --color-primary: #4A4A4A; /* Dark Gray */
    --color-secondary: #FFFFFF; /* White Background */
    --color-text-dark: #333333; /* Dark gray */
    --color-text-light: #FFFFFF; /* White (used sparingly) */
    --color-border: #D3C7B9; /* Soft Sepia Border */
    --color-accent: #8B7B6F; /* Muted Sepia Tone */
    --color-light-gray: #E0E0E0; /* Light Gray */
    --color-reddish-sepia: #A0522D; /* SaddleBrown - A reddish-brown compatible with sepia */
}

/* ARCHITECTURE */

body {
  font-family: 'Roboto', sans-serif; /* Use Roboto for body text */
  font-size: 90%;
  color: var(--color-text-dark); /* Use dark gray for general text */
  margin: 0;
  padding: 0;
  background: var(--color-secondary); /* Use white for background */
}

/* Containers - Adjusted for responsiveness with Bootstrap (assuming Bootstrap classes are in HTML) */
/* Removed max-width and margin: auto from header and nav to allow them to span full width */
#top,
#nav-bottom,
#sub-nav,
#content-wrapper .container, /* Target Bootstrap container */
#extras .container, /* Target Bootstrap container */
#footer {
  width: 100%;
  max-width: 980px; /* Keep max-width for main content area */
  margin: 0 auto; /* Center the main content area */
  box-sizing: border-box;
}

/* Header - Span full width, content aligned left */
#header {
  width: 100%; /* Span full viewport width */
  height: auto;
  padding: 20px 10px; /* Add padding for content inside */
  background-color: var(--color-secondary); /* White background */
  display: flex; /* Use flexbox for logo and ad */
  flex-direction: column; /* Stack by default */
  align-items: flex-start; /* Align content to the start (left) */
  box-sizing: border-box; /* Include padding in width */
}

#top {
  width: 100%; /* Span full viewport width */
  height: auto;
  padding: 10px 10px; /* Add padding */
  border-bottom: 1px solid var(--color-border); /* Softer border color */
  background-color: var(--color-light-gray); /* Light gray background for top bar */
  color: var(--color-text-dark); /* Dark text for top bar */
  box-sizing: border-box;
}


#logo, #ad {
  /* Floats and widths handled by Bootstrap grid in HTML */
  height: auto;
  margin: 0;
  /* Align text to the left */
  text-align: left;
  width: 100%; /* Allow logo/ad to take full width of header padding area on small screens */
  max-width: 960px; /* Limit width to match main content area inside padding */
}

#ad {
  margin-top: 10px;
}

/* Style for the text logo */
#logo h1 {
    font-family: 'Playfair Display', serif; /* Use Playfair Display for the logo text */
    font-size: 3.5em; /* Large font size */
    font-weight: 700; /* Bold */
    margin: 0; /* Remove default margin */
    line-height: 1.2em;
}

#logo h1 a {
    color: var(--color-reddish-sepia); /* Reddish-sepia color */
    text-decoration: none;
    transition: color 0.3s ease;
}

#logo h1 a:hover {
    color: var(--color-primary); /* Dark gray on hover */
}

/* Main Navigation Menu - Modern Styles - Left Aligned - Full Width */
#nav {
  width: 100%; /* Span full viewport width */
  height: auto;
  background: var(--color-accent); /* Muted sepia background for the entire nav bar */
  padding: 10px 10px; /* Add padding for content inside */
  text-align: left; /* Align content to the left */
  box-sizing: border-box; /* Include padding in width */
}

#nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block; /* Make the ul a block element to take full width */
  background-color: none; /* Remove background from ul */
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  width: 100%; /* Make the ul take full width of nav padding area */
  max-width: 960px; /* Limit width to match main content area inside padding */
}

#nav li {
  display: inline-block; /* Display items inline for horizontal menu */
  font-size: 1.0em;
  line-height: 1.2em;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
}

#nav li a {
  display: block; /* Make links block to fill the list item */
  color: var(--color-text-light); /* White text for nav links */
  text-decoration: none;
  padding: 12px 20px; /* Add padding inside links for larger click area */
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

#nav li a:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Subtle white overlay on hover */
  color: var(--color-text-light); /* Keep text white on hover */
  text-decoration: none;
}

#nav li.last {
  margin-right: 0;
}


#nav-bottom {
   width: 100%;
   max-width: 980px;
   height: auto;
   margin: 0 auto 20px auto; /* Increased bottom margin */
   padding: 10px;
   background: var(--color-secondary); /* White background */
   border: 1px solid var(--color-border); /* Softer border */
   border-top: none;
   box-sizing: border-box;
   box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Lighter shadow */
}

#sub-nav {
  height: auto;
  margin: 0 auto 20px auto; /* Increased bottom margin */
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border); /* Softer border */
}

#sub-nav ul {
  text-align: center;
  padding: 0;
}

#sub-nav li {
  display: inline-block;
  font-size: 0.9em;
  line-height: 1.2em;
  text-transform: uppercase;
  color: var(--color-text-dark); /* Dark text */
  margin: 0 10px;
  padding: 0;
}

#sub-nav li a {
  color: var(--color-text-dark); /* Dark text */
  text-decoration: none;
  transition: color 0.3s ease; /* Smooth transition */
}

#sub-nav li a:hover {
  color: var(--color-accent); /* Accent color on hover */
  text-decoration: underline;
}

#sub-nav li.title {
  color: var(--color-primary); /* Primary color for title */
  font-weight: bold;
}

/* FOOTER MENU */

#footer {
    background-color: var(--color-light-gray); /* Light gray background for footer */
    color: var(--color-text-dark); /* Dark text */
    padding: 20px 0; /* Adjusted padding */
}

#footer ul {
  text-align: center;
  padding: 0;
}

#footer li {
  display: inline-block;
  font-size: 0.9em;
  line-height: 1.2em;
  color: #666; /* Medium gray for footer text */
  margin: 0 10px;
  padding: 0;
}

#footer li a {
  color: var(--color-text-dark); /* Dark text for footer links */
  text-decoration: none;
  transition: color 0.3s ease; /* Smooth transition */
}

#footer li a:hover {
  color: var(--color-accent); /* Accent color on hover */
  text-decoration: underline;
}

/* ARCHITECTURE - Specific adjustments for Bootstrap grid */

#content-wrapper {
  min-height: auto;
  overflow: visible;
}

#main {
  min-height: auto;
  margin: 0;
}

#headlines {
  min-height: auto;
  overflow: visible;
}

/* Increased padding for main and featured headlines */
#main-headline {
  min-height: auto;
  padding: 20px; /* Added padding on all sides */
  border-right: none; /* Keep border removed */
  /* Margin handled by Bootstrap gutters */
}

/* Style for the previous main story */
#main-headline .previous-main-story {
    margin-top: 40px; /* Add space between the two main stories */
    padding-top: 40px;
    border-top: 1px solid var(--color-border); /* Add a separator */
}


#more-headlines {
  min-height: auto;
  padding: 20px; /* Added padding on all sides */
  /* Margin handled by Bootstrap gutters */
}

/* Style for the heading inside #more-headlines to prevent content overlap */
#more-headlines h2.heading {
    position: relative; /* Ensure z-index works */
    z-index: 2; /* Higher z-index than carousel content */
    margin-bottom: 15px; /* Add space below the heading */
}

/* Carousel Wrapper */
#more-headlines .carousel-wrapper {
    /* Increased height to ensure two stories are visible */
    /* Adjusted height based on typical content size - May need fine-tuning */
    height: 780px; /* Increased height - Keep this for now */
    overflow: hidden; /* Hide content outside the wrapper */
    position: relative; /* Needed for containing transforms */
    /* Add more top margin to ensure space below the heading */
    margin-top: 20px; /* Keep this margin */
}

/* Carousel Content Container */
#more-headlines .carousel-content {
    /* This container will hold all the story elements */
    /* Ensure hardware acceleration for smoother animation */
    transform: translate3d(0, 0, 0);
    /* Removed transition property here, animation is applied by JS */
    /* transition: transform 0.8s ease-in-out; */
    /* Add some top padding to ensure the first story is visible below the heading */
    padding-top: 10px; /* Add padding at the top of the content */
}

/* Style for individual story items within the carousel */
#more-headlines .carousel-content > div {
    margin-bottom: 20px; /* Add space between stories in the carousel */
    padding-bottom: 20px; /* Add padding below each story */
    border-bottom: 1px dotted var(--color-border); /* Add a separator */
}

#more-headlines .carousel-content > div:last-child {
     margin-bottom: 0;
     padding-bottom: 0;
     border-bottom: none; /* No border after the last item */
}


#extras {
  height: auto;
  padding: 30px 0; /* Increased padding */
  border-bottom: 1px solid var(--color-border); /* Softer border */
}

#recommended,
#programs,
#cartoon {
  height: auto;
  padding: 0;
  /* Margin handled by Bootstrap gutters */
  text-align: center;
}

/* Media query for larger screens to put logo and ad side by side */
@media (min-width: 768px) {
    #header {
        flex-direction: row; /* Side-by-side on larger screens */
        justify-content: space-between;
        align-items: center; /* Vertically align items */
    }
    #logo, #ad {
        width: auto; /* Allow width to be determined by content/flexbox */
        height: auto;
        margin: 0;
        text-align: left; /* Align text left */
    }
    #ad {
        margin-top: 0; /* Remove top margin when side-by-side */
    }
    #logo {
        margin-right: 20px; /* Add some space between logo and ad */
    }
     #logo h1 {
        font-size: 4em; /* Slightly larger on desktop */
     }

    /* Restore original widths for extras sections on larger screens */
    #recommended,
    #programs,
    #cartoon {
        width: 312px;
        padding: 0;
        text-align: left;
    }
    #recommended {
        margin-right: 20px;
    }
    #programs {
        margin-right: 10px;
    }
    #cartoon {
        margin-left: 10px;
    }
}


/* TYPOGRAPHY */

#headlines h1, #headlines h2, #headlines h3, #headlines h4 {
  font-family: 'Playfair Display', serif; /* Use Playfair Display for headlines */
  color: var(--color-primary); /* Dark color for headlines */
  font-weight: 700; /* Bold for impact */
  letter-spacing: -0.5px; /* Slightly adjusted spacing */
  margin: 0 0 10px 0; /* Adjusted margin */
}

#headlines h1 {
  font-size: 2.8em; /* Larger for main headline */
  line-height: 1.1em;
}

#headlines h2, #headlines h3 {
  font-size: 2.0em; /* Adjusted size */
  line-height: 1.2em;
}

#headlines h4 {
  font-size: 1.5em; /* Adjusted size */
  line-height: 1.3em;
}

#headlines h3 {
  margin: 20px 0 10px 0; /* Adjusted margin and added top margin */
  padding: 0; /* Removed padding */
  border-top: none; /* Removed border, rely on spacing */
}

#headlines h1 a, #headlines h2 a, #headlines h3 a, #headlines h4 a {
  color: var(--color-primary); /* Dark color for headline links */
  text-decoration: none;
  transition: color 0.3s ease; /* Smooth transition */
}

#headlines h1 a:hover, #headlines h2 a:hover, #headlines h3 a:hover, #headlines h4 a:hover {
  color: var(--color-accent); /* Accent color on hover */
  text-decoration: underline;
}

#headlines h2.heading {
  font-family: 'Roboto', sans-serif; /* Use Roboto for section headings */
  font-weight: 500; /* Medium weight */
  font-size: 1.0em; /* Smaller size */
  line-height: 1.0em;
  letter-spacing: 0.5px; /* Increased spacing */
  text-transform: uppercase;
  color: var(--color-text-light); /* White text */
  margin: 0 0 15px 0; /* Adjusted margin */
  padding: 10px 15px; /* Adjusted padding */
  background: var(--color-primary); /* Dark gray background */
  display: inline-block; /* Make it an inline-block to fit content width */
}


#main p {
  font-size: 1.0em;
  line-height: 1.6em; /* Increased line height for readability */
  margin: 0 0 16px 0;
  color: var(--color-text-dark); /* Dark text */
}

#main p.author {
  font-family: 'Roboto', sans-serif; /* Use Roboto for author */
  font-weight: 400; /* Regular weight */
  font-size: 0.9em; /* Slightly smaller */
  line-height: 1.0em;
  margin: 0 0 15px 0; /* Adjusted margin */
  color: #666; /* Medium gray */
}

#main p.author span {
  color: var(--color-accent); /* Accent color for date */
}

#main p a {
  color: var(--color-accent); /* Accent color for links */
  text-decoration: none;
  transition: color 0.3s ease; /* Smooth transition */
}

#main p a:hover {
  color: var(--color-primary); /* Darker color on hover */
  text-decoration: underline;
}

#extras h2.heading {
  font-family: 'Roboto', sans-serif; /* Use Roboto for extras headings */
  font-size: 1.2em; /* Adjusted size */
  font-weight: 500; /* Medium weight */
  line-height: 1.2em;
  letter-spacing: 0px;
  color: var(--color-primary); /* Dark color */
  margin: 0 0 15px 0; /* Adjusted margin */
  padding: 10px 0;
  border-top: 4px solid var(--color-primary); /* Darker border */
  border-bottom: 1px solid var(--color-border); /* Softer border */
}

#extras ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#extras li {
  font-size: 1.0em;
  line-height: 1.4em; /* Increased line height */
  margin: 0;
  padding: 10px 0; /* Adjusted padding */
  border-bottom: 1px dotted var(--color-border); /* Softer border */
}

#extras li.last {
  padding-bottom: 0; /* Adjusted padding */
  border-bottom: none;
}

#extras li a {
  color: var(--color-text-dark); /* Dark text for links */
  text-decoration: none;
  transition: color 0.3s ease; /* Smooth transition */
}

#extras li a:hover {
  color: var(--color-accent); /* Accent color on hover */
  text-decoration: underline;
}

/* IMAGES */

#logo img {
  /* This rule is effectively removed as the img tag is gone from HTML */
  border: 0;
}

#ad img {
  margin: 15px 0 0 0;
  border: 0;
}

#sub-nav img {
  margin: 0 5px 0 0;
  border: 0;
  vertical-align: middle;
}

/* Style for the main story image to float left */
#main-headline .main-story-img {
  float: left; /* Float the image to the left */
  margin: 0 20px 15px 0; /* Add margin to the right and bottom */
  max-width: 300px; /* Keep max width */
  width: 100%; /* Make it responsive */
  height: auto; /* Maintain aspect ratio */
  display: block; /* Ensure it behaves as a block */
  object-fit: cover;
  border: 1px solid var(--color-border); /* Add a subtle border */
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
}

/* Clear float after the image for subsequent content */
#main-headline::after {
    content: "";
    display: table;
    clear: both;
}


/* Removed #main img.lefty and #main img.righty as floats are removed */

#extras img {
  /* Styles for responsive image handled by Bootstrap img-fluid */
  max-width: 100%;
  height: auto;
  margin: 10px auto; /* Adjusted margin */
  display: block;
  border: 1px solid var(--color-border); /* Add a subtle border */
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
}


/* FORMS */

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

#search form {
  margin: 40px 0 0 0;
}

.searchfield {
  font: normal 1.0em 'Roboto', sans-serif; /* Use Roboto */
  color: var(--color-text-dark); /* Dark text */
  margin: 0 6px 0 0;
  padding: 8px; /* Increased padding */
  background: var(--color-text-light); /* White background */
  border: 1px solid var(--color-border); /* Softer border */
  border-radius: 4px; /* Rounded corners */
}

.searchbtn {
  font: normal 1.2em 'Roboto', sans-serif; /* Use Roboto */
  color: var(--color-text-light); /* White text */
  background-color: var(--color-primary); /* Dark gray background */
  border: none;
  padding: 8px 15px; /* Adjusted padding */
  border-radius: 4px; /* Rounded corners */
  cursor: pointer;
  transition: background-color 0.3s ease; /* Smooth transition */
}

.searchbtn:hover {
  background-color: var(--color-accent); /* Accent color on hover */
}

/* No need for media queries for basic column stacking, Bootstrap handles it */
/* Keep specific custom styles or typography adjustments here if needed */

/* Adjustments for Bootstrap grid spacing if needed */
.row {
    --bs-gutter-x: 1.5rem; /* Default Bootstrap gutter */
    --bs-gutter-y: 1.5rem;
}

/* Optional: Add some margin below sections */
#main {
    margin-bottom: 30px;
}
#extras {
    margin-bottom: 30px;
}

/* --- Modal Styles --- */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1050; /* Sit on top (higher than Bootstrap modals if any) */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.6); /* Black with opacity */
  padding-top: 60px; /* Location of the box */
}

.modal-content {
  background-color: var(--color-secondary); /* White background */
  margin: 5% auto; /* 5% from the top and centered */
  padding: 30px; /* Increased padding */
  border: 1px solid var(--color-border); /* Softer border */
  width: 90%; /* Could be more responsive */
  max-width: 800px; /* Max width for larger screens */
  border-radius: 8px; /* Rounded corners */
  box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* More pronounced shadow */
  position: relative; /* Needed for the close button positioning */
}

.close-button {
  color: var(--color-primary); /* Dark gray color */
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
  color: var(--color-reddish-sepia); /* Reddish-sepia on hover/focus */
  text-decoration: none;
  cursor: pointer;
}

#modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2em;
    color: var(--color-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

#modal-body {
    font-family: 'Roboto', sans-serif;
    font-size: 1.0em;
    line-height: 1.6em;
    color: var(--color-text-dark);
}

#modal-body p {
    margin-bottom: 1em; /* Space between paragraphs */
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%; /* Wider on smaller screens */
        margin: 10% auto; /* Adjust margin */
        padding: 20px;
    }
    #modal-title {
        font-size: 1.8em;
    }
}


/* Style for the heading inside #more-headlines to prevent content overlap */
#more-headlines h2.heading {
    position: relative; /* Ensure z-index works */
    z-index: 2; /* Higher z-index than carousel content */
    margin-bottom: 15px; /* Add space below the heading */
}

/* Carousel Wrapper */
#more-headlines .carousel-wrapper {
    /* Adjusted height based on typical content size - May need fine-tuning */
    height: 780px; /* Keep this height for now, might need fine-tuning */
    overflow: hidden; /* Hide content outside the wrapper */
    position: relative; /* Needed for containing transforms */
    /* Add more top margin to ensure space below the heading */
    margin-top: 20px; /* Keep this margin */
}

/* Carousel Content Container */
#more-headlines .carousel-content {
    /* This container will hold all the story elements */
    /* Ensure hardware acceleration for smoother animation */
    transform: translate3d(0, 0, 0);
    /* REMOVE or COMMENT OUT any fixed 'transition' property here */
    /* transition: transform 0.8s ease-in-out; */
    /* Add some top padding to ensure the first story is visible below the heading */
    padding-top: 10px; /* Add padding at the top of the content */
}

/* Style for individual story items within the carousel */
#more-headlines .carousel-content > div {
    margin-bottom: 20px; /* Add space between stories in the carousel */
    padding-bottom: 20px; /* Add padding below each story */
    border-bottom: 1px dotted var(--color-border); /* Add a separator */
}

#more-headlines .carousel-content > div:last-child {
     margin-bottom: 0;
     padding-bottom: 0;
     border-bottom: none; /* No border after the last item */
}

