/* ============================================================
   IUSTITIA — Global Stylesheet
   ============================================================ */

:root {
  --color-bg:        #0d1b2a;
  --color-accent:    #b87333;
  --color-text:      #f2ead8;
  --color-text-muted:#c9bfaa;
  --color-surface:   #152233;
  --color-border:    #1e3248;
  --color-notice:    #c0392b;
  --color-notice-bg: rgba(192, 57, 43, 0.12);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --max-width: 1100px;
  --nav-height: 80px;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4em; margin-bottom: 1.2em; }
li { margin-bottom: 0.4em; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-bottom: 0.6rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section--tight {
  padding: 3rem 0;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subheading {
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.text-accent { color: var(--color-accent); }
.text-muted  { color: var(--color-text-muted); }

/* ── Navigation ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 27, 42, 0.97);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
}
.nav-tagline {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 400;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links li.active > a {
  color: var(--color-accent);
  background: rgba(184, 115, 51, 0.08);
}

.nav-links li.active > a {
  font-weight: 500;
}

/* Contact CTA button in nav */
.nav-cta a {
  background: var(--color-accent);
  color: var(--color-bg) !important;
  padding: 0.45rem 1.1rem !important;
  border-radius: 4px;
  font-weight: 500 !important;
  transition: background 0.2s, opacity 0.2s !important;
}
.nav-cta a:hover {
  background: #a06228;
  opacity: 1 !important;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a::after {
  content: ' ▾';
  font-size: 0.7em;
  vertical-align: middle;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.5rem 0;
  list-style: none;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
}

.dropdown-menu li a {
  display: block;
  padding: 0.55rem 1.2rem;
  color: var(--color-text);
  font-size: 0.88rem;
  white-space: nowrap;
  border-radius: 0;
}

.dropdown-menu li a:hover {
  color: var(--color-accent);
  background: rgba(184, 115, 51, 0.08);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  display: block;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 101;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 860px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 2rem 2rem;
    gap: 0;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

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

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links a {
    padding: 0.9rem 0;
    font-size: 1.05rem;
    display: block;
    width: 100%;
  }

  .nav-cta { margin-top: 1rem; }
  .nav-cta a {
    display: inline-block !important;
    padding: 0.6rem 1.4rem !important;
  }

  .nav-dropdown > a::after { content: ' ▾'; }

  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 1rem;
    display: none;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu li {
    border-bottom: none;
  }

  .dropdown-menu li a {
    padding: 0.6rem 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
  }
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}

.footer-logo {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(0.85) sepia(0.2);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-style: italic;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  text-decoration: none;
}
.footer-links a:hover { color: var(--color-accent); }

.footer-separator {
  color: var(--color-border);
}

.footer-disclaimer {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
  max-width: 780px;
  margin: 0 auto 1.5rem;
  padding: 1rem;
  border-top: 1px solid var(--color-border);
}

.footer-copy {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--color-border);
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  margin-bottom: 1.4rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.hero p:last-of-type {
  margin-bottom: 2rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.15s;
  border: none;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover { background: rgba(184,115,51,0.08); opacity: 1; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.card-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
}

.card-link:hover { opacity: 0.75; }

/* Service Cards Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ── Unavailable Badge ────────────────────────────────────── */
.badge-unavailable {
  display: inline-block;
  background: var(--color-notice-bg);
  color: var(--color-notice);
  border: 1px solid rgba(192,57,43,0.35);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-top: 0.3rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

/* ── Notice Box ───────────────────────────────────────────── */
.notice-box {
  background: var(--color-notice-bg);
  border: 1px solid rgba(192,57,43,0.5);
  border-left: 4px solid var(--color-notice);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 2.5rem;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.notice-box strong {
  color: var(--color-notice);
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Page Hero / Inner pages ──────────────────────────────── */
.page-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 660px;
}

/* ── Article Layout ───────────────────────────────────────── */
.article-body {
  max-width: 760px;
}

.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.article-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
}

.article-body p, .article-body li {
  color: var(--color-text-muted);
}

.article-body strong {
  color: var(--color-text);
}

.article-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body ul {
  margin-bottom: 1.4em;
}

.article-cta-box {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-align: center;
}

.article-cta-box p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

/* ── Review Cards ─────────────────────────────────────────── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-stars {
  color: var(--color-accent);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.review-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.review-text {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  flex: 1;
}

/* ── Contact Form ─────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.form-required { color: var(--color-accent); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9bfaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select option {
  background: var(--color-surface);
  color: var(--color-text);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-file-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-file-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0.75;
}

input[type="file"] {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 4px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  padding: 0.6rem 0.9rem;
  width: 100%;
  cursor: pointer;
}

input[type="file"]:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-submit-btn {
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
}

.form-submit-btn:hover { background: #a06228; transform: translateY(-1px); }
.form-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-message {
  display: none;
  padding: 1rem 1.2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.form-message.success {
  display: block;
  background: rgba(46, 139, 87, 0.12);
  border: 1px solid rgba(46, 139, 87, 0.4);
  color: #7ec8a0;
}

.form-message.error {
  display: block;
  background: var(--color-notice-bg);
  border: 1px solid rgba(192, 57, 43, 0.4);
  color: #e8706a;
}

/* ── Hours Panel ──────────────────────────────────────────── */
.hours-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.6rem;
}

.hours-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.hours-row:last-child { border-bottom: none; }

.hours-day { color: var(--color-text-muted); }
.hours-time { color: var(--color-text); font-weight: 500; }

.hours-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── Pricing ──────────────────────────────────────────────── */
.pricing-content {
  max-width: 760px;
}

.pricing-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.pricing-content p, .pricing-content li {
  color: var(--color-text-muted);
}

.pricing-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Legal Pages ──────────────────────────────────────────── */
.legal-content {
  max-width: 760px;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.legal-content h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.legal-content p, .legal-content li {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.legal-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content ul { margin-bottom: 1em; }

/* ── 404 Page ─────────────────────────────────────────────── */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem;
  min-height: 60vh;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* ── Reviews Teaser ───────────────────────────────────────── */
.reviews-teaser {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ── Articles List ────────────────────────────────────────── */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.article-row:hover {
  border-color: var(--color-accent);
  transform: translateX(4px);
}

.article-row-content { flex: 1; }

.article-row-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.article-row-desc {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.article-row-arrow {
  color: var(--color-accent);
  font-size: 1.2rem;
  align-self: center;
  flex-shrink: 0;
}

/* ── Scroll Animations ────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 4rem 0 3rem; }
  .container { padding: 0 1.25rem; }
}
