/* WordPress integration layer for the Etna+ public-site design. */

body.admin-bar .site-header { top: 32px; }
.wp-site-blocks { overflow: clip; }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-template-part { margin: 0; }

.etna-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 74px;
  backdrop-filter: blur(10px);
  background: rgba(249, 253, 253, 0.9);
  border-bottom: 1px solid rgba(207, 216, 220, 0.8);
}

.etna-header-inner { min-height: 74px; }
.etna-header .wp-block-site-logo img { border-radius: 0.4rem; box-shadow: 0 6px 16px rgba(28, 122, 114, 0.16); }
.etna-header .wp-block-site-title { font-weight: 800; letter-spacing: 0.01em; }
.etna-header .wp-block-site-title a { color: var(--ink); text-decoration: none; }
.etna-menu { position: relative; }
.etna-menu-list { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.etna-menu-list li { position: relative; margin: 0; }
.etna-menu-list a { display: inline-flex; align-items: center; min-height: 2.4rem; padding: 0.25rem 0.75rem; border-radius: 999px; color: var(--ink-muted); font-weight: 600; text-decoration: none; transition: color 0.2s ease, background-color 0.2s ease; }
.etna-menu-list a:hover, .etna-menu-list a:focus-visible, .etna-menu-list .current-menu-item > a, .etna-menu-list .current_page_item > a { color: var(--ink); background: rgba(28, 122, 114, 0.12); }
.etna-menu-list .sub-menu { position: absolute; top: calc(100% + 0.25rem); right: 0; z-index: 30; display: none; min-width: 14rem; margin: 0; padding: 0.45rem; list-style: none; border: 1px solid var(--stroke); border-radius: var(--radius-s); background: #fff; box-shadow: var(--shadow-soft); }
.etna-menu-list li:hover > .sub-menu, .etna-menu-list li:focus-within > .sub-menu { display: grid; }
.etna-menu-list .sub-menu a { width: 100%; border-radius: 8px; }
.etna-menu-toggle { display: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--stroke); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.etna-menu-toggle > span[aria-hidden="true"], .etna-menu-toggle > span[aria-hidden="true"]::before, .etna-menu-toggle > span[aria-hidden="true"]::after { display: block; width: 1.15rem; height: 2px; margin-inline: auto; border-radius: 2px; background: currentColor; content: ""; transition: transform 0.2s ease; }
.etna-menu-toggle > span[aria-hidden="true"]::before { transform: translateY(-6px); }
.etna-menu-toggle > span[aria-hidden="true"]::after { transform: translateY(4px); }
.etna-menu-header.is-open .etna-menu-toggle > span[aria-hidden="true"] { background: transparent; }
.etna-menu-header.is-open .etna-menu-toggle > span[aria-hidden="true"]::before { transform: translateY(0) rotate(45deg); }
.etna-menu-header.is-open .etna-menu-toggle > span[aria-hidden="true"]::after { transform: translateY(-2px) rotate(-45deg); }

.etna-main { min-height: 55vh; }
.etna-section { padding-block: clamp(3rem, 7vw, 5rem); }
.etna-section + .etna-section { border-top: 1px solid rgba(207, 216, 220, 0.56); }
.etna-section-header { margin-bottom: 2rem; }
.etna-section-header > p { color: var(--ink-muted); max-width: 68ch; }
.etna-eyebrow { color: var(--primary-strong); text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.76rem; font-weight: 800; }

.etna-hero { padding-block: clamp(3rem, 8vw, 6rem); }
.etna-hero h1 { max-width: 14ch; font-size: clamp(2.2rem, 5vw, 4.3rem); }
.etna-hero-copy > p:not(.etna-eyebrow) { max-width: 58ch; color: var(--ink-muted); font-size: 1.08rem; }
.etna-hero-media { position: relative; padding: 1rem; border: 1px solid var(--stroke); border-radius: var(--radius-l); background: linear-gradient(160deg, #fff 0%, #f4fbfa 60%, #efd3f4 100%); box-shadow: var(--shadow-soft); }
.etna-hero-media img { width: 100%; border-radius: calc(var(--radius-l) - 10px); }

.is-style-etna-card,
.etna-card { height: 100%; padding: clamp(1.25rem, 2.5vw, 1.8rem); border: 1px solid var(--stroke); border-radius: var(--radius-m); background: linear-gradient(170deg, #fff 0%, #f4fbfa 100%); box-shadow: var(--shadow-soft); }
.is-style-etna-card > :first-child { margin-top: 0; }
.is-style-etna-card > :last-child { margin-bottom: 0; }
.is-style-etna-panel { padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--stroke); border-radius: var(--radius-l); background: var(--wp--preset--gradient--soft); box-shadow: var(--shadow-soft); }
.is-style-etna-frame img { border: 1px solid var(--stroke); border-radius: var(--radius-l); box-shadow: var(--shadow-strong); }
.is-style-etna-checks { list-style: none; padding-left: 0; }
.is-style-etna-checks li { position: relative; padding-left: 1.8rem; margin-bottom: 0.55rem; }
.is-style-etna-checks li::before { content: "✓"; position: absolute; left: 0; top: 0.05rem; display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary-strong); font-size: 0.78rem; font-weight: 800; }

.etna-stat strong { display: block; color: var(--primary-strong); font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1; }
.etna-stat p { margin-top: 0.5rem; color: var(--ink-muted); }
.etna-feature-card { overflow: hidden; padding: 0; }
.etna-feature-card .wp-block-image { margin: 0; }
.etna-feature-card .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-m) var(--radius-m) 0 0; }
.etna-feature-card-copy { padding: 1.25rem; }
.etna-feature-card-copy h3 { font-family: var(--wp--preset--font-family--urbanist); font-size: 1.1rem; }
.etna-feature-card-copy p { color: var(--ink-muted); font-size: 0.94rem; }

.etna-step { position: relative; padding-top: 2.25rem; }
.etna-step-number { position: absolute; top: -0.8rem; left: 1.25rem; min-width: 2rem; min-height: 2rem; display: inline-grid; place-items: center; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.78rem; font-weight: 800; }

.etna-cta { padding: clamp(1.5rem, 4vw, 2.7rem); color: #fff; border-radius: var(--radius-l); background: linear-gradient(135deg, var(--primary-strong) 0%, var(--primary) 56%, #4fada5 100%); box-shadow: 0 22px 45px rgba(21, 92, 85, 0.32); }
.etna-cta h2, .etna-cta p { color: #fff; }
.etna-cta .hero-actions { margin-top: 0; }

.etna-query .wp-block-post-template { gap: 1.25rem; }
.etna-query .wp-block-post { overflow: hidden; border: 1px solid var(--stroke); border-radius: var(--radius-m); background: #fff; box-shadow: var(--shadow-soft); }
.etna-query .wp-block-post-featured-image { margin: 0; }
.etna-query .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; }
.etna-query .etna-post-copy { padding: 1.25rem; }
.etna-query .wp-block-post-title { font-size: 1.25rem; }
.etna-query .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.etna-query .wp-block-post-excerpt, .etna-query .wp-block-post-date { color: var(--ink-muted); }
.wp-block-query-pagination { margin-top: 2rem; }

.etna-entry-header { padding: clamp(3rem, 8vw, 6rem) 0 2rem; text-align: center; }
.etna-entry-header .wp-block-post-title { max-width: 18ch; margin-inline: auto; font-size: clamp(2rem, 5vw, 4rem); }
.etna-entry-header .wp-block-post-date { color: var(--ink-muted); }
.etna-entry-content { padding-bottom: clamp(3rem, 7vw, 6rem); }
.etna-entry-content > :where(p, ul, ol) { font-size: 1.08rem; }
.etna-entry-content blockquote { margin-inline: 0; padding: 1.2rem 1.5rem; border-left: 5px solid var(--primary); border-radius: 0 var(--radius-m) var(--radius-m) 0; background: var(--primary-soft); }
.etna-entry-content table { width: 100%; border-collapse: collapse; background: #fff; }
.etna-entry-content th, .etna-entry-content td { padding: 0.8rem; border: 1px solid var(--stroke); text-align: left; }
.etna-entry-content pre { overflow-x: auto; border-radius: var(--radius-m); }

.etna-faq details { margin-bottom: 0.75rem; padding: 1rem 1.25rem; border: 1px solid var(--stroke); border-radius: var(--radius-m); background: #fff; }
.etna-faq summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.etna-faq details p { color: var(--ink-muted); }

.etna-footer { margin-top: 0; padding-block: 2.5rem 3.5rem; border-top: 1px solid rgba(207, 216, 220, 0.72); }
.etna-footer a { color: var(--ink-muted); text-decoration: none; }
.etna-footer .wp-block-site-title { font-weight: 800; }
.etna-footer-meta { color: var(--ink-muted); font-size: 0.9rem; }
.etna-menu-footer .etna-menu-list { justify-content: flex-end; }
.etna-menu-footer .etna-menu-list a { border: 1px solid var(--stroke); min-height: 2rem; padding: 0.2rem 0.65rem; font-size: 0.9rem; }

.wp-block-button__link { transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 12px 28px rgba(28, 122, 114, 0.22); }
.wp-block-button__link:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 16px 30px rgba(28, 122, 114, 0.32); }
.wp-block-button.is-style-outline .wp-block-button__link { background: #fff; color: var(--ink); border-color: var(--stroke); box-shadow: none; }
.wp-block-separator { border-color: var(--stroke); opacity: 0.7; }
.etnaplus-app-buttons.aligncenter { justify-content: center; }
.etnaplus-app-buttons.alignright { justify-content: flex-end; }

.etna-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.etna-reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 782px) {
  body.admin-bar .etna-header { top: 46px; }
  .etna-header, .etna-header-inner { min-height: 68px; }
  .etna-hero .wp-block-columns { gap: 2rem; }
  .etna-footer-inner { align-items: flex-start !important; flex-direction: column; }
  .etna-menu-toggle { display: grid; place-items: center; }
  .etna-menu-header .etna-menu-content { position: absolute; top: calc(100% + 0.65rem); right: 0; display: none; width: min(22rem, calc(100vw - 1.5rem)); padding: 0.75rem; border: 1px solid var(--stroke); border-radius: var(--radius-m); background: #fff; box-shadow: var(--shadow-strong); }
  .etna-menu-header.is-open .etna-menu-content { display: block; }
  .etna-menu-header .etna-menu-list { display: grid; align-items: stretch; }
  .etna-menu-header .etna-menu-list a { width: 100%; min-height: 2.75rem; border-radius: 10px; }
  .etna-menu-header .etna-menu-list .sub-menu { position: static; display: grid; margin-left: 1rem; padding: 0 0 0 0.5rem; border: 0; border-left: 2px solid var(--primary-soft); border-radius: 0; box-shadow: none; }
  .etna-menu-footer .etna-menu-list { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .etna-section { padding-block: 2.5rem; }
  .etna-card, .is-style-etna-card, .is-style-etna-panel { border-radius: 24px; }
  .etnaplus-app-buttons .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .etna-reveal { opacity: 1; transform: none; }
}
