/* ==========================================================================
   Dehands Chartered Accountants — page & component styles.
   Sits on top of the Pylon template (public/assets/css/main.css) and the
   palette layer (public/dehands-theme.css). Only Dehands markup lives here.
   ========================================================================== */

/* --- Shared text lead ----------------------------------------------------- */
.dehands-lead {
    font-size: 19px;
    line-height: 1.7;
    color: var(--dehands-green-dark);
    max-width: 900px;
    margin: 0 auto 40px;
}

.dehands-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 700;
    color: var(--dehands-green-dark);
    margin-bottom: 8px;
}

/* --- Hero ----------------------------------------------------------------- */
.main-slider .swiper-slide p.dehands-hero__text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
    line-height: 1.65;
    max-width: 560px;
    margin: 0 0 28px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

.main-slider .thm-btn + .thm-btn { margin-left: 14px; }

.thm-btn--ghost,
.thm-btn.thm-btn--ghost {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.55);
}

.thm-btn.thm-btn--ghost:hover,
.thm-btn.thm-btn--ghost:focus {
    background-color: #ffffff;
    color: var(--dehands-green-dark);
    border-color: #ffffff;
}

/* --- Homepage about band (main image + overlapping small image) ----------- */
.dehands-about__images {
    position: relative;
    margin-bottom: 50px;
}

.dehands-about__images img {
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(15, 42, 23, 0.16);
}

.dehands-about__main {
    display: block;
    width: 100%;
    height: auto;
}

.dehands-about__small {
    position: absolute;
    right: -18px;
    bottom: -34px;
    width: 44%;
    height: auto;
    border: 6px solid #ffffff;
}

@media (max-width: 991px) {
    .dehands-about__small { right: 0; bottom: -24px; }
}

@media (max-width: 575px) {
    .dehands-about__small { display: none; }
    .dehands-about__images { margin-bottom: 30px; }
}

/* --- Services band -------------------------------------------------------- */
.dehands-services-band { background-color: #f5f8f1; }

.dehands-services-band .service-one__card { margin-bottom: 40px; }

/* --- Info band (page-builder composition: text beside an image) ------------ */
.dehands-info-band {
    background-color: #ffffff;
    padding: 100px 0;
}

.dehands-info-band .why-choose__box {
    background-color: #f5f8f1;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 24px;
    height: calc(100% - 24px);
}

.dehands-info-band .why-choose__box h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.dehands-info-band .why-choose__box h3 i { color: var(--dehands-green); margin-right: 8px; }

.dehands-info-band__image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(15, 42, 23, 0.16);
}

/* --- Sidebar (generic pages) ---------------------------------------------- */
.dehands-sidebar {
    background-color: #f5f8f1;
    border: 1px solid rgba(22, 53, 31, 0.1);
    border-radius: 12px;
    padding: 32px;
}

.dehands-sidebar > img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 24px;
}

.dehands-sidebar h3 {
    font-size: 20px;
    margin: 24px 0 14px;
}

.dehands-sidebar h3:first-of-type { margin-top: 0; }

.dehands-service-list li { border-bottom: 1px solid rgba(22, 53, 31, 0.1); }

.dehands-service-list li:last-child { border-bottom: 0; }

.dehands-service-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    color: var(--dehands-green-dark);
    font-weight: 600;
}

.dehands-service-list a:hover { color: var(--dehands-green); }

.dehands-service-list .dehands-icon svg { width: 16px; height: 16px; }

/* --- Service detail sidebar ----------------------------------------------- */
.service-sidebar__category li.is-active a,
.serivces-widget-list li.is-active a { color: var(--dehands-green-dark); font-weight: 700; }

.service-sidebar__category li.is-active { border-left: 3px solid var(--dehands-green); }

.service-details__content .dehands-lead { margin: 0 0 26px; }

.dehands-cta-row { margin-top: 30px; }

/* --- Industries ----------------------------------------------------------- */
.dehands-sectors h2 {
    font-size: 24px;
    margin: 34px 0 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(147, 207, 82, 0.5);
}

.dehands-sectors h2:first-child { margin-top: 0; }

/* --- Contact page info boxes ----------------------------------------------
   Pylon stretches the round icon to the height of its text. Pin the icon to a
   fixed circle and let the text column wrap independently. */
.contact-one__box { align-items: flex-start; }

.contact-one__box > i {
    flex: 0 0 65px;
    width: 65px;
    min-width: 65px;
    height: 65px;
    min-height: 65px;
    max-height: 65px;
    align-self: flex-start;
}

.contact-one__box-content { flex: 1 1 auto; min-width: 0; }

.contact-one__box-content p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--thm-color); }

/* The contact aside heading must not inherit Pylon's display size: the page intro
   is a full sentence, not a short title. */
.contact-one__content .title-block {
    font-size: 22px;
    line-height: 1.5;
    font-weight: 600;
    max-width: none;
    margin-bottom: 30px;
}

.contact-one__content .block-title { max-width: none; }

.contact-one__intro {
    font-size: 16px;
    line-height: 1.7;
    max-width: none;
    margin: 0 0 30px;
    text-align: left;
    color: var(--thm-color);
}

/* --- Page loader ----------------------------------------------------------
   Pylon's loader is its own blue logo mark, animated with `flipInY`. Dehands uses
   the site logo instead, with a gentle pulse and a brand-green progress bar so the
   loading state is unmistakable. The preloader is faded out by theme.js on load. */
.preloader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.preloader__image {
    height: auto;
    max-width: 70vw;
    animation-fill-mode: both;
    -webkit-animation: dehandsLoaderPulse 1.7s ease-in-out infinite;
    animation: dehandsLoaderPulse 1.7s ease-in-out infinite;
}

.preloader__bar {
    position: relative;
    display: block;
    width: 170px;
    max-width: 55vw;
    height: 4px;
    border-radius: 4px;
    background-color: rgba(22, 53, 31, 0.12);
    overflow: hidden;
}

.preloader__bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 45%;
    border-radius: 4px;
    background-color: var(--dehands-green);
    -webkit-animation: dehandsLoaderBar 1.35s ease-in-out infinite;
    animation: dehandsLoaderBar 1.35s ease-in-out infinite;
}

@keyframes dehandsLoaderPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.97); }
}

@keyframes dehandsLoaderBar {
    0% { transform: translateX(-105%); }
    100% { transform: translateX(235%); }
}

@media (prefers-reduced-motion: reduce) {
    .preloader__image { -webkit-animation: none; animation: none; }
    .preloader__bar::after { -webkit-animation: none; animation: none; width: 100%; }
}

/* --- Footer service thumbnails --------------------------------------------
   Pylon only sets `flex-shrink: 0` on these images because its demo ships ~470-byte
   thumbnails. With real photographs they would render at full size and burst the
   footer, so pin them to a small square crop. */
.footer-widget__post-list li > img {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 575px) {
    .footer-widget__post-list li > img { flex-basis: 56px; width: 56px; height: 56px; }
}

/* --- Call-to-action band -------------------------------------------------- */
.dehands-cta-band { background-color: var(--dehands-green-dark); }

.dehands-cta-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 56px 0;
    flex-wrap: wrap;
}

.dehands-cta-band__inner h2 { color: #ffffff; font-size: 30px; margin-bottom: 8px; }

.dehands-cta-band__inner p { color: rgba(255, 255, 255, 0.82); margin: 0; }

/* --- Map ------------------------------------------------------------------ */
.dehands-map { line-height: 0; }

.dehands-map__frame {
    width: 100%;
    height: 420px;
    border: 0;
    display: block;
}

/* --- Contact page note ---------------------------------------------------- */
.contact-one__note { margin-top: 50px; }

/* --- Gallery -------------------------------------------------------------- */
.dehands-gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    justify-content: center;
}

.dehands-gallery-tabs a {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 40px;
    border: 1px solid rgba(22, 53, 31, 0.16);
    color: var(--dehands-green-dark);
    font-weight: 600;
    font-size: 14px;
    background-color: #ffffff;
}

.dehands-gallery-tabs a.active,
.dehands-gallery-tabs a:hover {
    background-color: var(--dehands-green);
    border-color: var(--dehands-green);
    color: var(--dehands-green-dark);
}

.dehands-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-card {
    background-color: #ffffff;
    border: 1px solid rgba(22, 53, 31, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.gallery-image {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    line-height: 0;
}

.gallery-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-card:hover .gallery-image img { transform: scale(1.05); }

.gallery-card-caption { padding: 18px 20px; }

.gallery-card-caption h3 { font-size: 17px; margin: 6px 0 0; }

.gallery-category-link {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--dehands-green-dark);
}

/* --- FAQ ------------------------------------------------------------------ */
.faq-list details {
    background-color: #f5f8f1;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 14px;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--dehands-green-dark);
}

.faq-list details p { margin: 14px 0 0; }

/* --- Page-builder element spacing ---------------------------------------- */
.dehands-card-row { margin-bottom: -24px; }

.dehands-card { height: calc(100% - 24px); }

.builder-text { margin-bottom: 24px; }
.dehands-builder-image img { width: 100%; height: auto; border-radius: 8px; }
.dehands-builder-image { margin-bottom: 24px; }
.dehands-two-column > .builder-frame-grid { align-items: start; }
.dehands-about-columns > .builder-frame-grid[data-builder-columns="2"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dehands-service-columns > .builder-frame-grid[data-builder-columns="2"] { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.dehands-home-about > .builder-frame-grid { align-items: center; }
.dehands-text-section > .builder-frame-grid, .dehands-industries-section > .builder-frame-grid { max-width: 960px; }
.dehands-industry-item { margin-bottom: 10px; }
.dehands-sidebar .builder-text:last-child { margin-bottom: 0; }
.dehands-service-card { height: 100%; }
.dehands-service-card .service-icon, .dehands-service-card .service-one__link { background-color: var(--dehands-green); color: var(--dehands-green-dark); }
.dehands-service-card .service-icon i { color: var(--dehands-green-dark); }
.dehands-service-card:hover .service-icon { background-color: var(--dehands-green-dark); color: var(--dehands-green); }
.dehands-service-card:hover .service-icon i { color: var(--dehands-green); }
.dehands-service-list a:hover { color: var(--dehands-green-dark); text-decoration: underline; }
.dehands-news-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(280px,100%),1fr)); gap: 30px; }
.studio-collection-image { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; margin-bottom: 16px; }
.dehands-gallery-grid img { display: block; width: 100%; height: auto; object-fit: cover; }
@media (min-width: 768px) and (max-width: 991px) {
    .builder-frame-grid[data-builder-columns="3"], .builder-frame-grid[data-builder-columns="4"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .builder-frame-grid[data-builder-columns="3"] > .page-builder-element,
    .builder-frame-grid[data-builder-columns="4"] > .page-builder-element { grid-column: auto / span 1 !important; }
    .builder-frame-grid[data-builder-columns="3"] > .page-builder-element[style*="span 3"],
    .builder-frame-grid[data-builder-columns="4"] > .page-builder-element[style*="span 4"] { grid-column: 1 / -1 !important; }
}
@media (max-width: 991px) {
    .dehands-two-column > .builder-frame-grid { display: flex; flex-direction: column; gap: 40px; }
}
.dehands-contact-item .contact-one__box-content > a { display: block; }
.dehands-contact-item .contact-one__box-content > a + a { margin-top: 10px; }

/* Contact editor columns retain the frontend's original five/seven proportions. */
.dehands-contact-columns > .builder-frame-grid[data-builder-columns="2"] {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 60px;
}
@media (max-width: 991px) {
    .dehands-contact-columns > .builder-frame-grid { display: flex; flex-direction: column; gap: 40px; }
}

/* The public theme must implement the CMS row/column and spacing controls. */
.page-builder-elements, .builder-frame-grid {
    display: grid;
    grid-template-columns: repeat(var(--builder-cols, 1), minmax(0, 1fr));
    gap: 30px;
    align-items: start;
}
.page-builder-element { min-width: 0; max-width: 100%; }
.page-builder-element img { max-width: 100%; height: auto; }
.builder-full { width: 100%; }
.page-builder-section.builder-pad-none { padding: 0; }
.page-builder-section.builder-pad-small, .page-builder-frame.builder-pad-small { padding-top: 30px; padding-bottom: 30px; }
.page-builder-section.builder-pad-medium, .page-builder-frame.builder-pad-medium { padding-top: 60px; padding-bottom: 60px; }
.page-builder-section.builder-pad-large, .page-builder-frame.builder-pad-large { padding-top: 100px; padding-bottom: 100px; }
.builder-margin-small { margin-top: 20px; margin-bottom: 20px; }
.builder-margin-medium { margin-top: 40px; margin-bottom: 40px; }
.builder-margin-large { margin-top: 70px; margin-bottom: 70px; }
.block-title h2 span, .block-title h3 span { color: var(--dehands-green-dark); }
@media (max-width: 767px) {
    .page-builder-elements, .builder-frame-grid { display: flex; flex-direction: column; }
    .page-builder-element { width: 100%; }
}

/* --- Matching-object verification dialog --------------------------------- */
.human-puzzle {
    border: 0;
    border-radius: 14px;
    padding: 32px;
    max-width: 620px;
    width: calc(100% - 40px);
    box-shadow: 0 30px 80px rgba(15, 42, 23, 0.35);
}

.human-puzzle::backdrop { background-color: rgba(15, 42, 23, 0.72); }

.human-puzzle h2 { margin: 8px 0 6px; }

.human-puzzle .puzzle-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: 0;
    background: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--dehands-ink);
}

.puzzle-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
}

.puzzle-targets span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--dehands-green);
    color: var(--dehands-green-dark);
    font-weight: 600;
    border-radius: 40px;
    padding: 8px 16px;
}

.puzzle-targets svg { width: 20px; height: 20px; }

.puzzle-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.puzzle-choices button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    border: 2px solid rgba(22, 53, 31, 0.16);
    border-radius: 10px;
    background-color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--dehands-ink);
}

.puzzle-choices button[aria-pressed="true"] {
    border-color: var(--dehands-green);
    background-color: #f1f9e7;
}

.puzzle-choices svg { width: 26px; height: 26px; }

.puzzle-status { min-height: 20px; font-size: 14px; }

.puzzle-retry { margin-top: 12px; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 991px) {
    .dehands-info-band { padding: 70px 0; }
    .dehands-cta-band__inner { padding: 44px 0; }
    .dehands-lead { font-size: 17px; }
}

@media (max-width: 575px) {
    .puzzle-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dehands-map__frame { height: 300px; }
    .main-slider .thm-btn + .thm-btn { margin: 12px 0 0; }
}

/* --- Gallery lightbox ----------------------------------------------------- */
.dehands-lightbox {
    border: 0;
    border-radius: 12px;
    padding: 0;
    max-width: 92vw;
    width: 92vw;
    background-color: #0f2a17;
}

.dehands-lightbox::backdrop { background-color: rgba(15, 42, 23, 0.86); }

.dehands-lightbox__image {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
}

.dehands-lightbox__caption {
    color: #ffffff;
    text-align: center;
    padding: 16px 20px;
    margin: 0;
    font-size: 15px;
}

.dehands-lightbox__close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 2;
    border: 0;
    background: rgba(15, 42, 23, 0.65);
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
}

/* Keep a semantic page title when the editor hides the visual title area. */
.dehands-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Private CMS draft preview — deliberately distinct from the public page. */
.dehands-preview-banner {
    position: sticky;
    top: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 11px 20px;
    background: var(--dehands-green-dark, #16351f);
    color: #ffffff;
    font: 600 14px/1.4 system-ui, sans-serif;
    text-align: center;
}

.dehands-preview-banner a {
    display: inline-flex;
    border-radius: 5px;
    padding: 6px 11px;
    background: var(--dehands-green, #93cf52);
    color: #16351f;
    font-weight: 800;
    text-decoration: none;
}

.dehands-preview-banner a:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

@media (max-width: 575px) {
    .dehands-preview-banner { align-items: stretch; flex-direction: column; gap: 8px; }
    .dehands-preview-banner a { justify-content: center; }
}
