/* Desktop Stylesheet - Optimized for screens 768px and above */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Source+Serif+4:wght@600;700&display=swap');

:root {
  --bg: #d9d9d1;
  --bg-accent: #cfcfca;
  --surface: #e8e8e0;
  --surface-2: #e1e1da;
  --border: rgba(35, 35, 35, 0.18);
  --text: #232323;
  --muted: #575757;
  --accent: #2b53b3;
  --accent-2: #145f5d;
  --accent-3: #d95c2a;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  --footer-bg: #c7c7bf;
  --footer-text: #232323;
  --footer-border: #b0b0a8;
  --header-bg: #cfcfca;
  --header-text: #232323;
  --card-bg: #e3e3dc;
  --card-border: #c1c1b7;
  --card-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background-image: url('../assets/images/backgrounds/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.container {
  max-width: 1100px;
  width: min(1100px, calc(100% - 1.5rem));
  margin: 0 auto;
  background: var(--surface);
  padding: 2rem 2rem 2.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.container--narrow {
  max-width: 800px;
  width: min(800px, calc(100% - 1.5rem));
}

h1,
h2,
h3,
.page-title,
.site-brand {
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--accent-2);
}

h1,
h2,
h3 {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  font-size: 2.4rem;
}

h2 {
  font-size: 1.9rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  color: var(--text);
  font-size: 1.08rem;
}

li {
  font-size: 1.04rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-3);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  min-width: 0;
}

.content {
  flex: 1;
  min-width: 0;
}

.right-column {
  flex: 0 0 50%;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.right-column .text-box {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  border: 2mm dotted #000000;
  box-shadow: var(--shadow);
}

.text-box,
.chat-box,
.video-box,
.page-card {
  background: rgba(236, 236, 230, 0.94);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.text-box {
  flex: 0 0 50%;
  width: 100%;
  max-width: 460px;
  padding: 1rem 1.25rem;
  box-sizing: border-box;
  min-height: 220px;
}

.text-box p:last-child {
  margin-bottom: 0;
}

.content > .text-box {
  border: 2mm dotted #000000;
}

.text-box--compact {
  max-width: 460px;
  margin-top: 2.5rem;
}

.page-image,
.image-column img,
.bottom-images img {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.page-image {
  width: 100%;
  max-width: 400px;
  margin: 1rem 0 2.5rem;
}

.page-image-column {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}

.page-image-column .page-image {
  margin-bottom: 1rem;
}

.page-image-text-box {
  max-width: none;
  min-height: 140px;
  border: 2mm dotted #d8b4fe;
}

.video-box {
  width: 100%;
  max-width: 840px;
  margin-top: 2rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  border: 2px solid #000000;
  padding: 0.35rem;
  box-sizing: border-box;
  background: #ffffff;
}

.video-box iframe {
  display: block;
  width: min(100%, 534px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 534 / 952;
}

.authorpage-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.25rem 0 0;
  max-width: 100%;
  width: 100%;
}

.authorpage-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.image-column {
  width: 320px;
  display: grid;
  gap: 3.5rem;
  margin-top: 4rem;
}

.image-column img {
  width: 100%;
  height: auto;
  display: block;
}

.chat-box {
  padding: 1rem;
  margin-top: 1rem;
}

.chat-input {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.send-btn {
  background: var(--accent-2);
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 600;
}

.bottom-images {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  justify-content: space-between;
}

.bottom-images img {
  width: calc(33.333% - 0.66rem);
  height: auto;
}

.additional-images {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.additional-images img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex: 1;
  max-width: 542px;
  min-width: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  main {
    padding: 1.25rem 1rem 2rem;
  }

  .container {
    width: min(100%, calc(100% - 1rem));
    padding: 1.25rem;
  }

  .page {
    flex-direction: column;
    gap: 1.25rem;
  }

  .content,
  .right-column,
  .image-column {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }

  .image-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0;
  }

  .text-box,
  .text-box--compact {
    max-width: none;
  }

  .bottom-images {
    flex-wrap: wrap;
  }

  .bottom-images img {
    width: calc(50% - 0.5rem);
  }
}

/* Header Styles */
.site-header {
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  display: flex;
  flex-direction: column;
  background-color: transparent;
  border: 1px solid rgba(47, 47, 47, 0.12);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.site-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(47, 47, 47, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: rgba(229, 229, 223, 0.75);
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(47, 47, 47, 0.12);
  border-bottom: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.site-header > * {
  position: relative;
  z-index: 1;
}

.site-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f8f8e;
  overflow-wrap: anywhere;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem 1.25rem;
  background-color: rgba(229, 229, 223, 0.75);
  border-radius: 0 0 18px 18px;
  border: 1px solid rgba(47, 47, 47, 0.12);
  border-top: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.nav-links,
.nav-tools {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-tools {
  margin-left: auto;
}

.site-nav a {
  color: #3a3a3a;
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.25rem;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  color: #3f6fe3;
  background-color: rgba(255, 255, 255, 0.45);
}

.sitemap-link {
  margin-left: 0.5rem;
}

.menu-toggle {
  display: none;
}

/* Footer Styles */
.site-footer {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.5rem;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 1.5rem 2rem;
  border: 1px solid var(--footer-border);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  margin: 2rem auto 0;
  width: min(1100px, 100%);
  box-sizing: border-box;
}

.site-footer .footer-branding {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.site-footer .footer-image {
  display: block;
  max-width: 180px;
  height: auto;
}

.site-footer .footer-content {
  flex: 1 1 0;
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.site-footer .footer-text-box {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--footer-border);
  border-radius: 12px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.site-footer .footer-text-box p {
  margin: 0;
  line-height: 1.6;
  font-size: 2.2rem;
  font-weight: 700;
  font-style: italic;
  overflow-wrap: anywhere;
}

.site-footer a {
  color: var(--footer-text);
  text-decoration: none;
}

.site-footer a:hover {
  color: #2b53b3;
  text-decoration: underline;
}

/* Page Card Styles */
.page-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.page-grid {
  display: grid;
  gap: 1.25rem;
}

.page-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #1f8f8e;
}

.page-meta {
  color: #6b6b6b;
  font-size: 0.95rem;
}

/* Desktop-specific refinements */
@media (min-width: 1024px) {
  .container {
    padding: 2.5rem 2.5rem 3rem;
  }

  .page {
    gap: 2.5rem;
  }

  h1 {
    font-size: 2.4rem;
  }

  p {
    font-size: 1.1rem;
  }
}

@media (min-width: 1200px) {
  h1 {
    font-size: 2.6rem;
  }
}
