/* Granite Tops & More – migration overrides.
 * Loaded after every original Divi stylesheet. Only replaces behaviour the
 * WordPress/Divi runtime JS used to provide and fixes responsive flaws.
 * Copied to public/generated by scripts/prepare-pages.mjs. */

html { scroll-padding-top: 110px; }
body { overflow-x: clip; }
#page-container { overflow: visible !important; padding-top: 0 !important; margin-top: 0 !important; }
#page-container, #et-boc { overflow-x: clip; }

/* ---------- Sticky logo/menu bar (top info bar scrolls away, as source) */
#et-boc > header.et-l--header,
#et-boc > header.et-l--header > .et_builder_inner_content { display: contents; }
.et-l--header .et_pb_section_4_tb_header {
  position: sticky !important;
  top: 0;
  z-index: 9990;
}
body.admin-bar .et-l--header .et_pb_section_4_tb_header { top: 0; }
.et_pb_menu__logo img { display: block; height: auto; }

/* ---------- Menu: focus + interaction feedback */
.et-menu-nav .et-menu > li > a { transition: opacity .2s ease, color .2s ease; }
.et-menu-nav .et-menu > li > a:focus-visible,
.mobile_menu_bar:focus-visible,
.et_pb_toggle_title:focus-visible,
.et_pb_tab_nav_item_link:focus-visible,
.et_pb_lightbox_image:focus-visible,
.et_pb_button:focus-visible,
.et_pb_social_media_follow a:focus-visible {
  outline: 2px solid #5a1905;
  outline-offset: 3px;
}
.et-l--header .et_pb_section_0_tb_header a:focus-visible,
.et-l--header .et_pb_section_1_tb_header a:focus-visible { outline-color: #dac9b9; }

/* ---------- Mobile menu (no submenus in source) */
.et_pb_fullwidth_menu .mobile_nav .mobile_menu_bar { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.et_pb_fullwidth_menu .mobile_nav.closed .et_mobile_menu { display: none !important; }
.et_pb_fullwidth_menu .mobile_nav.opened .et_mobile_menu { display: block !important; }
.et_pb_fullwidth_menu .mobile_nav.opened .mobile_menu_bar:before { content: "\4d"; }
.et_mobile_menu { max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; }
.et_mobile_menu li a { transition: background-color .15s ease; }
.et_mobile_menu li a:active { background-color: rgba(90, 25, 5, .08); }

/* ---------- Sliders: one slide at a time, fixed height, no overlap */
.et_pb_slider .et_pb_slides { position: relative; overflow: hidden; }
.et_pb_slider .et_pb_slide { display: none !important; float: none !important; margin-right: 0 !important; width: 100% !important; }
.et_pb_slider .et_pb_slide.et-pb-active-slide { display: block !important; animation: gt-slide-fade .7s ease both; }
.et_pb_slider .et_pb_slide .et_pb_container {
  height: var(--gt-slide-h, auto) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.et_pb_slider .et_pb_slider_container_inner { width: 100%; display: block !important; }
.et_pb_slider .et_pb_slide_description { opacity: 1 !important; transform: none !important; animation: none !important; }
@media (max-width: 980px) {
  .et_pb_slider .et_pb_slide .et_pb_container { height: min(var(--gt-slide-h, 400px), 62vw) !important; min-height: 300px; }
}
@media (max-width: 767px) {
  .et_pb_slider .et_pb_slide .et_pb_container { min-height: 340px; }
}
@keyframes gt-slide-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .et_pb_slider .et_pb_slide.et-pb-active-slide { animation: none; }
}

/* ---------- Entrance animations disabled (content always visible) */
.et_animated, .et-waypoint, .et_pb_animation_off { opacity: 1 !important; animation: none !important; }

/* ---------- Tabs */
.et_pb_tabs .et_pb_all_tabs > .et_pb_tab { display: none !important; opacity: 1 !important; }
.et_pb_tabs .et_pb_all_tabs > .et_pb_tab.et_pb_active_content { display: block !important; }
.et_pb_tabs_controls li a { cursor: pointer; }
@media (max-width: 980px) {
  #gt-body.page-id-19 .et_pb_tabs_controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    margin: 0;
  }
  #gt-body.page-id-19 .et_pb_tabs_controls::after { display: none; }
  #gt-body.page-id-19 .et_pb_tabs_controls > li {
    display: block;
    float: none !important;
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
    border-right: 0 !important;
    border-bottom: 1px solid #d9d9d9;
    background-color: #f4f4f4;
  }
  #gt-body.page-id-19 .et_pb_tabs_controls > li > a {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 64px;
    padding: 16px 20px;
    border-left: 4px solid transparent;
    background-color: transparent;
    text-align: left;
    white-space: normal;
    line-height: 1.4 !important;
  }
  #gt-body.page-id-19 .et_pb_tabs_controls > li.et_pb_tab_active,
  #gt-body.page-id-19 .et_pb_tabs_controls > li.et_pb_tab_active > a { background-color: #fff; }
  #gt-body.page-id-19 .et_pb_tabs_controls > li.et_pb_tab_active > a { border-left-color: #5a1905; }
  #gt-body.page-id-19 .et_pb_all_tabs > .et_pb_tab {
    padding: 28px 24px !important;
    line-height: 1.55 !important;
  }
  #gt-body.page-id-19 .et_pb_tab_content,
  #gt-body.page-id-19 .et_pb_tab_content p,
  #gt-body.page-id-19 .et_pb_tab_content li { line-height: 1.55; }
}

/* ---------- FAQ toggles: original state classes drive colours */
.et_pb_toggle .et_pb_toggle_title { cursor: pointer; user-select: none; }
.et_pb_toggle.et_pb_toggle_close .et_pb_toggle_content { display: none; }
.et_pb_toggle.et_pb_toggle_open .et_pb_toggle_content { display: block; }

/* ---------- Titles / cards: no mid-word breaks, centred icons */
.et_pb_blurb .et_pb_module_header,
.et_pb_heading .et_pb_module_header,
.et_pb_toggle_title,
.et_pb_slide_title,
.et_pb_text h1, .et_pb_text h2, .et_pb_text h3, .et_pb_text h4, .et_pb_text h5 {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: manual !important;
}
.et_pb_blurb .et_pb_main_blurb_image { display: block; text-align: center; margin-left: auto; margin-right: auto; }
.et_pb_blurb .et_pb_main_blurb_image .et_pb_image_wrap { display: inline-block; margin-left: auto; margin-right: auto; }
.et_pb_blurb_position_top .et_pb_main_blurb_image .et-pb-icon { display: inline-block; }
.et_pb_social_media_follow li a.icon { display: inline-flex; align-items: center; justify-content: center; }
img { max-width: 100%; height: auto; }
@media (max-width: 767px) {
  /* Keep the original contact card, but fit the email without splitting it. */
  body.page-id-58 .et_pb_blurb a[href^="mailto:"],
  body.page-id-58 .et_pb_text a[href^="mailto:"] {
    font-size: clamp(13px, 4vw, 20px) !important;
    white-space: nowrap;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
}

/* ---------- Image lightbox (inventory, galleries) */
.et_pb_lightbox_image { cursor: zoom-in; display: block; }
.et_pb_lightbox_image img { transition: opacity .2s ease; }
.et_pb_lightbox_image:hover img { opacity: .88; }
.gt-lightbox {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(17, 6, 2, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 56px 64px;
}
.gt-lightbox__figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.gt-lightbox__img { max-width: min(92vw, 1100px); max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #2a0c02; }
.gt-lightbox__caption { color: #dac9b9; font-family: 'Times New Roman', Georgia, serif; font-size: 18px; margin-top: 12px; text-align: center; }
.gt-lightbox__count { color: rgba(218,201,185,.7); font-family: 'Times New Roman', Georgia, serif; font-size: 14px; margin-left: 8px; }
.gt-lightbox button {
  position: absolute; background: transparent; border: 0; color: #dac9b9; cursor: pointer;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 2px; transition: background-color .15s ease, color .15s ease;
}
.gt-lightbox button:hover { background: rgba(218,201,185,.14); color: #fff; }
.gt-lightbox button:focus-visible { outline: 2px solid #dac9b9; outline-offset: 2px; }
.gt-lightbox__close { top: 10px; right: 10px; }
.gt-lightbox__prev { left: 8px; top: 50%; margin-top: -24px; }
.gt-lightbox__next { right: 8px; top: 50%; margin-top: -24px; }
.gt-lightbox svg { width: 30px; height: 30px; }
@media (max-width: 767px) {
  .gt-lightbox { padding: 56px 8px 72px; }
  .gt-lightbox__prev, .gt-lightbox__next { top: auto; bottom: 10px; margin-top: 0; }
  .gt-lightbox__prev { left: calc(50% - 56px); }
  .gt-lightbox__next { right: calc(50% - 56px); }
}

/* ---------- Lazy map */
.gt-map { position: relative; width: 100%; height: 450px; background: #e8ded4; display: flex; align-items: center; justify-content: center; }
.gt-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.gt-map__fallback { color: #5a1905; font-family: 'Times New Roman', Georgia, serif; font-size: 18px; text-decoration: underline; }
@media (max-width: 767px) { .gt-map { height: 340px; } }

/* ---------- Native forms (replace embedded Jotforms) */
.gt-form { font-family: "Times New Roman", Georgia, serif; font-size: 17px; line-height: 1.4; color: #fff; text-align: left; width: 100%; margin: 0 auto; }
.gt-form--footer { max-width: 752px; background: transparent; padding: 10px 0 20px; }
.gt-form--contact { max-width: 1080px; box-sizing: border-box; background: #be6b03; padding: 80px 24px; }
.gt-form--contact .gt-form__body { max-width: 800px; margin: 0 auto; }
.gt-form--contact .gt-form__body > .gt-form__line:first-child { padding-top: 0; margin-top: 0; }
.gt-form--contact .gt-form__actions { padding-bottom: 0; }
.gt-form--contact .gt-form__status:empty { margin: 0; min-height: 0; }
.gt-form__line { padding: 5px 10px; margin: 4px 0; }
.gt-form--contact .gt-form__line { padding: 2px 10px; }
.gt-form__label { display: block; color: #fff; font-size: 17px; font-weight: 400; margin-bottom: 6px; }
.gt-form__req { color: #fff; margin-left: 4px; }
.gt-form__name, .gt-form__contact-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gt-form__contact-row { padding: 5px 10px; margin: 4px 0; }
.gt-form--contact .gt-form__contact-row { padding-top: 2px; padding-bottom: 2px; }
.gt-form .gt-form__contact-row > .gt-form__line { padding: 0; margin: 0; min-width: 0; }
.gt-form__name > div { min-width: 0; }
.gt-form__input,
.gt-form__textarea {
  display: block; width: 100%; box-sizing: border-box;
  font: inherit; font-size: 16px;
  border: 1px solid #b8bdc9; border-radius: 4px;
  padding: 7px 10px; min-height: 40px;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.gt-form--footer .gt-form__input,
.gt-form--footer .gt-form__textarea { background: rgba(255,255,255,0); color: #fff; border-color: rgba(255,255,255,.75); }
.gt-form--footer .gt-form__input::placeholder,
.gt-form--footer .gt-form__textarea::placeholder { color: rgba(255,255,255,.7); }
.gt-form--contact .gt-form__input,
.gt-form--contact .gt-form__textarea { background: #fff; color: #2c3345; }
.gt-form__textarea { min-height: 163px; resize: vertical; }
.gt-form__input:focus,
.gt-form__textarea:focus { outline: none; border-color: #dac9b9; box-shadow: 0 0 0 3px rgba(218,201,185,.45); }
.gt-form__line.is-error .gt-form__input,
.gt-form__line.is-error .gt-form__textarea { border-color: #5a1905; box-shadow: 0 0 3px #5a1905; }
.gt-form--footer .gt-form__line.is-error .gt-form__input,
.gt-form--footer .gt-form__line.is-error .gt-form__textarea { border-color: #f3c9b5; box-shadow: 0 0 0 1px #f3c9b5; }
.gt-form__error { display: none; margin-top: 6px; background: #5a1905; color: #fff; font-size: 14px; padding: 4px 8px; border-radius: 3px; width: fit-content; max-width: 100%; }
.gt-form--footer .gt-form__error { background: #fff; color: #5a1905; }
.gt-form__line.is-error .gt-form__error { display: block; }
.gt-form__check { cursor: pointer; }
.gt-form__checkbox { display: block; width: 20px; height: 20px; margin: 12px 0 0; accent-color: #5a1905; cursor: pointer; }
.gt-form__hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.gt-form__actions { padding: 14px 10px 4px; text-align: center; }
.gt-form__submit {
  font: inherit; font-size: 17px; color: #fff; background: #5a1905; border: 0; border-radius: 4px;
  min-width: 180px; padding: 12px 28px; cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}
.gt-form__submit:hover { background: #000; }
.gt-form__submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.gt-form__submit[disabled] { opacity: .65; cursor: progress; }
.gt-form__status { margin: 10px 10px 0; font-size: 15px; color: #fff; min-height: 1px; text-align: center; }
.gt-form__status.is-error { background: #fff; color: #5a1905; padding: 8px 10px; border-radius: 3px; }
.gt-form--contact .gt-form__status.is-error { background: #5a1905; color: #fff; }
@media (max-width: 480px) {
  .gt-form__name, .gt-form__contact-row { grid-template-columns: 1fr; gap: 10px; }
  .gt-form--contact { padding: 80px 6px; }
  .gt-form__submit { width: 100%; }
}

/* ---------- Responsive repairs */
@media (max-width: 980px) {
  .et_pb_row { max-width: 100%; }
  .et_pb_row.et_pb_row_fullwidth, .et_pb_row_fullwidth { width: 90% !important; }
}
@media (max-width: 767px) {
  .et_pb_column { margin-bottom: 30px; }
  .et_pb_text_inner, .et_pb_blurb_description { overflow-wrap: break-word; }
  .dsm_button .et_pb_button_module_wrappers { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
}
