/*
Theme Name: Porquis Agricultural Society
Theme URI: https://porquisag.com/
Author: Bercell Integrated Technologies
Description: Faithful replication of the legacy porquisag.com (Sitelio) design, rebuilt as a WordPress theme with Elementor support. Header, navigation and footer are theme-level because Elementor Theme Builder requires Pro.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: porquis-ag
Tags: custom-menu, featured-images, full-width-template
*/

:root {
  --cream: rgb(239, 239, 229);
  --ink: #1d1d1d;
  --muted: #555;
  --red: #9c1212;
  --red-bright: #e72c2c;
  --peach: #f3c2ad;
  --rust: #b6491b;
  --nav-bg: rgba(20, 20, 20, .88);
  --panel: rgba(255, 255, 255, .9);
  --heading: 'Abril Fatface', Georgia, serif;
  --body: 'Lato', 'Open Sans', Arial, sans-serif;
  --navy: #0f2233;
  --green: #2c3a10;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream) var(--page-bg) center / cover fixed no-repeat;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-bright); }

/* ---------- header ---------- */
.site-header {
  background: #222 var(--hero) center 35% / cover no-repeat;
  color: #fff;
  position: relative;
}
.site-header::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45));
}
.hero-inner {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  min-height: 380px;
  display: flex; align-items: center; gap: 24px;
  padding: 32px 24px;
}
.logo img {
  width: 170px; border-radius: 50%;
  background: #fff; padding: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.hero-title { flex: 1; text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.hero-title h1 {
  font-family: 'Dancing Script', cursive; font-weight: 700;
  font-size: clamp(34px, 6vw, 60px); margin: 0; line-height: 1.1;
}
.tagline { font-family: var(--body); font-weight: 700; font-size: clamp(22px, 3.5vw, 38px); margin: 6px 0 10px; }
.tagline sup { font-size: .55em; }
.fb a { color: #fff; font-weight: 700; font-size: 14px; }
.ticket-btn {
  align-self: flex-end;
  background: var(--red-bright); color: #fff; text-decoration: none;
  text-transform: uppercase; font-weight: 700; font-size: 14px;
  padding: 12px 18px; border-radius: 6px; text-align: center; line-height: 1.2;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.ticket-btn small { display: block; font-size: 16px; }
.ticket-btn:hover { background: var(--red); color: #fff; }

/* ---------- nav (grey tiles like the original) ---------- */
.site-header { border: 8px solid var(--navy); }
.main-nav { position: relative; background: rgba(15, 34, 51, .92); z-index: 50; padding: 10px 0; }
.main-nav > ul {
  list-style: none; margin: 0 auto; padding: 0 12px; max-width: 1200px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.main-nav li { position: relative; }
.main-nav > ul > li > a {
  background: #8f8f8f; min-width: 104px; text-align: center;
  padding: 9px 14px; font-size: 14px; line-height: 1.25;
}
.main-nav > ul > li > a:hover { background: #a5a5a5; color: #fff; }
.main-nav > ul > li > a.active { background: var(--green); color: #fff; }
.main-nav a {
  display: block; color: #fff; text-decoration: none;
  padding: 14px 14px; font-size: 15px;
}
.main-nav ul ul a:hover, .main-nav ul ul a.active { color: var(--peach); }
.main-nav ul ul {
  list-style: none; margin: 0; padding: 6px 0;
  position: absolute; left: 0; top: 100%; min-width: 280px;
  background: rgba(20,20,20,.97); display: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  max-height: 75vh; overflow-y: auto;
}
.main-nav ul ul ul { position: static; display: block; box-shadow: none; padding: 0 0 0 14px; background: none; max-height: none; }
.main-nav ul ul a { padding: 8px 18px; font-size: 14px; }
.main-nav li.has-sub:hover > ul, .main-nav li.has-sub:focus-within > ul { display: block; }
.nav-toggle, .sub-toggle { display: none; }

/* ---------- content ---------- */
.content {
  max-width: 1140px; margin: 32px auto; padding: 32px;
  background: rgba(239, 239, 229, .93); border-radius: 6px;
  box-shadow: 0 6px 30px rgba(0,0,0,.12);
}
.row {
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: center; align-items: flex-start;
  margin-bottom: 24px;
}
.blk { min-width: 0; }
.txt { flex: 1 1 300px; overflow-wrap: anywhere; }
.txt.boxed { padding: 16px 18px; border-radius: 4px; }
.page-h { font-family: var(--body); font-size: 26px; margin: 0 0 16px; }
.sub-h { font-family: var(--body); font-size: 19px; margin: 24px 0 12px; }
.btnrow { justify-content: flex-start; }
.txt table { max-width: 100%; }
.pic { margin: 0; flex: 0 1 auto; }
.pic img { width: 100%; border-radius: 4px; }
.btnrow { gap: 12px; }
.btnwrap { flex: 0 0 auto; }
.btn {
  display: inline-block; background: var(--red); color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 5px; font-weight: 700; font-size: 15px;
}
.btn:hover { background: var(--red-bright); color: #fff; }
.gallery {
  flex: 1 1 100%;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px;
}
.gallery figure { margin: 0; text-align: center; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Sitelio theme classes used inside the original rich text */
.theme-text-font-heading1, .theme-text-style-headingL, .theme-text-style-title, .theme-text-style-pageTitle { font-family: var(--heading); font-weight: 400; }
.theme-text-font-heading2, .theme-text-font-body1 { font-family: var(--body); }
.theme-text-font-body2 { font-family: var(--body); font-weight: 300; }
.theme-text-style-menu { font-family: var(--body); }
.theme-text-color-0-0, .theme-text-color-4-0 { color: #fff; }
.theme-text-color-0-1, .theme-text-color-3-1, .theme-text-color-4-1 { color: #999; }
.theme-text-color-0-2, .theme-text-color-3-2, .theme-text-color-4-2 { color: #666; }
.theme-text-color-0-3, .theme-text-color-3-3, .theme-text-color-4-3 { color: #333; }
.theme-text-color-0-4, .theme-text-color-4-4 { color: #050505; }
.theme-text-color-3-0 { color: #ccc; }
.theme-text-color-3-4 { color: #000; }
.theme-text-color-1-0 { color: #f3c2ad; }
.theme-text-color-1-1 { color: #e67e51; }
.theme-text-color-1-2 { color: #b6491b; }
.theme-text-color-1-3 { color: #5d260e; }
.theme-text-color-1-4 { color: #090401; }
.theme-text-color-2-0 { color: #fce4e4; }
.theme-text-color-2-1 { color: #f28c8c; }
.theme-text-color-2-2 { color: #e72c2c; }
.theme-text-color-2-3 { color: #9c1212; }
.theme-text-color-2-4 { color: #400707; }
/* white text was designed for dark boxes; keep it readable on the light panel */
.content .txt:not(.boxed) .theme-text-color-0-0, .content .txt:not(.boxed) .theme-text-color-4-0,
.content .txt:not(.boxed) .theme-text-color-2-0, .content .txt:not(.boxed) .theme-text-color-3-0 { color: var(--ink); }
.content .txt:not(.boxed) font[color="#ffffff"] { color: var(--ink); }
.content [class*="theme-background-color"] { background: none !important; }
.txt.boxed a { color: inherit; }
.txt.boxed .theme-text-color-4-2 a, .txt.boxed .theme-text-color-4-2 { color: #8bd34a; }

/* ---------- footer ---------- */
.site-footer { background: #1b1b1b; color: #ddd; font-size: 14px; }
.foot-inner {
  max-width: 1200px; margin: 0 auto; padding: 28px 24px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; align-items: center;
}
.site-footer a { color: var(--peach); }
.site-footer p { margin: 4px 0; }
.foot-col.center { text-align: center; }
.foot-col.right { text-align: right; }
.oaas { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; text-decoration: none; }
.oaas img { width: 48px; background: #fff; border-radius: 4px; padding: 2px; }
.small { font-size: 12px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button {
  position: absolute; top: 12px; right: 16px; background: none; border: 0;
  color: #fff; font-size: 40px; cursor: pointer; line-height: 1;
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .hero-inner { flex-direction: column; text-align: center; min-height: 0; padding: 24px 16px; }
  .logo img { width: 120px; }
  .ticket-btn { align-self: center; }
  .nav-toggle {
    display: block; width: 100%; background: none; border: 0; color: #fff;
    font-size: 17px; padding: 14px 16px; text-align: left; cursor: pointer;
  }
  .main-nav { padding: 0; }
  .main-nav > ul { display: none; flex-direction: column; padding: 0 0 8px; gap: 0; }
  .main-nav > ul > li > a { background: none; text-align: left; padding: 12px 16px; font-size: 15px; }
  .main-nav > ul > li > a.active { background: var(--green); }
  .site-header { border-width: 4px; }
  .main-nav.open > ul { display: flex; }
  .main-nav li.has-sub { display: flex; flex-wrap: wrap; }
  .main-nav li.has-sub > a { flex: 1; }
  .sub-toggle {
    display: block; width: 48px; background: none; border: 0; color: #fff; cursor: pointer;
  }
  .sub-toggle::after { content: "\25BE"; font-size: 18px; }
  .main-nav li.has-sub:hover > ul, .main-nav li.has-sub:focus-within > ul { display: none; }
  .main-nav ul ul { position: static; width: 100%; box-shadow: none; max-height: none; padding-left: 16px; }
  .main-nav li.has-sub.open > ul { display: block; }
  .content { margin: 16px; padding: 20px 16px; }
  .txt { flex-basis: 100% !important; }
  .txt span[style*="font-size"] { font-size: max(15px, min(1em, 7vw)); }
  .pic { max-width: 100% !important; }
  .foot-inner { grid-template-columns: 1fr; text-align: center; }
  .foot-col.right { text-align: center; }
}

/* ---------- WordPress integration ---------- */
.content ul.wp-block-list, .content ol.wp-block-list { padding-left: 22px; }
.content .alignleft { float: left; margin: 0 18px 12px 0; }
.content .alignright { float: right; margin: 0 0 12px 18px; }
.content .aligncenter { margin-left: auto; margin-right: auto; }
.content .wp-caption { max-width: 100%; }
.content .wp-caption-text, .content figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; text-align: center; }
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; width: 1px; word-wrap: normal;
}
/* Let Elementor control the full width of the content area when a page is built with it */
.elementor-page .content { max-width: 1140px; }
.elementor-page.elementor-full-width .content { max-width: none; margin: 0; padding: 0; background: none; box-shadow: none; }
