/*
 Theme Name:   Nestin Child
 Theme URI:    http://nestin.bold-themes.com
 Description:  Nestin child theme
 Author:       BoldThemes
 Author URI:   http://bold-themes.com
 Template:     nestin
 Version:      1.0.0
 Tags:         one-column, right-sidebar, custom-menu, featured-images, sticky-post, theme-options, threaded-comments, translation-ready
 Text Domain:  nestin-child
*/

/* Theme customization starts here
-------------------------------------------------------------- */

body .mainHeader {
  z-index: 9999 !important;
}

/*
 * Brand colour override — WCAG 1.4.3 (AA contrast)
 *
 * The original orange (#e56606) fails the 4.5:1 ratio on white and light grey.
 * #b65100 (rgb 182 81 0) achieves:
 *   - 5.04:1 on #ffffff
 *   - 4.58:1 on #f3f3f3 (homepage grey section background)
 */

/* Superheadline on white and light-grey (#f3f3f3) backgrounds */
.bt_bb_headline_superheadline {
  color: #b65100 !important;
}

/* Blog / sidebar article category labels */
.btArticleCategories .btArticleCategory,
a.btArticleCategory {
  color: #b65100 !important;
}

/* Generic inline links inside content areas */
.btContentHolder a,
.bt_bb_text_holder a {
  color: #b65100;
}

/*
 * WCAG 1.4.1 — distinguishable links in body text.
 * #b65100 vs body text #2d2d2d = 2.73:1 (below the 3:1 non-colour-alone threshold),
 * so inline paragraph links need an underline. Scoped to <p> to avoid underlining
 * card headings, image links, etc.
 */
.btContentHolder p a,
.bt_bb_text_holder p a {
  text-decoration: underline !important;
}

/* Privacy / terms links inside contact forms */
.btForm a,
.wpcf7-list-item-label a {
  color: #b65100 !important;
}

/* Homepage property-search submit button */
#submit-button-ideagency {
  background-color: #b65100 !important;
  color: #ffffff !important;
}

/* Bold Page Builder accent-colour buttons */
.bt_bb_button.bt_bb_color_accent_color,
a.bt_bb_button.bt_bb_color_accent_color {
  background-color: #b65100 !important;
  border-color: #b65100 !important;
}

/* agim-connect "Advanced search" button (colour hardcoded inline by the plugin) */
.adv-btn-text {
  color: #b65100 !important;
}

/* Project-status badge in Cantieri (#e74c3c = 3.82:1, non-compliant) — ~7.5:1 on white */
.project-status {
  background-color: #b71c1c !important;
}

/*
 * Focus visibility — WCAG 2.4.7
 *
 * The parent theme removes all outlines globally. Re-apply a 2px orange ring
 * on every focusable element except .reactpress (manages its own focus styles).
 */
*:focus:not(.reactpress *) {
  outline: 2px solid #b65100 !important;
  outline-offset: 2px !important;
}
*:focus-visible:not(.reactpress *) {
  outline: 2px solid #b65100 !important;
  outline-offset: 2px !important;
}

/*
 * Accent-colour button hover — WCAG 1.4.3
 *
 * Parent theme hover state renders dark text (#181818) on the orange background,
 * which does not meet 4.5:1. Switch to a white background with dark text (16:1).
 */
.bt_bb_button.bt_bb_color_accent_color .bt_bb_link:hover,
a.bt_bb_button.bt_bb_color_accent_color .bt_bb_link:hover {
  background-color: #ffffff !important;
  color: #181818 !important;
}

/*
 * Transparent header variants — WCAG 1.4.3
 *
 * TransparentLight and DarkTransparent render white text on a transparent
 * background, making contrast unpredictable. Force a white background and
 * dark text to match the sticky-header state.
 * Exception: pages 3228/3234 are handled separately via add_custom_page_css().
 */
.btTransparentLightHeader .mainHeader,
.btDarkTransparentHeader .mainHeader {
  background-color: #ffffff !important;
  color: #181818 !important;
}
.btTransparentLightHeader .mainHeader a,
.btTransparentLightHeader nav ul li a,
.btDarkTransparentHeader .mainHeader a,
.btDarkTransparentHeader nav ul li a {
  color: #181818 !important;
}

/*
 * Footer dark-skin widget titles — WCAG 1.4.3
 *
 * Default #b65100 on #191919 = 3.49:1 (fail).
 * #e56505 on #191919 = 4.78:1 (pass AA).
 */
.btSiteFooter .btIconWidgetTitle,
.btSiteFooter .btIconWidgetIcon,
.btSiteFooter .bt_bb_headline_superheadline {
  color: #e56505 !important;
}

/* Contact Form 7 submit button — global */
.wpcf7-form .wpcf7-submit {
  -webkit-box-shadow: 0 0 0 3em #b65100 inset !important;
  box-shadow: 0 0 0 3em #b65100 inset !important;
}

/* Contact Form 7 submit button background in the footer */
.btSiteFooter .wpcf7-form .wpcf7-submit {
  -webkit-box-shadow: 0 0 0 3em #b65100 inset !important;
  box-shadow: 0 0 0 3em #b65100 inset !important;
}

/*
 * Header CTA button text colour — WCAG 1.4.3
 *
 * "VALUTA IL TUO IMMOBILE" uses .btButtonWidget (theme widget, not bt_bb_button).
 * White text on #b65100 = 5.04:1 (pass AA).
 */
.mainHeader .btButtonWidget .btButtonWidgetLink,
.mainHeader .btButtonWidget .btButtonWidgetText {
  color: #ffffff !important;
}

/*
 * Skip-to-content link — WCAG 2.4.1 (Bypass Blocks)
 *
 * Visually hidden off-screen until it receives keyboard focus, then slides
 * into view at the top of the viewport.
 */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 99999;
  background: #b65100;
  color: #ffffff !important;
  padding: 0.5rem 1.5rem;
  text-decoration: none !important;
  font-size: 1rem;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 0;
  outline: 2px solid #ffffff !important;
  outline-offset: -3px !important;
}

/* Suppress focus ring on the skip-link target when reached by mouse click */
#main-content:focus {
  outline: none;
}

/*
 * Header spacing optimisation — riduce l'ingombro orizzontale sotto i 1400px
 *
 * Valori originali (nestin/style.css + CSS dinamico del tema):
 *   .btMenuHorizontal .menuPort nav           → padding-left: 50px
 *   .btMenuHorizontal .menuPort > nav > ul > li → padding-right: 28px (override dinamico da 50px)
 *   .btMenuHorizontal .topBarInMenu           → margin-left: 50px
 */
.btMenuHorizontal .menuPort nav {
  padding-left: 20px !important;
}

/* Nota: il padding-right fra le voci di menu è sulla <li>, non sulla <li a> */
.btMenuHorizontal .menuPort > nav > ul > li {
  padding-right: 18px !important;
}

.btMenuHorizontal .topBarInMenu {
  margin-left: 18px !important;
}
