/*
 * Casey & Meaney - additions to the theme stylesheets.
 *
 * style/allstyles.css, style/style.css and responsive.css are the original
 * theme's files, copied verbatim so the design is unchanged. This file only
 * supplies what the jQuery plugin stack used to render at runtime - the
 * slider, the accordion, the testimonials carousel, the counters, the
 * lightbox and the contact form's validation states.
 */

/* ---------------------------------------------------------------- a11y */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Bot trap - off-screen rather than display:none, which some bots detect. */
.cf-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ------------------------------------------------------------- header */

/* Below 480px responsive.css sets .header-top-bar{display:none}; the toggle
   button reveals it again. */
.header-top-bar-container.revealed .header-top-bar {
    display: block;
}

.mobile-menu-switch.active .line:first-child {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-switch.active .line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-switch.active .line:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------------- slider */

/* The Revolution Slider plugin positioned these absolutely at load. */
.revolution-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 900ms ease, visibility 900ms ease;
}

.revolution-slider .slide.is-active {
    opacity: 1;
    visibility: visible;
}

.revolution-slider .slide .slider-content-box {
    position: absolute;
    top: 140px;
    left: 0;
    margin-left: 0;
}

.slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 3;
    text-align: center;
}

.slider-dots .slider-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin: 0 5px;
    padding: 0;
    border: 1px solid #FFF;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 300ms ease, background-color 300ms ease;
}

.slider-dots .slider-dot:hover,
.slider-dots .slider-dot.is-active {
    opacity: 1;
    background: #FFF;
}

@media screen and (max-width: 767px) {
    .revolution-slider .slide .slider-content-box {
        top: auto;
        bottom: 40px;
        margin-left: 50px;
    }
}

@media screen and (max-width: 479px) {
    .revolution-slider .slide .slider-content-box {
        bottom: 55px;
        margin-left: 10px;
    }
}

/* --------------------------------------------------------- testimonials */

/* carouFredSel supplied the overflow wrapper; one slide shows at a time. */
.testimonials-container {
    overflow: hidden;
}

.testimonials-list li {
    display: none;
}

.testimonials-list li.is-active {
    display: block;
}

/* ------------------------------------------------------------ counters */

/* The odometer plugin replaced the empty <span>; the number is already in the
   markup so it shows without JS, and the theme's styles still apply. */
.features-list.big li .number {
    display: block;
}

/* ----------------------------------------------------------- accordion */

/* The markup keeps the classes jQuery UI's accordion emitted, so the theme's
   own .accordion rules in style.css apply as-is. All that is missing is the
   padding jQuery UI's .ui-accordion-content wrapper used to provide. */
.accordion > li > p {
    padding: 30px 0 20px;
    margin: 0;
}

/* --------------------------------------------------------- project grid */

/* Isotope faded items in and out; a simple hide is enough here. */
.projects-list li.is-hidden {
    display: none;
}

/* The theme ran $(".isotope").isotope({masonry:{gutter:30}}), which positioned
   the 270x180 tiles absolutely with a 30px gutter. Four tiles plus three
   gutters come to exactly 1170px, the content width of a .row - so flex with
   the same gap reproduces the grid and reflows correctly when filtered, which
   absolute positioning could not do without the plugin. */
.projects-list.isotope {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.projects-list.isotope li {
    margin-top: 0; /* gap now supplies the vertical spacing too */
}

/* Tiles are cropped to a fixed 270x180; the plugin-era stylesheet set those
   dimensions on the img without an object-fit, which only looked right while
   the sources were ACF resizes already near that ratio. The rebuild uses the
   full-size uploads, so crop rather than squash them. */
.projects-list.isotope a > img {
    object-fit: cover;
}

/* style.css hides every service and project thumbnail and relies on the
   theme's jQuery to insert a .re-preloader span in front of it and fade the
   image in once it has loaded:

     .services-list a>img, .projects-list a>img, .re-preload>img, ... {
         display: none;
     }

   Only the .isotope variant is re-shown further down that file, so without
   the plugin stack these stay invisible. Nothing emits a .re-preloader here,
   so the images simply display. Isotope's own rule is more specific and keeps
   its 270x180 sizing. */
.services-list a>img,
.projects-list a>img {
    display: block;
}

/* ------------------------------------------------------------ lightbox */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    text-align: center;
}

.lightbox-overlay img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 90vw;
    max-height: 86vh;
    transform: translate(-50%, -50%);
}

.lightbox-overlay .lightbox-close,
.lightbox-overlay .lightbox-nav {
    position: absolute;
    z-index: 2;
    border: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #FFF;
    cursor: pointer;
    line-height: 1;
    transition: background-color 300ms ease;
}

.lightbox-overlay .lightbox-close:hover,
.lightbox-overlay .lightbox-nav:hover {
    background: #106481;
}

.lightbox-overlay .lightbox-close {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.lightbox-overlay .lightbox-nav {
    top: 50%;
    width: 44px;
    height: 66px;
    margin-top: -33px;
    font-size: 30px;
}

.lightbox-overlay .lightbox-nav.prev {
    left: 20px;
}

.lightbox-overlay .lightbox-nav.next {
    right: 20px;
}

body.lightbox-open {
    overflow: hidden;
}

/* ------------------------------------------------------- contact form */

.contact-form input.has-error,
.contact-form textarea.has-error {
    border-color: #C0392B;
    background-color: #FDF3F2;
}

.contact-status {
    display: none;
    font-family: 'Ek Mukta';
    font-size: 15px;
    line-height: 24px;
}

.contact-status.is-ok,
.contact-status.is-error {
    display: block;
}

.contact-status.is-ok {
    color: #106481;
}

.contact-status.is-error {
    color: #C0392B;
}

/* --------------------------------------------------------- scroll top */

.scroll-top.visible {
    visibility: visible;
}

/* --------------------------------------------------------------- map */

.contact-map {
    z-index: 1; /* keep Leaflet's panes under the sticky header */
}
