/*
Theme Name: Vertigan Poultry
Description: Fading full-screen background slideshow with translucent caption boxes and a sticky menu. Site-wide slideshow under Appearance → Slideshow, optional per-page override. Styled for Contact Form 7.
Version: 1.1.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: vertigan-poultry
*/

/* Wide screen & Global settings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  list-style-position: inside;
}

.w100 { width: 100%; }
.w98 { width: 98%; }
.w85 { width: 85%; }
.w80 { width: 80%; }
.w67 { width: 67%; }
.w50 { width: 50%; }
.w33 { width: 33%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w15 { width: 15%; }

.outline {
  border: 1px solid #CCC;
  border-radius: 1em;
}
.centered { text-align: center; }

/* Page layout: menu on top, main fills the rest of the viewport.
   Short content is centred vertically; long content grows the page
   and scrolls normally from the top. */
body {
  background: #A8B504;          /* shows until the first image has loaded */
  color: whitesmoke;
  font-family: "Germania One", serif;
  font-weight: 100;
  font-size: 1.2em;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 1em;
}

/* Fading background slideshow — fixed behind everything, always covers viewport */
.slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.slideshow .slide.prev   { opacity: 1; z-index: 1; }
.slideshow .slide.active { opacity: 1; z-index: 2; }

h1 {
  font-size: 5vh;
  color: yellow;
}

h2 {
  font-size: 4.5vh;
  color: yellow;
}

h3 {
  font-size: 4vh;
  color: yellow;
}

h1,h2,h3 {
  text-align: center;
  font-family: 'Fredericka the Great', serif;
  font-weight: 200;
}

a { color: yellowgreen; }
.plink { color: yellowgreen; text-decoration: none; }

/* Content column. Its width sets the width of everything inside it
   (captions and loose blocks alike); see the breakpoints at the bottom. */
.layout {
  width: 67%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.content-area { min-width: 0; }

/* Translucent content boxes: .caption in templates, "Caption" style on Group blocks */
.caption,
.wp-block-group.is-style-caption {
  background: #0008;
  padding: 5px;
  margin: 1em 0 0;
  vertical-align: top;
  width: 100%;
  border-radius: 1em;
}
.caption.entry-content { padding: 0.5em 1em; }   /* page wrapped automatically: a bit more room for prose */

/* Block content spacing (the global reset above zeroes all margins) */
.entry-content :where(p, ul, ol, figure, blockquote, pre, table, h1, h2, h3, h4, h5, h6) {
  margin-block: 0.5em;
}
.entry-content img,
.caption img,
.is-style-caption img {
  max-width: 100%;
  height: auto;
}

/* Sidebar (Appearance → Widgets) */
.sidebar .widget {
  background: #0008;
  padding: 5px 10px;
  margin-top: 1em;
  border-radius: 1em;
}
.sidebar h2,
.sidebar .widget-title {
  font-size: 1.3em;
  margin-bottom: 0.3em;
}
.sidebar ul { list-style: none; }
.sidebar li { margin: 0.2em 0; }
.sidebar input[type="search"],
.wp-block-search__input {
  color: white;
  background-color: rgba(0,0,0,0.6);
  border: 0;
  outline: none;
  font-family: "Germania One", serif;
  font-size: 1em;
  padding: 3px 6px;
}
.wp-block-search__button {
  background: transparent;
  border: 2px solid yellow;
  color: yellow;
  border-radius: 0.7em;
  font-family: 'Fredericka the Great', serif;
  cursor: pointer;
}

.hidden {
  display: none;
}

/* Sticky menu (WordPress menu, Appearance → Menus) */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 5px;
}
.admin-bar .site-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-nav { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-nav { top: 0; } }  /* admin bar stops being fixed here */

.pmenubar {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 5px;
  list-style: none;
}
.pmenubar li,
.pmenuitem {
  background-color: rgba(0,0,0,0.6);
  border: 2px solid yellow;
  color: yellow;
  cursor: pointer;
  font-family: 'Fredericka the Great', serif;
  margin-right: 5px;
  border-radius: 0.7em;
  font-size: 1.2em;
}
.pmenubar a,
.pmenuitem a {
  display: block;
  padding: 5px 10px;            /* on the link so the whole pill is clickable */
  color: yellow;
  text-decoration: none;
}
.pmenubar a:hover,
.pmenuitem a:hover { color: yellowgreen; }

/* Form fields — your own .ftext class, and Contact Form 7 fields */
.ftext,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
  color: white;
  background-color: rgba(0,0,0,0.6);
  outline: none;
  border: 0;
  font-family: "Germania One", serif;
  font-weight: 100;
  font-size: 1em;
  margin-bottom: 5px;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
}
.wpcf7 label { display: block; }

.translucent-button,
.wpcf7 input[type="submit"] {
  background-color: transparent;
  border: 2px solid yellow;
  color: yellow;
  padding: 5px 10px;
  cursor: pointer;
  font-family: 'Fredericka the Great', serif;
  margin-top: 5px;
  border-radius: 0.7em;
  font-size: 1.2em;
}
.wpcf7 input[type="submit"] {
  display: block;
  margin: 5px auto 0;
}
.wpcf7 input[type="submit"]:hover,
.translucent-button:hover { color: yellowgreen; border-color: yellowgreen; }
.wpcf7 form .wpcf7-response-output {
  border-radius: 0.7em;
  margin: 0.5em 0 0;
}

.tcell { display: inline-block; }
.bcell {
  display: inline-block;
  width: 49%;
}

/* Wide screens with a sidebar: content and sidebar side by side */
@media (min-width: 1024px) {
  .layout.has-sidebar {
    width: 80%;
    flex-direction: row;
    align-items: flex-start;
    gap: 1em;
  }
  .has-sidebar .content-area { flex: 1; }
  .has-sidebar .sidebar { flex: 0 0 18em; }
}

/* For Desktop: */
@media (max-width: 1535px) {
  body { font-size: 1.1em; }
  .layout { width: 75%; }
  .layout.has-sidebar { width: 92%; }
}

/* Tablet: sidebar drops below the content */
@media (max-width: 1023px) {
  body { font-size: 1em; }
  .layout,
  .layout.has-sidebar { width: 88%; }
}

/* Mobile */
@media (max-width: 767px) {
  .layout,
  .layout.has-sidebar { width: 96%; }
  .bcell {
    display: inline-block;
    width: 100%;
  }
}
