/* ==========================================================================
   Civil Works Consultants - custom overrides on top of the Archite template
   ========================================================================== */

/* --- Fix: home portfolio images were stretched to fixed boxes with no
   object-fit, distorting any photo whose aspect ratio didn't match the
   original template images exactly. Cover-crop instead of stretching. --- */
.home-one-portfolio-first-img,
.home-one-portfolio-second-img,
.home-one-portfolio-third-img,
.home-one-portfolio-fourth-img,
.home-one-portfolio-fifth-img,
.home-one-portfolio-sixth-img {
    object-fit: cover;
    object-position: center;
}

/* --- Fix: testimonial/avatar-style circular images need object-fit so a
   non-square source photo isn't squashed into a circle. --- */
.testimonial-one-slider-wrapper .owl-carousel .owl-item img,
.rounded-circle {
    object-fit: cover;
}

/* Portfolio grid (new page) image cards - cover crop, never stretch */
.cwc-portfolio-card img,
.cwc-project-card img,
.cwc-gallery-card img {
    object-fit: cover;
    object-position: center;
}

/* Monogram avatar used for team + leadership (no photo assets available) */
.cwc-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #101010;
    color: #f68c0a;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    width: 100%;
    aspect-ratio: 4 / 5;
}

/* Registration / stat badge cards used on About + Home */
.cwc-badge-card {
    background: #f7f7f7;
    padding: 40px 24px;
    text-align: center;
    height: 100%;
}
.cwc-badge-card i {
    font-size: 34px;
    color: #f68c0a;
    margin-bottom: 18px;
    display: inline-block;
}

/* Simple responsive stat grid used in a couple of sections */
.cwc-stat {
    text-align: center;
    padding: 20px 10px;
}

/* Service list icon circle (services page) */
.cwc-icon-circle {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #101010;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f68c0a;
    font-size: 28px;
    flex-shrink: 0;
}

/* Contact page info rows */
.cwc-contact-row i {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #101010;
    color: #f68c0a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Make sure long service/portfolio card text never overflows on small screens */
.cwc-card-text {
    word-wrap: break-word;
}

/* Portfolio filter buttons */
.cwc-filter-btn {
    border: 1px solid #10101022;
    background: transparent;
    padding: 10px 22px;
    margin: 0 6px 12px 0;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    transition: all .25s ease;
}
.cwc-filter-btn.active,
.cwc-filter-btn:hover {
    background: #101010;
    color: #fff;
    border-color: #101010;
}

/* Leaflet-free simple map placeholder frame (contact page) */
.cwc-map-frame {
    width: 100%;
    height: 420px;
    border: 0;
}

@media (max-width: 575px) {
    .cwc-avatar { aspect-ratio: 1/1; }
}

/* ==========================================================================
   Fix: nav text invisible on inner-page (light) headers before this patch
   the site was missing the nav-secondary modifier the template's CSS keys
   off of. header() in components.py now adds it; this is a defensive
   backstop in case any header markup ever omits it again.
   ========================================================================== */
.light-header .menu-link,
.light-header .nav-secondary .menu-link {
    color: #101010 !important;
}

/* ==========================================================================
   Sticky header on scroll (JS toggles data-sticky-variant class from
   js/cwc-custom.js). Bootstrap's .position-absolute is !important, so the
   JS removes that class rather than relying on CSS specificity alone.
   ========================================================================== */
.dark-sticky,
.light-sticky {
    padding-bottom: 20px;
    transition: background-color .2s ease;
}

.cwc-sticky-active .header-logo {
    max-width: 140px !important;
}

/* ==========================================================================
   Fix: footer email address rendered at 55px (template default, sized for
   a short placeholder) which overflowed/wrapped badly with a real address.
   ========================================================================== */
.footer-email {
    font-size: clamp(20px, 2.4vw, 30px);
    word-break: break-word;
    line-height: 1.3;
}

/* Registered-with authority links in the footer */
.cwc-reg-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s ease;
}
.cwc-reg-link:hover {
    color: #f68c0a;
}

/* ==========================================================================
   Hero slider (home page) - 7 category slides
   ========================================================================== */
.cwc-hero-slider .owl-carousel,
.cwc-hero-slider .owl-stage-outer,
.cwc-hero-slider .owl-stage,
.cwc-hero-slider .owl-item {
    height: 100%;
}

.cwc-hero-slide {
    position: relative;
    height: 100vh;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.cwc-hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: cwcHeroZoom 7.5s ease-out forwards;
    will-change: transform;
}

@keyframes cwcHeroZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.1); }
}

.cwc-hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.65) 100%);
}

.cwc-hero-slide-content {
    position: relative;
    z-index: 2;
    animation: cwcFadeUp .9s ease both;
}

@keyframes cwcFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cwc-hero-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    font-size: clamp(30px, 5vw, 64px);
    margin: 0 0 20px 0;
}

.cwc-hero-slider .owl-nav {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 3;
    display: flex;
    gap: 12px;
}

.cwc-hero-slider .owl-nav button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.5) !important;
    background: rgba(0,0,0,.3) !important;
    color: #fff !important;
    font-size: 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}
.cwc-hero-slider .owl-nav button:hover {
    background: #f68c0a !important;
    border-color: #f68c0a !important;
}

.cwc-hero-slider .owl-dots {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}
.cwc-hero-slider .owl-dots .owl-dot span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    transition: all .25s ease;
}
.cwc-hero-slider .owl-dots .owl-dot.active span {
    background: #f68c0a;
    width: 28px;
    border-radius: 6px;
}

.cwc-hero-category-tag {
    display: inline-block;
    color: #f68c0a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #f68c0a;
    padding: 6px 16px;
    border-radius: 30px;
}

@media (max-width: 767px) {
    .cwc-hero-slide { min-height: 620px; }
    .cwc-hero-slider .owl-nav { display: none; }
}

/* ==========================================================================
   Portfolio detail pages
   ========================================================================== */
.cwc-detail-hero {
    height: 60vh;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}
.cwc-detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 30%, rgba(0,0,0,.8) 100%);
}
.cwc-detail-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}
.cwc-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid #e5e5e5;
}
.cwc-spec-row:last-child {
    border-bottom: 0;
}
.cwc-video-placeholder {
    background: #101010;
    color: #fff;
    border-radius: 0;
    padding: 60px 30px;
    text-align: center;
}

