/* WebPress Default Theme CSS */

:root {
  --primary:    #6366f1;
  --primary-h:  #818cf8;
  --accent:     #8b5cf6;
  --bg:         #ffffff;
  --surface:    #f8fafc;
  --border:     #e2e8f0;
  --text:       #0f172a;
  --text-2:     #334155;
  --muted:      #64748b;
  --radius:     8px;
  --radius-lg:  14px;
  --max-width:  1120px;
  --header-h:   64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-h); }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 40px;
}

.site-header__brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  text-decoration: none;
}

.site-header__brand:hover { color: var(--primary); }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.site-nav { margin-left: auto; }

.site-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.site-nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.site-nav__list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.site-nav__list li { position: relative; }

.site-nav__list a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
}

.site-nav__list a:hover { background: var(--surface); color: var(--text); }

/* Dropdown */
.site-nav__list .dropdown {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  min-width: 180px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: all 0.2s;
  list-style: none;
  padding: 6px;
  z-index: 200;
}

.site-nav__list .has-dropdown:hover .dropdown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.site-nav__list .dropdown li a {
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
}

/* ── Page Builder Output ─────────────────────────────────────────────────── */
.site-main { min-height: 60vh; }

.page-content {
  padding: 48px 0 64px;
  max-width: 760px;
  margin: 0 auto;
}

.site-main--full .page-content { max-width: 100%; padding: 0; }

/* Headings */
.wp-heading { margin: 1.6em 0 0.6em; line-height: 1.25; font-weight: 700; color: var(--text); }
h1.wp-heading { font-size: 2.4em; }
h2.wp-heading { font-size: 1.9em; }
h3.wp-heading { font-size: 1.5em; }
h4.wp-heading { font-size: 1.25em; }
h5.wp-heading { font-size: 1.1em; }
h6.wp-heading { font-size: 1em; }

/* Paragraphs */
.wp-paragraph { margin-bottom: 1.25em; color: var(--text-2); }

/* Images */
.wp-image { margin: 2em auto; }
.wp-image picture { display: block; }
.wp-image img { border-radius: var(--radius); width: 100%; }
.wp-image figcaption { text-align: center; font-size: 0.85em; color: var(--muted); margin-top: 8px; }
.wp-image--left   { text-align: left; }
.wp-image--center { text-align: center; margin-left: auto; margin-right: auto; }
.wp-image--right  { text-align: right; margin-left: auto; }

/* Gallery */
.wp-gallery { margin: 2em 0; display: grid; gap: 10px; }
.wp-gallery--cols-2 { grid-template-columns: repeat(2, 1fr); }
.wp-gallery--cols-3 { grid-template-columns: repeat(3, 1fr); }
.wp-gallery--cols-4 { grid-template-columns: repeat(4, 1fr); }
.wp-gallery__item { margin: 0; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); }
.wp-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.wp-gallery__item:hover img { transform: scale(1.04); }

/* Columns */
.wp-columns { display: grid; gap: 24px; margin: 2em 0; }
.wp-columns--gap-sm { gap: 12px; }
.wp-columns--gap-md { gap: 24px; }
.wp-columns--gap-lg { gap: 40px; }
.wp-column--6  { grid-column: span 6; }
.wp-column--4  { grid-column: span 4; }
.wp-column--8  { grid-column: span 8; }
.wp-column--3  { grid-column: span 3; }
.wp-column--12 { grid-column: span 12; }
/* Use 12-col grid for columns */
.wp-columns { grid-template-columns: repeat(12, 1fr); }

/* Spacer */
.wp-spacer { display: block; }

/* Divider */
.wp-divider { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* Quote */
.wp-quote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 2em 0;
  background: var(--surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.wp-quote p { font-size: 1.1em; font-style: italic; color: var(--text-2); margin: 0 0 8px; }
.wp-quote cite { font-size: 0.875em; color: var(--muted); font-style: normal; }

/* Buttons */
.wp-button-wrapper { margin: 1.5em 0; }
.wp-button-wrapper--center { text-align: center; }
.wp-button-wrapper--right  { text-align: right; }
.wp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius); font-weight: 600; font-size: 15px; text-decoration: none; transition: all 0.2s; }
.wp-btn--primary   { background: var(--primary); color: #fff; box-shadow: 0 2px 12px rgba(99,102,241,0.35); }
.wp-btn--primary:hover { background: var(--primary-h); transform: translateY(-2px); color: #fff; }
.wp-btn--secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.wp-btn--secondary:hover { background: var(--border); }
.wp-btn--ghost     { color: var(--primary); border: 1px solid var(--primary); }
.wp-btn--ghost:hover { background: var(--primary); color: #fff; }
.wp-btn--outline   { background: transparent; border: 2px solid var(--text); color: var(--text); }
.wp-btn--outline:hover { background: var(--text); color: #fff; }

/* Embed */
.wp-embed { position: relative; overflow: hidden; border-radius: var(--radius-lg); margin: 2em 0; background: #000; }
.wp-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Hero */
.wp-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: var(--text);
  padding: 60px 40px;
  margin: 0 0 2em;
}
.wp-hero__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.wp-hero__content { position: relative; z-index: 1; max-width: 700px; }
.wp-hero--center .wp-hero__content { text-align: center; margin: 0 auto; }
.wp-hero--right  .wp-hero__content { text-align: right; margin-left: auto; }
.wp-hero__title    { font-size: clamp(2em, 5vw, 3.5em); font-weight: 800; color: #fff; margin-bottom: 16px; line-height: 1.15; }
.wp-hero__subtitle { font-size: 1.15em; color: rgba(255,255,255,0.85); margin-bottom: 28px; }
.wp-hero__btn      { display: inline-flex; }

/* Cards */
.wp-cards { display: grid; gap: 20px; margin: 2em 0; }
.wp-cards--cols-2 { grid-template-columns: repeat(2,1fr); }
.wp-cards--cols-3 { grid-template-columns: repeat(3,1fr); }
.wp-cards--cols-4 { grid-template-columns: repeat(4,1fr); }
.wp-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all 0.2s; }
.wp-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.wp-card__img img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.wp-card__body { padding: 20px; }
.wp-card__title { font-size: 1.1em; font-weight: 700; margin-bottom: 8px; }
.wp-card__desc  { color: var(--muted); font-size: 0.9em; line-height: 1.6; margin-bottom: 14px; }
.wp-card__link  { color: var(--primary); font-size: 0.875em; font-weight: 600; }

/* Forms */
.wp-form { margin: 2em 0; }
.wp-form__group { margin-bottom: 18px; }
.wp-form__label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.wp-form__required { color: #ef4444; margin-left: 2px; }
.wp-form input[type="text"],
.wp-form input[type="email"],
.wp-form input[type="tel"],
.wp-form input[type="url"],
.wp-form input[type="date"],
.wp-form textarea,
.wp-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.wp-form input:focus, .wp-form textarea:focus, .wp-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.wp-form__help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.wp-form__error { font-size: 12px; color: #ef4444; display: block; margin-top: 4px; }
.wp-form__submit { margin-top: 24px; }
.wp-form__checkbox { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 14px; }
.wp-form__checkbox input { margin-top: 3px; }
.wp-form__radio-group { display: flex; flex-direction: column; gap: 8px; }
.wp-form__radio { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
  margin-top: 60px;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer__copy { font-size: 13px; }

.site-footer__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-footer__nav a {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer__nav a:hover { color: #fff; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.wp-error { color: #ef4444; font-size: 14px; padding: 10px; background: #fef2f2; border-radius: var(--radius); }

/* ── Blog ────────────────────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  padding: 48px 0;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  transition: all 0.2s;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

.post-card__img { aspect-ratio: 16/9; overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-card__img img { transform: scale(1.05); }
.post-card__body { padding: 20px; }
.post-card__date { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.post-card__title { font-size: 1.1em; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.post-card__title a { color: var(--text); text-decoration: none; }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt { font-size: 0.9em; color: var(--muted); line-height: 1.6; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav__toggle  { display: flex; }
  .site-nav__list    { display: none; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px; }
  .site-nav__list.open { display: flex; }
  .site-nav__list .dropdown { position: static; opacity: 1; transform: none; pointer-events: auto; box-shadow: none; border: none; padding-left: 16px; }
  .wp-cards--cols-3, .wp-cards--cols-4 { grid-template-columns: repeat(2,1fr); }
  .wp-gallery--cols-4 { grid-template-columns: repeat(2,1fr); }
  .wp-columns { grid-template-columns: 1fr !important; }
  .wp-column--6, .wp-column--4, .wp-column--8, .wp-column--3 { grid-column: span 1; }
  .site-footer__inner { flex-direction: column; text-align: center; }
  .wp-hero { min-height: 380px; padding: 40px 20px; }
}

@media (max-width: 480px) {
  .wp-cards--cols-2, .wp-cards--cols-3, .wp-cards--cols-4 { grid-template-columns: 1fr; }
  .wp-gallery--cols-2, .wp-gallery--cols-3, .wp-gallery--cols-4 { grid-template-columns: 1fr; }
}
