/* ============================================================
   Martine Winnington – Re~Sources
   Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Signika:wght@300;400;600&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Signika', sans-serif;
  font-weight: 300;
  color: #333;
  background-color: #fdf8f0;
  background-image: url('images/bg04.jpg');
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ── Site Banner / Hero ───────────────────────────────────── */
.site-banner {
  width: 100%;
  height: 180px;
  background-image: url('images/background.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  position: relative;
  flex-shrink: 0;
}

/* ── Sticky Navigation Bar ────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(204, 0, 0, 0.12);
  box-shadow: 0 2px 12px rgba(35, 54, 137, 0.08);
}

.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1rem;
  height: 50px;
}

/* ── Desktop Nav Items ────────────────────────────────────── */
.nav-items {
  display: flex;
  list-style: none;
  align-items: stretch;
  height: 100%;
  flex: 1;
  gap: 0;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-family: 'Signika', sans-serif;
  font-weight: 400;
  font-size: 0.88rem;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border: none;
  background: none;
  height: 100%;
  gap: 0.3rem;
  letter-spacing: 0.01em;
}

.nav-link:hover,
.nav-item.open > .nav-link {
  color: #cc0000;
  background: rgba(204, 0, 0, 0.04);
}

.nav-link.active {
  color: #233689;
  font-weight: 600;
}

.nav-arrow {
  font-size: 0.6rem;
  opacity: 0.5;
  transition: transform 0.25s;
  flex-shrink: 0;
}

.nav-item.open > .nav-link .nav-arrow {
  transform: rotate(180deg);
  opacity: 0.8;
}

/* ── Dropdown Panel ───────────────────────────────────────── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid rgba(35, 54, 137, 0.1);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 28px rgba(35, 54, 137, 0.12);
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  pointer-events: none;
}

.nav-item.open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Stages dropdown is wider and scrollable */
.nav-dropdown.dropdown-wide {
  min-width: 300px;
  max-height: 70vh;
  overflow-y: auto;
}

.dropdown-link {
  display: block;
  padding: 0.55rem 1.2rem;
  font-size: 0.875rem;
  color: #444;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  line-height: 1.35;
}

.dropdown-link:hover {
  background: #fff5f5;
  color: #cc0000;
  padding-left: 1.5rem;
}

.dropdown-divider {
  height: 1px;
  background: #f0e8e0;
  margin: 0.35rem 1rem;
}

.dropdown-section-label {
  display: block;
  padding: 0.4rem 1.2rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #598fc6;
}

/* ── Hamburger (mobile) ───────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-hamburger:hover {
  background: rgba(204, 0, 0, 0.06);
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Drawer ────────────────────────────────────────── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 88vw);
  height: 100vh;
  background: #fff;
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.nav-drawer.open {
  transform: translateX(0);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-overlay.open {
  opacity: 1;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid #f0e8e0;
  background: #fdf8f0;
}

.drawer-title {
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: #cc0000;
  font-weight: 700;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #666;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.drawer-close:hover {
  background: #f5ece8;
  color: #cc0000;
}

.drawer-nav {
  list-style: none;
  padding: 0.5rem 0;
}

.drawer-item > .drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.drawer-item > .drawer-link:hover,
.drawer-item.open > .drawer-link {
  background: #fff5f5;
  color: #cc0000;
}

.drawer-arrow {
  font-size: 0.65rem;
  transition: transform 0.25s;
  opacity: 0.5;
}

.drawer-item.open > .drawer-link .drawer-arrow {
  transform: rotate(180deg);
}

.drawer-submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #fdf8f0;
}

.drawer-item.open > .drawer-submenu {
  max-height: 800px;
}

.drawer-sublink {
  display: block;
  padding: 0.55rem 1.3rem 0.55rem 2rem;
  font-size: 0.85rem;
  color: #555;
  text-decoration: none;
  transition: color 0.15s;
  border-left: 2px solid transparent;
}

.drawer-sublink:hover {
  color: #cc0000;
  border-left-color: #cc0000;
}

.drawer-sublink.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #598fc6;
  cursor: default;
  pointer-events: none;
}

.drawer-divider {
  height: 1px;
  background: #f0e8e0;
  margin: 0.25rem 1.3rem;
}

/* ── Page Layout ──────────────────────────────────────────── */
.page-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  position: relative;
}

/* ── Corner Decoration ────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  width: 220px;
  height: 240px;
  background-image: url('images/backgroundCoinG.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom left;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* ── Typography ───────────────────────────────────────────── */
h1 {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  color: #233689;
  margin-bottom: 0.75rem;
}

h2 {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 1.7rem;
  color: #598fc6;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-family: 'Signika', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #233689;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}

p {
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

strong, b {
  font-weight: 600;
  font-size: 1.05em;
}

em, i {
  color: #555;
}

a {
  color: #cc0000;
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: #ff4400;
  text-decoration: underline;
}

ul, ol {
  margin: 0.6rem 0 0.9rem 1.6rem;
  line-height: 1.75;
}

li {
  margin-bottom: 0.25rem;
}

hr {
  border: none;
  border-top: 1px solid #e8ddd0;
  margin: 1.5rem 0;
}

blockquote {
  border-left: 3px solid #598fc6;
  margin: 1rem 0 1rem 1rem;
  padding: 0.5rem 1rem;
  color: #555;
  font-style: italic;
}

/* ── Content Area ─────────────────────────────────────────── */
.content {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  padding: 1.8rem 2rem;
  box-shadow: 0 2px 16px rgba(35, 54, 137, 0.06);
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.content img[style*="float: right"],
.content img[style*="float:right"] {
  margin-left: 1.2rem;
  margin-bottom: 0.8rem;
}

.content img[style*="float: left"],
.content img[style*="float:left"] {
  margin-right: 1.2rem;
  margin-bottom: 0.8rem;
}

/* ── Page Header Image ────────────────────────────────────── */
.page-header-img {
  margin-bottom: 1.2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(35, 54, 137, 0.1);
}

.page-header-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
}

/* ── Home Page Specifics ──────────────────────────────────── */
.home-intro {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  padding: 1.8rem 2rem;
  box-shadow: 0 2px 16px rgba(35, 54, 137, 0.06);
  margin-bottom: 2rem;
}

.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.home-nav-section {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  box-shadow: 0 2px 10px rgba(35, 54, 137, 0.07);
  border-top: 3px solid #598fc6;
  transition: box-shadow 0.2s, transform 0.2s;
}

.home-nav-section:hover {
  box-shadow: 0 4px 18px rgba(35, 54, 137, 0.13);
  transform: translateY(-2px);
}

.home-nav-section h2 {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-family: 'Signika', sans-serif;
  font-weight: 600;
  color: #233689;
}

.home-nav-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-nav-section li {
  margin-bottom: 0.3rem;
}

.home-nav-section a {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.4;
}

.home-nav-section a:hover {
  color: #cc0000;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: rgba(255, 255, 255, 0.7);
  border-top: 1px solid #e8ddd0;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  position: relative;
  z-index: 1;
}

.site-footer a {
  color: #777;
}

.site-footer a:hover {
  color: #cc0000;
}

/* ── Utility ──────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Fix table layouts from old content */
table {
  max-width: 100%;
  border-collapse: collapse;
}

table td, table th {
  padding: 0.4rem 0.6rem;
  font-family: 'Signika', sans-serif;
  font-size: 0.9rem;
  vertical-align: top;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .nav-items {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-drawer,
  .nav-overlay {
    display: block;
  }

  .site-banner {
    height: 120px;
    background-size: auto 100%;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .page-wrap {
    padding: 1.5rem 1rem 3rem;
  }

  .content {
    padding: 1.2rem 1.1rem;
  }

  body::after {
    width: 120px;
    height: 140px;
    opacity: 0.5;
  }

  .home-nav-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .site-banner {
    height: 90px;
  }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .site-nav, .nav-overlay, .nav-drawer { display: none !important; }
  body::after { display: none; }
  .content { box-shadow: none; border: 1px solid #ddd; }
}
