/*
Theme Name: Calling Occupants
Theme URI: https://callingoccupantsfilm.com
Author: Calling Occupants Film
Author URI: https://callingoccupantsfilm.com
Description: A custom WordPress theme for Calling Occupants with video background and vintage aesthetic
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calling-occupants
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050402;
    color: #e2edd1;
    font-family: "kallisto-lined", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 4, 2, 0.85);
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #e2edd1;
    margin-bottom: 1rem;
}

a {
    color: #e2edd1;
    text-decoration: underline;
}

a:hover {
    opacity: 0.8;
}

/* Layout */
.site-header {
    padding: 2rem 0;
    border-bottom: 1px solid #e2edd1;
    margin-bottom: 2rem;
}

.site-title {
    display: none;
}

.site-description {
    display: none;
}

.site-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Posts */
.post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(226, 237, 209, 0.2);
}

.post:last-child {
    border-bottom: none;
}

.entry-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.entry-meta {
    display: none;
}

.entry-content {
    margin-top: 1rem;
}

.entry-content p {
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2edd1;
    text-align: center;
    opacity: 0.7;
}

/* Navigation */
.navigation {
    margin: 2rem 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
}

/* Comments */
.comments-area {
    margin-top: 2rem;
}

.comment-list {
    list-style: none;
}

.comment {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(226, 237, 209, 0.05);
    border-radius: 4px;
}

/* Buttons */
button,
input[type="submit"],
input[type="button"],
.wp-block-button__link,
a.button {
    background-color: rgba(226, 237, 209, 0.15);
    color: #e2edd1;
    border: 2px solid #e2edd1;
    padding: 0.75rem 2rem;
    font-family: "kallisto-lined", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:hover,
a.button:hover {
    background-color: rgba(226, 237, 209, 0.25);
    border-color: #e2edd1;
    opacity: 1;
}

/* Horizontal main menu with clean styling */
.main-navigation ul,
.menu-primary ul,
.menu,
.nav-menu {
  display: flex;                 /* Make items horizontal */
  gap: 1rem;                     /* Space between items */
  list-style: none;              /* No bullets */
  margin: 0;                     /* Reset default spacing */
  padding: 0;
}

.main-navigation li,
.menu-primary li,
.menu li,
.nav-menu li {
  display: inline-block;         /* Ensure items sit inline */
}

.main-navigation a,
.menu-primary a,
.menu a,
.nav-menu a {
  text-decoration: none;         /* No underline by default */
  color: inherit;                /* Use current text color */
  padding: 0.25rem 0;            /* Clickable vertical area */
  position: relative;            /* Enable underline indicator */
}

/* Show underline only for current/active page */
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.menu-primary .current-menu-item > a,
.menu-primary .current_page_item > a,
.menu .current-menu-item > a,
.menu .current_page_item > a,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  text-decoration: underline;
  text-underline-offset: 4px;    /* Slight offset for readability */
}

/* Optional: underline on hover for better affordance (remove if not desired) */
.main-navigation a:hover,
.menu-primary a:hover,
.menu a:hover,
.nav-menu a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Responsive wrap: allow menu to wrap to multiple lines on small screens */
.main-navigation ul,
.menu-primary ul,
.menu,
.nav-menu {
  flex-wrap: wrap;
  justify-content: flex-end;  /* push items to the right */
}

/* Increase right margin/padding of the main menu block */
.primary-nav {
  padding-right: 1rem; /* increase as needed (e.g., 3rem, 40px) */
}

/* If the list itself needs extra spacing from the right edge */
.primary-nav .menu {
  margin-right: 1rem; /* adjust to taste */
}

/* Center Gutenberg embed blocks including YouTube */
.wp-block-embed {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center; /* centers inline contents if any */
}

/* Ensure the iframe scales responsively and is centered */
.wp-block-embed__wrapper {
  display: inline-block;
  width: 100%;
  max-width: 800px; /* adjust to taste or remove for full content width */
}

.wp-block-embed__wrapper iframe {
  display: block;
  margin: 0 auto;
}

/* Header layout: logo left, menu right */
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Branding block stacks title/description neatly */
.branding-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo image sizing */
.site-logo img {
  display: block;
  height: 48px;   /* adjust as needed */
  width: auto;
}

/* Hide logo on the Home page (WordPress adds .home on body) */
.home .site-logo {
  display: none;
}

/* Right-justify the main menu and make it horizontal */
.primary-nav .menu {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav .menu > li {
  display: inline-block;
}

.primary-nav .menu a {
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0;
  position: relative;
}

/* Underline only for current/active page */
.primary-nav .menu .current-menu-item > a,
.primary-nav .menu .current_page_item > a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.branding-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo img {
  display: block;
  height: auto;   /* keep aspect ratio with width set in HTML */
  width: 400px;   /* reinforce width in CSS in case HTML attributes are overridden */
}

.home .site-logo {
  display: none;
}

.primary-nav .menu {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav .menu > li { display: inline-block; }

.primary-nav .menu a {
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0;
  position: relative;
}

.primary-nav .menu .current-menu-item > a,
.primary-nav .menu .current_page_item > a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header { position: relative; z-index: 10; }

/* Header layout */
.site-header {
    position: relative;
    z-index: 1;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

/* Branding */
.branding-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo img {
    display: block;
    height: auto;
    max-width: 100%;
}

/* Title link aesthetics */
.site-title a {
    color: #e2edd1;
    text-decoration: none;
}

/* Nav base */
.primary-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.primary-nav .menu a {
    color: #e2edd1;
    text-decoration: none;
}

/* Mobile toggle controls (hamburger) */
#nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(226, 237, 209, 0.3);
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    color: #e2edd1;
}

.nav-toggle-label .hamburger {
    position: relative;
    width: 22px;
    height: 2px;
    background: #e2edd1;
}
.nav-toggle-label .hamburger::before,
.nav-toggle-label .hamburger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: #e2edd1;
}
.nav-toggle-label .hamburger::before { top: -6px; }
.nav-toggle-label .hamburger::after { top: 6px; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-header-inner {
        padding: 12px 16px;
    }

    .site-logo img {
        max-width: 56vw;
        width: auto;
        height: auto;
    }

    .site-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .nav-toggle-label {
        display: inline-flex;
    }

    .primary-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        margin: 0;
        padding: 12px 16px;
        background: rgba(5, 4, 2, 0.92);
        border-top: 1px solid rgba(226, 237, 209, 0.15);
        flex-direction: column;
        gap: 12px;
    }

    #nav-toggle:checked ~ .primary-nav {
        display: flex;
    }

    .branding-area {
        flex: 1;
        min-width: 0;
    }

    .primary-nav .menu {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .site-logo img {
        max-width: 62vw;
    }
    .site-title {
        font-size: 1rem;
    }
}

/* Content container: ensure normal block flow */
#page, .site, .site-content, .entry-content {
    display: block;             /* not flex */
    text-align: initial;        /* let blocks control their own alignment */
}

/* WordPress Buttons block centering */
.wp-block-buttons {
    justify-content: center !important; /* center the button group */
}

.wp-block-buttons.is-content-justification-center {
    justify-content: center !important;
}

/* Make sure buttons don’t inherit unexpected widths */
.wp-block-buttons .wp-block-button {
    margin: 0;                  /* rely on flex gap */
}

/* Prevent absolute nav from overlapping content on mobile */
@media (max-width: 768px) {
    .site-header {
        position: relative;
    }
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
    }
    /* Push content below the header so the overlay menu doesn’t cover buttons */
    .site-header + * {
        margin-top: 12px;
    }
}

/* If your theme uses .aligncenter on blocks */
.aligncenter,
.wp-block-button.aligncenter {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Ensure content area is normal block flow and full width */
.site,
#page,
.site-content,
.site-main,
.entry-content {
  display: block;
  max-width: 100%;
}

/* WordPress Buttons block: enforce centered justification */
.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wp-block-buttons.is-content-justification-center,
.wp-block-buttons.has-custom-justify-content.is-content-justify-center,
.wp-block-buttons.aligncenter {
  justify-content: center !important;
}

/* Classic aligncenter utility */
.aligncenter {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

/* Button inner anchor should not stretch full width unless set */
.wp-block-buttons .wp-block-button {
  margin: 0;
}
.wp-block-button__link {
  display: inline-block;
}

/* Prevent header/nav styles from bleeding into content */
.site-header,
.site-header-inner,
.branding-area,
.primary-nav {
  text-align: initial;
}

/* If some global rule centers all text, reassert default for content wrappers */
.site-main,
.entry-content {
  text-align: initial;
}

/* Mobile: make sure the absolute nav doesn’t overlap or push content off-center */
@media (max-width: 768px) {
  .site-header {
    position: relative;
  }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
  }
  /* Simple buffer below header */
  .site-header + * {
    margin-top: 12px;
  }
}


