/* Custom CSS for Films and Episodics page */

/* Responsive vcenterrow shortcode layout */
.vcenterrow-responsive {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
}
.vcenterrow-col {
  flex: 1 1 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.5rem;
}
@media (min-width: 768px) {
  .vcenterrow-responsive {
    flex-wrap: nowrap;
  }
  .vcenterrow-col {
    flex: 1 1 50%;
    max-width: 50%;
  }
}
@media (max-width: 767px) {
  .vcenterrow-responsive {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .vcenterrow-col {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0.5rem 0;
  }
}


/* Responsive video embed for YouTube, Vimeo, etc. */
.responsive-video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
}
.responsive-video iframe,
.responsive-video object,
.responsive-video embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
}

/* Quick fix for raw iframes from YouTube if no wrapper is present */
iframe[src*="youtube.com"], iframe[src*="youtu.be"] {
  max-width: 100vw;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  display: block;
  margin: 0 auto;
}


.vcenter-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 300px; /* Adjust as needed for your layout */
}

/* Sidebar override */
#sidebar {
  width: 20% !important;
  min-width: 180px;
  max-width: 400px;
  position: relative;
}

/* Use flexbox for main layout row */
.row,
.row-offcanvas {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
}

/* About page styles */
.col-lg-8 {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 100%;
}

.content-column-content.about-page {
  padding: 0 !important;
}

.about-content {
  color: white;
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 !important;
}

.about-page p {
  color: white;
}

.profile-image {
  max-width: 250px;
  margin: 0 auto;
  display: block;
}

/* Profile section vertical centering */
.profile-section {
  margin-top: 30px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.profile-content-container {
  display: flex;
  align-items: center;
  min-height: 300px;
}

.profile-content {
  width: 100%;
}


/* Site-wide font styling */
body {
  font-family: 'Montserrat', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

p, div, span, li, a {
  font-family: 'Montserrat', sans-serif;
}

.sidebar-content h1 {
  font-weight: 100;
  letter-spacing: 0.02em;
}

.sidebar-content p {
  font-weight: 300;
  letter-spacing: 0.01em;
}

.sidebar-menu ul li a {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sidebar-menu  {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
}

.box-masonry h4 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.box-masonry-description p {
  font-size: 1.1rem;
  font-weight: 300;
}

.content-column-content h1 {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.content-column-content p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
}

/* Two-column layout - only for films-and-episodics page */
.content-column-content .two-column-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Year sections */
.content-column-content .two-column-layout .year-section {
  width: 100%;
}

.content-column-content .two-column-layout .year-section h2 {
  font-size: 1.8rem;
  color: inherit;
  border-bottom: 1px solid #444;
  padding-bottom: 0.5rem;
  width: 100%;
}

/* Projects container */
.content-column-content .two-column-layout .projects-container {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

/* Project styling - improved for readability */
.content-column-content .two-column-layout .project {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0px 25px;
  border-radius: 5px;
  flex: 1 1 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.content-column-content .two-column-layout .project:hover {
  background-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.content-column-content .two-column-layout .project-title {
  font-weight: bold;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: inherit;
}

.content-column-content .two-column-layout .project-details {
  font-size: 1.1rem;
  line-height: 1.6;
  color: inherit;
}

/* Make sure markdown inside project details renders properly */
.content-column-content .two-column-layout .project-details p {
  margin: 0 0 0.5rem 0;
}

/* Black background for content columns */
.black-background {
  background-color: #121212 !important;
  color: #eee !important;
}

/* Code block styling */
pre, code {
  font-family: 'Montserrat', monospace;
  background-color: #1a1a1a !important;
  color: #eee !important;
  border: 0px solid #333 !important;
  border-radius: 4px;
  padding: 1rem;
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.5;
  overflow-x: auto;
}

code {
  padding: 0.2rem 0.4rem;
}

/* Media query for larger screens - improved two column layout */
@media (min-width: 768px) {
  .content-column-content .two-column-layout .project {
    flex: 0 0 calc(50% - 1rem);
    min-width: 300px;
  }
  
  .content-column-content .col-lg-8 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Media query for extra large screens */
@media (min-width: 1200px) {
  .content-column-content .two-column-layout .project {
    flex: 0 0 calc(33.333% - 1.33rem);
  }
}

/* Films and Episodics page specific styling */
.films-episodics-page .content-column-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.films-episodics-page .content-column-content h1 {
  font-size: 2.5rem;
  margin-top: 0;
  margin-bottom: 2rem;
  text-align: center;
}

/* Fix layout issues for films and episodics page */
.films-episodics-page .content-column {
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  float: right !important;
}

.films-episodics-page .row {
  margin-top: 0;
  padding-top: 0;
  display: flex;
  flex-direction: row;
}

.films-episodics-page .content-column-content {
  padding-top: 10px;
}

.films-episodics-page #all {
  padding-top: 0;
}

.films-episodics-page .container-fluid {
  padding-top: 0;
}

/* Force sidebar to stay in place */
.films-episodics-page #sidebar {
  position: fixed;
  width: 20%;
  height: 100%;
  overflow-y: auto;
}

/* Responsive: Hide sidebar and expand content on small screens */
@media (max-width: 767px) {
  .vcenter-col {
    height: auto !important;
    min-height: 0 !important;
  }

  #sidebar, .films-episodics-page #sidebar {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
  }
  .row-offcanvas-left.active #sidebar,
  .row.row-offcanvas-left.active #sidebar,
  .films-episodics-page .row-offcanvas-left.active #sidebar {
    display: block !important;
    width: 80vw !important;
    min-width: 180px !important;
    max-width: 400px !important;
    position: fixed !important;
    left: 0;
    top: 0;
    z-index: 1000;
    background: #222;
    height: 100vh;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    transition: left 0.3s;
    overflow-y: auto;
  }
  
  /* Improve mobile hamburger menu alignment with site title */
  .small-navbar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
  }
  
  .small-navbar .btn-ghost {
    padding: 6px 12px;
    margin-right: 10px;
    display: flex;
    align-items: center;
  }
  
  .small-navbar-heading {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    display: flex;
    align-items: center;
  }
  .films-episodics-page .content-column,
  .films-episodics-page .col-xs-12.col-sm-8.col-md-9.content-column {
    width: 100% !important;
    margin-left: 0 !important;
    float: none !important;
  }
  .films-episodics-page .row,
  .films-episodics-page .row.row-offcanvas {
    flex-direction: column !important;
    flex-wrap: wrap !important;
  }
}

/* Ensure content is positioned correctly */
.films-episodics-page .row.row-offcanvas {
  display: flex;
  flex-wrap: nowrap;
}

/* Adjust content width and position - only for tablets and larger screens */
@media (min-width: 768px) {
  .films-episodics-page .col-xs-12.col-sm-8.col-md-9.content-column {
    width: 80% !important;
    margin-left: 20% !important;
    float: right !important;
  }
}

.films-episodics-page .content-column-content .two-column-layout .year-section h2 {
  font-size: 2rem;
  border-bottom: 2px solid #444;
}

.films-episodics-page .content-column-content .two-column-layout .project {
  background-color: rgba(0, 0, 0, 0.03);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.films-episodics-page .content-column-content .two-column-layout .project-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.films-episodics-page .content-column-content .two-column-layout .project-details {
  font-size: 1.2rem;
  line-height: 1.8;
  white-space: pre-line; /* Preserve line breaks */
}

.films-episodics-page .content-column-content .two-column-layout .project-details p {
  margin-bottom: 0.7rem;
}

/* Ensure the layout is more spacious like the old site */
@media (min-width: 992px) {
  .films-episodics-page .content-column {
    width: 80%;
    margin-left: 20%;
  }
  
  .films-episodics-page .content-column-content .two-column-layout .project {
    flex: 0 0 calc(50% - 1.25rem);
  }
}
