/*
 * custom.css — every style override for this site lives in this one file.
 *
 * It loads AFTER the theme CSS (bootstrap.min.css, style.min.css, colors/default.css),
 * so rules here win. Never edit the theme's own CSS files: keeping all changes here
 * means the theme can be updated without losing them.
 *
 * Search for "SECTION:" to jump between parts of this file.
 */

/* ==================== SECTION: ANIMATION ==================== */
/* WOW.js + animate.css come with the theme; keep the motion short and quiet */
:root {
    --animate-duration: 600ms;
}

/* ==================== SECTION: REDUCED MOTION ==================== */
/* Visitors who ask their OS for less motion get no animations or smooth transitions */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}

/* ==================== SECTION: IMAGE PROTECTION ==================== */
/*
 * Discourages saving photos: no dragging an image to the desktop, no selecting it, and no
 * "Save image" menu on a long press in iPhone Safari. custom.js blocks the right-click menu.
 * This stops the easy ways only; anything shown on screen can still be screenshotted.
 */
img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ==================== SECTION: SKIP LINK ==================== */
/* Hidden until a keyboard user tabs to it; sits above the fixed navbar */
.skip-link:focus {
    position: fixed !important;
    top: 12px;
    left: 12px;
    z-index: 1050;
    padding: 12px 16px;
    background-color: #ffffff;
    color: #161c2d;
    border-radius: 7px;
    box-shadow: 0 5px 15px rgba(60, 72, 88, 0.15);
}

/* ==================== SECTION: HEADER ==================== */
/* Text wordmark in place of the theme's image logo */
.brand-wordmark {
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #161c2d;
}

.brand-wordmark:hover,
.brand-wordmark:focus {
    color: #161c2d;
}

@media (max-width: 991.98px) {
    /* Tap targets: at least 44px tall on mobile */
    .navbar-custom .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
    }

    .navbar-custom .navbar-nav .nav-item .nav-link {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* ==================== SECTION: HEADING SIZES ==================== */
/*
 * The theme sizes headings by tag with !important (h2 = 36px, h3 = 30px ...). Pages here keep
 * a logical h1 > h2 > h3 order for SEO and screen readers, so a size class sets the look:
 * <h2 class="h4"> is a level-2 heading that looks like the theme's h4.
 */
.h1 { font-size: 42px !important; }
.h2 { font-size: 36px !important; }
.h3 { font-size: 30px !important; }
.h4 { font-size: 24px !important; }
.h5 { font-size: 18px !important; }
.h6 { font-size: 16px !important; }

/* ==================== SECTION: HERO ==================== */
/* The theme sizes the headline for a short name; a full name needs less */
.hero-section .title-heading .heading {
    font-size: 56px !important;
}

@media (max-width: 1199.98px) {
    .hero-section .title-heading .heading {
        font-size: 46px !important;
    }
}

@media (max-width: 767.98px) {
    .hero-section .title-heading .heading {
        font-size: 36px !important;
    }
}

@media (min-width: 992px) {
    /* Start the red shape below the navbar so the red "Get a Quote" button stays visible on it */
    .hero-section.bg-animation-right:after {
        top: 80px;
        bottom: 0;
        height: auto;
    }
}

/*
 * Centre the photo on the red shape. The shape is sized from the whole screen but the photo sits in the
 * page container, so the gap between them grows with screen width. Each breakpoint below sets:
 *   --hero-shift: distance from the photo's centre to the shape's centre
 *   --hero-room:  space left before the photo would pass the right edge of the screen
 * The photo moves right by the smaller of the two. (Below 768px the shape is hidden and the photo stacks.)
 */
@media (min-width: 768px) {
    .hero-section .hero-photo {
        transform: translateX(max(0px, min(var(--hero-shift), var(--hero-room))));
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section .hero-photo {
        --hero-shift: calc(36.6vw - 210px);
        --hero-room: calc((100vw - 720px) / 2 - 4px);
    }
}

@media (min-width: 992px) and (max-width: 1024px) {
    .hero-section .hero-photo {
        --hero-shift: calc(36.6vw - 280px);
        --hero-room: calc((100vw - 960px) / 2 - 4px);
    }
}

@media (min-width: 1025px) and (max-width: 1199.98px) {
    .hero-section .hero-photo {
        --hero-shift: calc(31vw - 280px);
        --hero-room: calc((100vw - 960px) / 2 - 4px);
    }
}

/* The theme caps the page container at 1140px from 1200px up (Bootstrap's own 1320px is overridden) */
@media (min-width: 1200px) {
    .hero-section .hero-photo {
        --hero-shift: calc(31vw - 332px);
        --hero-room: calc((100vw - 1140px) / 2 - 4px);
    }
}

/* ==================== SECTION: ABOUT PHOTO ==================== */
/*
 * The theme's frame around the whole photo, with room above the head. The frame is drawn twice:
 * once behind the photo, and again (lower half only) in front of it, so the photo's cut-off bottom
 * edge tucks neatly behind the frame's bottom border.
 */
.about-hero {
    padding-top: 24px; /* breathing room between the frame's top edge and the head */
}

.about-hero::before,
.about-hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: 3%;
    bottom: -2px; /* the scaled photo can end on a fraction of a pixel; this keeps its bottom edge covered */
    left: 3%;
    border: 16px solid #adb5bd; /* the theme's #e9ecef, darkened */
    border-radius: 7px;
    pointer-events: none;
}

.about-hero::before {
    z-index: 0;
}

.about-hero img {
    position: relative;
    z-index: 1;
}

.about-hero::after {
    z-index: 2;
    clip-path: inset(50% 0 0 0);
}

/* ==================== SECTION: PAGE HEADER ==================== */
.page-next-level .title {
    font-size: 32px !important;
    overflow-wrap: anywhere; /* long domain names such as discountoffer.com.pk must wrap on phones */
}

@media (max-width: 767.98px) {
    .page-next-level .title {
        font-size: 26px !important;
    }
}

@media (max-width: 991.98px) {
    /* Breadcrumb links: 44px tap targets on mobile */
    .page-next-level .page-next li a {
        display: inline-block;
        padding-top: 11px;
        padding-bottom: 11px;
    }
}

/* ==================== SECTION: HOVER EFFECTS ==================== */
/* Keep the theme's card hovers, but quieter: a 4px lift and no spinning or fading images */
.service-wrapper:hover,
.interests-desc:hover,
.portfolio-box:hover,
.blog-post:hover {
    transform: translateY(-4px);
}

.portfolio-box .portfolio-box-img img,
.portfolio-box .portfolio-box-img .overlay-work {
    transition: all 0.2s ease;
}

.portfolio-box:hover .portfolio-box-img img {
    transform: scale(1.03);
    opacity: 1;
}

/* ==================== SECTION: PROJECT CARD ==================== */
/* Screenshots of any size fill the same frame, so cards in a row line up */
.project-card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.project-card-links a {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 44px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.project-card-links a:hover,
.project-card-links a:focus {
    color: #e54b4b !important;
}

/* ==================== SECTION: PROJECT PAGER ==================== */
@media (max-width: 991.98px) {
    .project-pager a {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
}

/* ==================== SECTION: CALL TO ACTION ==================== */
/* Plain dark panel in the theme's heading colour (the theme's stock-photo background was dropped) */
.cta-banner {
    background-color: #161c2d;
}

@media (min-width: 992px) {
    .cta-banner {
        border-radius: 50rem !important; /* the theme's pill shape, desktop only so text never meets the curve */
    }
}

/* ==================== SECTION: LIGHTBOX ==================== */
/* Tobii's close button is a faint 20px icon; make the X an obvious round button with a 44px tap target */
.tobii .tobii__btn--close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    opacity: 1;
    transition: background-color 0.2s ease;
}

.tobii .tobii__btn--close:hover,
.tobii .tobii__btn--close:focus-visible {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ==================== SECTION: QUOTE FORM ==================== */
.quote-form .form-label {
    font-weight: 500;
}

.quote-form .form-control,
.quote-form .form-select {
    min-height: 44px;
    font-size: 16px; /* 16px or more stops iPhones zooming in when a field is tapped */
}

/* The theme removes the focus ring; keyboard users need to see where they are */
.quote-form .form-control:focus,
.quote-form .form-select:focus {
    border-color: #e54b4b !important;
    box-shadow: 0 0 0 3px rgba(229, 75, 75, 0.15);
}

/* Bootstrap's .border uses !important, which would hide the red error border */
.quote-form .is-invalid {
    border-color: #dc3545 !important;
}

/* SECURITY: honeypot wrapper, moved off-screen instead of display:none, which bots look for */
.form-extra {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.quote-steps .step-number {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid #e54b4b;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: #161c2d;
}

/* ==================== SECTION: BUTTONS ==================== */
@media (max-width: 991.98px) {
    /* The theme's buttons are about 40px tall; lift them to 44px on mobile */
    .btn {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* ==================== SECTION: FLASH ALERT ==================== */
/* Floats just below the fixed navbar so it is never hidden behind it */
.site-alert {
    position: fixed;
    top: 88px;
    left: 50%;
    z-index: 1000; /* theme navbar is 999 */
    width: calc(100% - 32px);
    max-width: 540px;
    transform: translateX(-50%);
}

/* ==================== SECTION: FOOTER ==================== */
.brand-wordmark-light,
.brand-wordmark-light:hover,
.brand-wordmark-light:focus {
    color: #ffffff;
    font-size: 24px;
}

.footer-nav a {
    display: inline-block;
    padding: 6px 10px;
    color: #adb5bd;
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: #ffffff;
}

@media (max-width: 991.98px) {
    .footer-nav a {
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .footer .social-icon li a {
        width: 44px;
        height: 44px;
        line-height: 42px;
    }
}

/* ==================== SECTION: BACK TO TOP ==================== */
@media (max-width: 991.98px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
        line-height: 44px;
    }
}
