/* OZTECH theme: WordPress-only additions. The page itself is styled by styles.css. */

/* Logged-in admins: keep the fixed header below the WordPress toolbar. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Legal and editor pages are styled by styles.css (.legal__body). */

/* A form plugin in the contact section (Appearance > Customize > OZTECH contact form).
   Wrap each label and field in <div class="field"> and it picks up the theme's field styles automatically (see WORDPRESS-SETUP.md). */
.contact__plugin .wpcf7-form-control-wrap, .contact__plugin .wpforms-field-container { display: block; }
/* Contact Form 7 wraps each field in <p> and puts a <br> after every label; that would open a gap between label and box. */
.contact__plugin br { display: none; }
.contact__plugin .field > p { margin: 0; }
.contact__plugin .wpcf7-form > p { margin: 0 0 1.5rem; }
.contact__plugin input[type="text"], .contact__plugin input[type="email"], .contact__plugin input[type="tel"],
.contact__plugin input[type="url"], .contact__plugin input[type="number"], .contact__plugin select, .contact__plugin textarea {
  display: block; width: 100%; min-height: 3.25rem; padding: .75rem 1rem;
  background: var(--white); border: 1.5px solid var(--slate); border-radius: 0; color: var(--ink); font: inherit;
}
.contact__plugin textarea { min-height: 9rem; resize: vertical; }
/* a plain <select> (phones, or before the script runs) gets the same arrow as the site's own form */
.contact__plugin select {
  appearance: none; -webkit-appearance: none; padding-right: 3rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002B63' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .875rem center; background-size: 1.375rem;
}
.contact__plugin .select__native { background-image: none; }
.contact__plugin .select__btn.is-invalid, .contact__plugin .wpcf7-not-valid ~ .select__btn { border-color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.contact__plugin input:focus-visible, .contact__plugin select:focus-visible, .contact__plugin textarea:focus-visible { border-color: var(--navy); outline-offset: 2px; }
.contact__plugin label { display: block; margin-bottom: .5rem; font-weight: 600; }
.contact__plugin input[type="submit"], .contact__plugin button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 3.25rem; padding: .75rem 1.5rem;
  border: 2px solid transparent; border-radius: 0; background: var(--navy); color: var(--white);
  font: 600 1rem/1.2 var(--font-body); letter-spacing: .01em; cursor: pointer; transition: background-color .2s;
}
.contact__plugin input[type="submit"]:hover, .contact__plugin button[type="submit"]:hover { background: var(--ink); }
/* Contact Form 7 messages */
.contact__plugin .wpcf7-not-valid-tip { display: block; margin-top: .5rem; font-weight: 600; color: var(--ink); }
.contact__plugin .wpcf7-not-valid { border-color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
/* the long selector is needed to beat Contact Form 7's own coloured borders for invalid, sent and failed states */
.contact__plugin .wpcf7 form.wpcf7-form .wpcf7-response-output { margin: 1.25rem 0 0; padding: 1.25rem 1.5rem; border: 0; border-left: 12px solid var(--sky); background: var(--bone); }
.contact__plugin .wpcf7-spinner { display: none; }

/* Blog: the list of articles, one article, the contact box and the breadcrumb (all colours and fonts come from styles.css). */
.blog .container { max-width: 72rem; }
.blog__intro > * + * { margin-top: 1rem; }
.blog__intro a { color: var(--navy); text-underline-offset: .25em; padding-block: .3rem; }
.posts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 48rem) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; } }
.post-card { position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.75rem 1.75rem 1.5rem; background: var(--white); border-top: 8px solid var(--sky); }
.post-card:hover { border-top-color: var(--navy); }
.post-card__date { font-size: .9375rem; color: var(--ink); }
.post-card .post-card__title { margin: 0; font: 600 clamp(1.375rem, 2.2vw, 1.75rem)/1.2 var(--font-display); color: var(--navy); }   /* the two classes beat the legal-page heading spacing (.legal h2) */
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }   /* the whole card is the link */
.post-card__title a:focus-visible { outline: 3px solid var(--navy); outline-offset: 6px; }
.post-card__excerpt { color: var(--ink); }
.post-card__more { margin-top: auto; padding-top: .5rem; font-weight: 600; color: var(--navy); }
.post-card__more::after { content: " \2192"; }
[dir="rtl"] .post-card__more::after { content: " \2190"; }
.pager ul { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.pager a, .pager .current { display: inline-flex; min-width: 2.75rem; min-height: 2.75rem; align-items: center; justify-content: center; padding: .5rem .875rem; border: 1.5px solid var(--navy); color: var(--navy); font-weight: 600; text-decoration: none; }
.pager .current { background: var(--navy); color: var(--white); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; padding: 0; list-style: none; font-size: .9375rem; }
.crumbs li + li::before { content: "/"; margin-inline-end: .5rem; color: var(--ink); }
.crumbs a { display: inline-block; padding-block: .3rem; color: var(--navy); text-underline-offset: .25em; }
.crumbs [aria-current] { padding-block: .3rem; overflow-wrap: anywhere; }

.post { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; max-width: 46rem; }
.post__title { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.post__body .lead { color: var(--ink); }
.post__body > * + * { margin-top: 1.25rem; }

.post-cta { max-width: 46rem; margin-top: 1.5rem; padding: clamp(1.75rem, 4vw, 2.5rem); }
.post-cta h2 { margin-top: 0; font: 600 clamp(1.5rem, 2.6vw, 2rem)/1.15 var(--font-display); color: var(--white); }
.post-cta p { margin: .75rem 0 1.5rem; max-width: 36rem; }
.post-more { margin-top: 2rem; }
.post-more > h2 { margin: 0 0 1.5rem; }
.post-back { margin-top: 1rem; }
.post-back .link::before { content: "\2190 "; }
[dir="rtl"] .post-back .link::before { content: "\2192 "; }
