/********** Template CSS **********/
:root {
    --primary: #FF800F;
    --secondary: #001064;
    --light: #F6F7F8;
    --dark: #010A35;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.back-to-top img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin: 0;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button ***/
.btn {
    transition: .5s;
    border-radius: 12px;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover,
.btn.btn-secondary,
.btn.btn-outline-secondary:hover {
    color: #FFFFFF;
}

.btn.btn-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.btn.btn-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-success {
    background-color:#3fcc7a;
    border-color: #3fcc7a;
    color: #FFFFFF;
}

.btn-success:hover {
    background-color: #3fcc7a;
    border-color: #3fcc7a;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/*** Form Controls ***/
.form-control,
.form-select,
textarea.form-control {
    border-radius: 12px;
    border: 1px solid #dee2e6;
    transition: .3s;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 128, 15, 0.25);
}
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar.sticky-top {
    top: -100px;
    transition: top 0.3s ease-out;
}

.navbar .navbar-brand img {
    max-height: 60px;
    width: auto;
}

.navbar .navbar-nav .nav-link {
    margin-left: 25px;
    padding: 10px 0;
    color: #696E77;
    font-weight: 400;
    outline: none;
    transition: color 0.2s ease;
}

/*** Blogs ***/
.blogs-hero {
    background: linear-gradient(135deg, rgba(255, 128, 15, 0.12), rgba(0, 16, 100, 0.12));
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(1, 10, 53, 0.08);
}

.blogs-hero::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 240px;
    height: 240px;
    background: rgba(255, 128, 15, 0.12);
    border-radius: 50%;
}

.blogs-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: var(--secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(1, 10, 53, 0.08);
}

.blog-featured-card {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(1, 10, 53, 0.12);
}

.blog-featured-card .blog-featured-media {
    position: relative;
    min-height: 100%;
}

.blog-featured-card .blog-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(1, 10, 53, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(1, 10, 53, 0.12);
}

.blog-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.blog-meta {
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
}

.blog-meta i {
    color: var(--primary);
}

.blog-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.75rem;
    background: rgba(255, 128, 15, 0.1);
    color: var(--primary);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-detail .blog-cover img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.blog-article {
    border-radius: 22px;
    overflow: hidden;
}

.blog-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2d3348;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary);
    font-weight: 700;
}

.blog-content p {
    margin-bottom: 1.25rem;
}

.blog-content img {
    max-width: 100%;
    border-radius: 18px;
    margin: 1.5rem 0;
    box-shadow: 0 12px 30px rgba(1, 10, 53, 0.12);
}

.blog-content blockquote {
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--primary);
    background: rgba(255, 128, 15, 0.08);
    border-radius: 12px;
    color: #222840;
    font-style: italic;
}

.blog-sidebar .card {
    border-radius: 18px;
    border: 0;
    box-shadow: 0 14px 35px rgba(1, 10, 53, 0.08);
}

.blog-sidebar .recent-post {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.blog-sidebar .recent-post img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f6f7f8;
    color: var(--secondary);
    transition: background 0.2s ease, color 0.2s ease;
}

.share-buttons a:hover {
    background: var(--primary);
    color: #fff;
}

#timing {
    scroll-margin-top: 520px;
}

.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar {
        padding-left: 0.3rem !important;
        padding-right: 0.3rem !important;
    }

    .navbar .navbar-brand {
        margin-right: 0 !important;
        text-align: center;
    }

    .navbar .navbar-brand img {
        max-height: 40px;
        margin-right: 1.4rem !important;
    }

    .navbar .navbar-brand h1 {
        font-size: 2.2rem !important;
        margin: 0 !important;
    }

    .navbar .navbar-brand span {
        font-size: 0.85rem !important;
    }

    .navbar .navbar-collapse {
        padding: 0 !important;
    }

    .navbar .navbar-collapse.show {
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    .navbar .navbar-nav {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        background: transparent !important;
        display: flex;
        flex-wrap: nowrap;
        gap: 0;
        padding: 5px 0;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        padding-left: 24px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar .navbar-nav .nav-link {
        margin-left: 0 !important;
        padding: 8px 10px !important;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
        text-align: center;
    }

    .navbar .btn-primary {
        margin-left: 5px !important;
        margin-top: 0 !important;
        padding: 6px 14px !important;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Center the Book Appointment button on mobile nav */
    #navBookBtn {
        display: block;
        width: fit-content;
        margin: 8px auto 0 !important;
    }

    .navbar .nav-item .dropdown-menu {
        padding-left: 30px;
    }
}

@media (max-width: 576px) {
    .navbar .navbar-brand {
        gap: 0.1rem;
        margin-right: 0 !important;
    }

    .navbar .navbar-brand h1 {
        font-size: 1.9rem !important;
    }

    .navbar .navbar-brand span {
        font-size: 0.8rem !important;
    }

    .navbar .navbar-nav .nav-link {
        padding: 6px 8px !important;
        font-size: 0.8rem;
    }

    .navbar .btn-primary {
        padding: 5px 10px !important;
        font-size: 0.75rem;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        right: 0;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(1, 10, 53, .8);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--dark);
    border: 12px solid var(--dark);
    border-radius: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
/*
    Author: Krypto Etox
    All Rights reserved
*/
.page-header {
    background: linear-gradient(rgba(1, 10, 53, .8), rgba(1, 10, 53, .8)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item a,
.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

.page-header .breadcrumb-item a:hover,
.page-header .breadcrumb-item.active {
    color: var(--primary);
}


/*** Facts ***/
.facts {
    background: rgba(1, 10, 53, .8);
}


/*** Quote ***/
@media (min-width: 992px) {
    .container.quote {
        max-width: 100% !important;
    }

    .container.quote .quote-text {
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }

    .container.quote .quote-form {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .container.quote .quote-text  {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }

    .container.quote .quote-form  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .container.quote .quote-text  {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }

    .container.quote .quote-form  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}

.container.quote .quote-text {
    background: rgba(1, 10, 53, .8);
}

.container.quote .quote-form {
    background: rgba(255, 255, 255, .8);
}

.container.quote .quote-text .h-100,
.container.quote .quote-form .h-100 {
    padding: 6rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/*** Service ***/
.service-item {
    border-radius: 16px;
    overflow: hidden;
}

.service-item .service-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-item .service-icon img {
    max-width: 60px;
    max-height: 60px;
}


/*** Team ***/
.team-item .team-img::before,
.team-item .team-img::after {
    position: absolute;
    content: "";
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(1, 10, 53, .8);
    transition: .5s;
}

.team-item .team-img::after {
    left: auto;
    right: 0;
}

.team-item:hover .team-img::before,
.team-item:hover .team-img::after {
    width: 50%;
}

.team-item .team-img .team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
    z-index: 3;
    opacity: 0;
}

.team-item:hover .team-img .team-social {
    transition-delay: .3s;
    opacity: 1;
}


/*** Testimonial ***/
.animated.pulse {
    animation-duration: 1.5s;
}

.testimonial-left,
.testimonial-right {
    position: relative;
}

.testimonial-left img,
.testimonial-right img {
    position: absolute;
    border-radius: 70px;
}

.testimonial-left img:nth-child(1),
.testimonial-right img:nth-child(3) {
    width: 70px;
    height: 70px;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-left img:nth-child(2),
.testimonial-right img:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

.testimonial-left img:nth-child(3),
.testimonial-right img:nth-child(1) {
    width: 50px;
    height: 50px;
    bottom: 10%;
    right: 10%;
}

.testimonial-carousel .owl-item img {
    width: 100px;
    height: 100px;
    border-radius: 100px;
}

.testimonial-carousel .owl-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 0 5px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--secondary);
}


/*** Footer ***/
.footer {
    color: #7F8499;
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #7F8499;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #7F8499;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .btn.btn-square {
    color: #7F8499;
    border: 1px solid #7F8499;
}

.footer .btn.btn-square:hover {
    color: var(--light);
    border-color: var(--primary);
}

.footer .copyright {
    padding: 25px 0;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--primary);
}

.footer .copyright a:hover {
    color: #FFFFFF;
}

/*** Language Toggle & RTL ***/
.lang-toggle {
    position: fixed;
    left: 20px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    z-index: 999;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.lang-pill {
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 600;
    color: #111827;
    background: transparent;
}

.lang-pill.active {
    background: var(--primary);
    color: #ffffff;
}

@media (max-width: 768px) {
    .lang-toggle {
        left: 16px;
        bottom: 20px;
        padding: 6px 10px;
    }

    .lang-pill {
        padding: 5px 8px;
        font-size: 0.95rem;
    }
}

body.lang-ur {
    direction: rtl;
    font-family: 'Noto Nastaliq Urdu', 'Noto Nastaliq Urdu Draft', serif;
    overflow-x: hidden;
}

html[dir="rtl"] {
    overflow-x: hidden;
}

@media (max-width: 768px) {
    html[dir="rtl"],
    body.lang-ur {
        max-width: 100vw;
        overflow-x: hidden;
    }

    body.lang-ur .container,
    body.lang-ur .container-fluid {
        max-width: 100%;
        overflow-x: hidden;
    }

    html,
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* Ensure Urdu mode uses Nastaliq everywhere, including headings/buttons that override body font */
body.lang-ur,
body.lang-ur h1,
body.lang-ur h2,
body.lang-ur h3,
body.lang-ur h4,
body.lang-ur h5,
body.lang-ur h6,
body.lang-ur .display-1,
body.lang-ur .display-2,
body.lang-ur .display-3,
body.lang-ur .display-4,
body.lang-ur .display-5,
body.lang-ur .display-6,
body.lang-ur .navbar-brand,
body.lang-ur .navbar-nav .nav-link,
body.lang-ur .btn,
body.lang-ur .modal-title,
body.lang-ur .form-control,
body.lang-ur .form-select,
body.lang-ur .btn-link,
body.lang-ur .badge,
body.lang-ur .breadcrumb,
body.lang-ur .footer,
body.lang-ur .service-item,
body.lang-ur .service-item a,
body.lang-ur .service-item p,
body.lang-ur .service-item .h4,
body.lang-ur .service-item .h5,
body.lang-ur .service-item .h6 {
    font-family: 'Noto Nastaliq Urdu', 'Noto Nastaliq Urdu Draft', serif !important;
}

body.lang-en {
    direction: ltr;
}

body.lang-ur .footer .btn.btn-link {
    text-align: right;
}

body.lang-ur .navbar .navbar-nav .nav-link {
    margin-right: 25px;
    margin-left: 0;
}

body.lang-ur .text-start {
    text-align: right !important;
}

body.lang-ur .text-end {
    text-align: left !important;
}

html[dir="rtl"] .skip-to-content {
    left: auto;
    right: -999px;
}

html[dir="rtl"] .skip-to-content:focus {
    left: auto;
    right: 1rem;
}

/* Footer Logo Responsive Sizing */
.footer-logo {
    max-width: 100px !important;
}

@media (max-width: 991.98px) {
    .footer-logo {
        max-width: 350px !important;
    }
}

/* ====================================== */
/* Mobile Speed Optimization & Performance */
/* ====================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimize images for mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fast hover transitions */
a, button, .btn {
    transition: all 0.15s ease-out;
}

/* Optimize carousel for mobile */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
        border-width: 8px;
    }

    .carousel-caption h1 {
        font-size: 1.5rem !important;
    }

    .carousel-caption p {
        font-size: 0.9rem !important;
    }
}

/* Optimize WOW animations */
@media (prefers-reduced-motion: no-preference) {
    @media (max-width: 768px) {
        .wow {
            animation-duration: 0.4s !important;
        }
    }
}

/* Optimize button animations */
.btn {
    -webkit-tap-highlight-color: transparent;
}

/* Back to top button mobile optimizations */
@media (max-width: 768px) {
    .back-to-top {
        right: 27px;
        bottom: 15px;
    }
    
    .back-to-top.btn-lg-square {
        width: 48px;
        height: 48px;
    }
    
    .back-to-top img {
        width: 20px;
        height: 20px;
    }
}

/* Smooth scrolling support */
html {
    scroll-behavior: smooth;
}

/* Optimize font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-display: fallback;
}

/* Social Media Links in Footer */
.social-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-icon:hover {
    background-color: #FF800F;
    border-color: #FF800F;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 128, 15, 0.4);
    text-decoration: none;
}

.social-icon i {
    font-size: 18px;
}
