/**
 * WP-specific CSS additions
 *
 * Admin bar fix, CF7 form overrides, pagination, WP gallery, screen-reader-text
 */

/* ─── Admin Bar offset ─── */
body.admin-bar .header {
    top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
    }
    body.admin-bar .bottom-nav {
        /* admin bar doesn't appear on mobile frontend, but just in case */
    }
}

/* ─── WP alignment classes ─── */
.alignleft   { float: left;  margin: 0 1.5em 1em 0; }
.alignright  { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* ─── Screen reader text (a11y) ─── */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ─── Pagination ─── */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2.5rem 0 1rem;
}
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    background: var(--color-bg-light);
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.nav-links .page-numbers.prev,
.nav-links .page-numbers.next {
    gap: 0.25rem;
}
.nav-links .page-numbers:hover,
.nav-links .page-numbers.current {
    background: var(--color-accent);
    color: #fff;
}

/* ─── Contact Form 7 overrides ─── */
.contact__form .wpcf7 {
    width: 100%;
}
.contact__form .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact__form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}
.contact__form .wpcf7 input[type="text"],
.contact__form .wpcf7 input[type="email"],
.contact__form .wpcf7 input[type="tel"],
.contact__form .wpcf7 textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}
.contact__form .wpcf7 input::placeholder,
.contact__form .wpcf7 textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.contact__form .wpcf7 input:focus,
.contact__form .wpcf7 textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}
.contact__form .wpcf7 input[type="submit"] {
    width: 100%;
    padding: 16px;
    background: var(--color-accent);
    color: var(--color-bg-dark);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.contact__form .wpcf7 input[type="submit"]:hover {
    opacity: 0.9;
}
/* CF7 row (email + phone side by side) */
.contact__form .form-row {
    display: flex;
    gap: 1rem;
}
.contact__form .form-row .wpcf7-form-control-wrap {
    flex: 1;
}
/* Validation messages */
.contact__form .wpcf7-not-valid-tip {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 4px;
}
.contact__form .wpcf7-response-output {
    border: none !important;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 0.5rem 0 0 !important;
}
.contact__form .wpcf7-mail-sent-ok {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

/* ─── reCAPTCHA badge (hidden per Google TOS — must include text notice in form) ─── */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* ─── Google Translate — hide default UI, we use our own language buttons ─── */
.goog-te-banner-frame,
#google_translate_element,
.skiptranslate {
    display: none !important;
}
/* Google Translate adds top:40px to body when active — undo it */
html.translated-ltr body,
html.translated-rtl body {
    top: 0 !important;
}
/* Remove Google Translate's font override */
.goog-te-gadget {
    font-family: inherit !important;
}

/* ─── GTranslate plugin widget — hide (we trigger it via custom buttons) ─── */
/* Plugin renders .gtranslate_wrapper / .gt_container--* at the position of the [gtranslate] shortcode,
   which we placed in footer.php solely to bootstrap the doGTranslate() API, not to show the widget. */
.gtranslate_wrapper,
[class*="gt_container--"],
.gt_switcher-popup,
.gt_white_content,
.gt_black_overlay,
.gt_languages {
    display: none !important;
}

/* ─── WP image captions ─── */
.wp-caption {
    max-width: 100%;
}
.wp-caption-text {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}
