/*
Theme Name: Comic Scroll
Description: A custom theme for single-pane scrolling comics with always-on dark mode.
Author: Tory Jon
Version: 1.0
*/

body {
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #f0f0f0;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: #66b3ff; /* Soft but bright blue */
  text-decoration: underline;
}

a:hover,
a:focus {
  color: #3399ff;
  text-decoration: none;
}

/* Buttons */
button,
input[type="submit"],
input[type="button"],
.btn,
form.wpcf7 input[type="submit"],
form.wpcf7 input[type="button"],
form.wpcf7 .btn {
  display: inline-block;
  font-weight: 500;
  color: #fff;
  background-color: #0d6efd;
  border: 1px solid #0d6efd;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover,
form.wpcf7 input[type="submit"]:hover,
form.wpcf7 input[type="button"]:hover,
form.wpcf7 .btn:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select,
form.wpcf7 input[type="text"],
form.wpcf7 input[type="email"],
form.wpcf7 input[type="password"],
form.wpcf7 input[type="url"],
form.wpcf7 textarea,
form.wpcf7 select {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #f8f9fa;
  background-color: #1e1e1e;
  background-clip: padding-box;
  border: 1px solid #444;
  border-radius: 0.375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus,
form.wpcf7 input:focus,
form.wpcf7 textarea:focus,
form.wpcf7 select:focus {
  border-color: #0d6efd;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Labels */
label,
form.wpcf7 label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #f0f0f0;
}

/* Form layout helper */
.form-group,
form.wpcf7 .form-group {
  margin-bottom: 1.25rem;
}

/* Base wrapper */
.site-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

:root {
  --header-h: 0px;
  --footer-h: 0px;
}

body.loading::after {
  content: "Loading...";
  display: block;
  text-align: center;
  padding: 2rem;
  font-size: 1rem;
  color: #ccc;
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 999;
  background-color: #121212; /* matches your dark background */
}

/* Header layout */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Logo */
.custom-logo {
  width: 200px;   /* half of 400px */
  height: auto;   /* keep aspect ratio */
}

/* Hamburger */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* Optional: mobile menu open state (basic style) */
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Fly-out mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background-color: #1a1a1a;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.5);
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  z-index: 1000;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-menu-list a {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 1.1rem;
}

.mobile-menu-list a:hover {
  color: #66b3ff;
}

.mobile-tag-cloud {
    padding: 20px 20px 0 0;
    border-top: 1px solid #333;
    margin-top: 20px;
}

.mobile-tag-cloud .tag-heading {
  margin-bottom: 10px;
  font-size: 1rem;
}

.mobile-tag-cloud .tag-cloud a {
  display: inline-block;
  margin: 5px 6px 0 0;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: #eee;
  background-color: #222;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.mobile-tag-cloud .tag-cloud a:hover {
  background-color: #444;
}

/* When menu is open */
body.menu-open .mobile-menu {
  right: 0;
}

.menu-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}

/* Social icons in header */
.header-social {
  display: flex;
  gap: 0.75rem;
}

.header-social img {
  width: 24px;
  height: 24px;
  display: block;
  transition: opacity 0.2s ease;
}

.header-social a:hover img {
  opacity: 0.7;
}

/* Hide mobile social by default */
.mobile-social {
  display: none;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mobile-social img {
  width: 32px;
  height: 32px;
}

.homepage-hero {
  text-align: center;
  max-width: 100%;
}

.homepage-hero img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* Make the image area fill the available viewport height and center the image */
.comic-image {
  /* leave some breathing room if you want, e.g. 1rem top/bottom */
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  display: flex;
  align-items: center;
  justify-content: center;
  /* optional: if you want a max width still applied */
  padding: 1rem 0 0 0;
}

/* Keep aspect ratio, never overflow vertically, center horizontally */
.comic-image img {
  max-height: calc(100vh - var(--header-h) - var(--footer-h) - 2rem);
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.comic-title {
  font-size: 1.25rem;
  text-align:center;
  margin-top: 0
}

.comic-date {
  text-align: center;
  color: #ccc;
  margin: 10px 0;
  font-size: 0.95rem;
}

.comic-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1rem 0 0 0;
}

.comic-actions button {
  background-color: #444; /* Good contrast on black */
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  width: 140px; /* uniform button width */
  transition: background-color 0.2s ease;
  border-radius: 4px;
}

.comic-actions button:hover {
  background-color: #666;
}

.comments-area {
  margin-top: 1rem;
}

.post-divider {
  height: 2px;
  margin: 60px auto;
  width: 60%;
  background: linear-gradient(to right, transparent, #666, transparent);
}


.site-footer {
  position: sticky;
  bottom: 0;
  background-color: #121212;
  text-align: center;
  padding: 1rem;
  z-index: 998;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* allows wrapping on mobile */
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #ccc;
}

.footer-left {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
}

.footer-links a:hover {
  color: #66b3ff; /* match link hover style */
}

/* Contact Form Honey Pot */
.visually-hidden {
    position: absolute;
    left: -9999px;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.size-hidden {
    height: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
}

/* Mobile - stack links above copyright */
@media (max-width: 768px) {
  .header-social {
    display: none; /* Hide icons in header */
  }
  
  .mobile-social {
    display: flex; /* Show icons in menu */
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-links {
    order: -1; /* move links above the copyright */
  }
}

