/* WordPress integration and component refinements. */

:root {
  --te-red: #b90f19;
  --te-black: #0b0b0b;
  --te-muted: #686868;
  --te-border: #dadada;
  --te-light: #f7f6f3;
}

html { scroll-behavior: smooth; }
body.admin-bar .site-header { top: 32px; }
.site-main { min-height: 65vh; }
.site-header .menu,
.site-footer .menu { list-style: none; margin: 0; padding: 0; }
.site-nav .menu { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a { color: var(--te-red); }
.site-mobile-nav .menu { display: contents; }
.site-mobile-nav .menu li { display: contents; }
.site-logo .custom-logo-link { display: block; }

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: 1rem;
  padding: .8rem 1rem;
  top: 1rem;
  width: auto;
  z-index: 100000;
  background: #fff;
  color: #000;
}

.actions-top { margin-top: 0 !important; }
.te-content-card { display: flex; flex-direction: column; min-width: 0; }
.te-content-card .card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #efefef; }
.te-content-card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.te-content-card:hover .card-media img { transform: scale(1.025); }
.te-content-card h3 a { color: inherit; text-decoration: none; }
.te-content-card .card-meta { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .7rem; padding: 0; border: 0; color: var(--te-red); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.te-content-card .card-footer { display: flex; align-items: center; gap: 1rem; margin-top: auto; padding-top: 1.5rem; }
.te-content-card .card-footer span { height: 1px; flex: 1; background: var(--te-border); }
.te-content-card .card-footer a { color: var(--te-muted); font-size: .75rem; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; }

.inner-hero { padding: clamp(7rem, 12vw, 12rem) 0 clamp(4rem, 8vw, 8rem); border-bottom: 1px solid var(--te-border); background: var(--te-light); }
.inner-hero .container { position: relative; z-index: 2; }
.inner-hero .title { max-width: 1050px; font-size: clamp(3.4rem, 9vw, 8.5rem); line-height: .9; overflow-wrap: anywhere; }
.inner-hero .text { max-width: 760px; }
.archive-hero { background: linear-gradient(135deg, #fff 0%, #f6f4f1 100%); }
.te-single-hero { padding-bottom: clamp(3rem, 6vw, 6rem); }
.te-single-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); gap: clamp(2rem, 6vw, 7rem); align-items: end; }
.te-single-cover { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.te-single-cover img { width: 100%; height: 100%; object-fit: cover; }
.te-single-meta { margin-top: 1.2rem; color: var(--te-red); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

.te-entry-layout,
.te-page-content { max-width: 960px; }
.entry-content { font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.85; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { margin: 2.7em 0 .7em; font-family: Poppins, sans-serif; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; }
.entry-content h3 { margin: 2.2em 0 .65em; font-family: Poppins, sans-serif; font-size: clamp(1.4rem, 2.5vw, 2.2rem); line-height: 1.1; }
.entry-content a { color: var(--te-red); }
.entry-content .wp-block-image img { width: 100%; }
.entry-content .wp-block-quote { margin: 2.5rem 0; padding: 1.5rem 2rem; border-left: 5px solid var(--te-red); background: var(--te-light); }
.entry-content .wp-block-gallery { margin: 2.5rem 0; }
.entry-content .wp-block-group.alignwide,
.entry-content .alignwide { width: min(1180px, calc(100vw - 3rem)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }

.te-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.te-gallery a { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #eee; }
.te-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.te-gallery a:hover img { transform: scale(1.03); }
.te-embed { max-width: 1000px; }
.te-video-section .te-embed { display: grid; gap: 1.5rem; }
.te-embed iframe { width: 100%; min-height: 520px; border: 0; }
.te-document-section .te-entry-layout { display: grid; gap: 1rem; }
.te-document-section p { margin: 0; }
.light { background: var(--te-light); }
.empty-state { grid-column: 1 / -1; padding: 2.5rem; border: 1px solid var(--te-border); color: var(--te-muted); }
.form-error { margin: 1rem 0; padding: .9rem 1rem; border-left: 4px solid var(--te-red); background: #fff0f0; color: #7e0710; }
.success-msg.is-visible { display: block; margin: 1rem 0; }
.te-newsletter-consent { display: flex; align-items: flex-start; gap: .6rem; margin: 1rem 0; text-align: left; font-size: .8rem; }
.te-newsletter-consent input { flex: 0 0 auto !important; width: auto; min-width: 0; margin-top: .25rem; padding: 0; border: initial; }
.te-honeypot { position: absolute !important; left: -9999px !important; }
.newsletter-form { flex-wrap: wrap; }
.newsletter-form input { min-width: 0; }
.newsletter-form .te-newsletter-consent { flex: 0 0 100%; order: 5; }

.nav-links { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; }
.nav-links a,
.nav-links span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 .8rem; border: 1px solid var(--te-border); color: #111; text-decoration: none; }
.nav-links .current,
.nav-links a:hover { border-color: var(--te-red); background: var(--te-red); color: #fff; }

.footer-col .menu { display: grid; gap: .45rem; }
.footer-col .menu li { margin: 0; }
.footer-col > a { display: block; }

[data-te-carousel] .te-content-card { transition: opacity .25s ease, transform .25s ease; }
[data-te-carousel] .te-content-card.is-carousel-hidden { display: none; }
[data-te-carousel].is-changing .te-content-card { opacity: .25; transform: translateY(6px); }
.home-carousel-btn[disabled] { opacity: .4; cursor: not-allowed; }

@media (max-width: 900px) {
  body.admin-bar .site-header { top: 46px; }
  .te-single-hero-grid { grid-template-columns: 1fr; }
  .te-single-cover { max-width: 720px; }
  .te-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .te-embed iframe { min-height: 380px; }
}

@media (max-width: 680px) {
  .inner-hero { padding-top: 7rem; }
  .inner-hero .title { font-size: clamp(2.7rem, 15vw, 5rem); }
  .te-gallery { grid-template-columns: 1fr; }
  .te-embed iframe { min-height: 230px; }
  .newsletter-form { display: grid !important; grid-template-columns: 1fr !important; }
  .newsletter-form input,
  .newsletter-form button { width: 100%; min-height: 52px; }
}
