/********** Template CSS **********/
:root {
    --primary: #B78D65;
    --light: #F8F8F8;
    --dark: #252525;
}

/* Base responsive improvements */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    font-size: 16px; /* Base font size for better mobile readability */
}

h1, .h1 {
    font-size: calc(1.5rem + 1.5vw) !important; /* Responsive font sizing */
}

h2, .h2 {
    font-size: calc(1.3rem + 1.2vw) !important;
}

.display-1 {
    font-size: calc(2rem + 3vw) !important;
}

.display-5 {
    font-size: calc(1.2rem + 1vw) !important;
}

h1,
h2,
.h1,
.h2,
.fw-bold {
    font-weight: 600 !important;
}

h3,
h4,
.h3,
.h4,
.fw-medium {
    font-weight: 500 !important;
}

h5,
h6,
.h5,
.h6,
.fw-normal {
    font-weight: 400 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

/* Mobile adjustments for back to top */
@media (max-width: 768px) {
    .back-to-top {
        right: 15px;
        bottom: 80px; /* Above WhatsApp button */
        width: 40px;
        height: 40px;
    }
}

/*** 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 {
    font-weight: 500;
    transition: .5s;
}

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

.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;
}

.btn-outline-body {
    color: var(--primary);
    border-color: #777777;
}

.btn-outline-body:hover {
    color: #FFFFFF;
    background: var(--primary);
    border-color: var(--primary);
}

/* Mobile button improvements */
@media (max-width: 768px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 14px;
    }
    
    .btn.py-3.px-5 {
        padding: 0.75rem 1.5rem !important;
    }
}


/*** Navbar ***/
.navbar {
    padding: 0.5rem 1rem;
}

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

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 30px 0;
    color: var(--dark);
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
}

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

.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

/* Mobile navbar improvements */
@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 12px 0;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    .navbar .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-brand h1 {
        font-size: 1.2rem !important;
    }
    
    .navbar-brand img {
        width: 30px;
        height: 30px;
    }
    
    .navbar .ms-auto {
        margin-left: 0 !important;
    }
    
    /* Improve touch targets */
    .navbar-toggler {
        padding: 0.5rem 0.75rem;
        font-size: 1.2rem;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.owl-carousel-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, .5);
}

/* Mobile header improvements */
@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        position: relative;
        min-height: 400px; /* Reduced from 500px */
    }

    .header-carousel .owl-carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .header-carousel .owl-carousel-item p {
        font-size: 14px !important;
    }
    
    .owl-carousel-inner .container {
        padding: 0 20px;
    }
    
    .owl-carousel-inner .col-10 {
        width: 100%;
    }
    
    .header-carousel .owl-dots {
        width: 40px;
        right: 10px;
    }
    
    .header-carousel .owl-dots .owl-dot {
        width: 30px;
        height: 30px;
    }
    
    .header-carousel .owl-dots .owl-dot.active {
        width: 40px;
        height: 40px;
    }
}

.header-carousel .owl-dots {
    position: absolute;
    width: 60px;
    height: 100%;
    top: 0;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dots .owl-dot {
    position: relative;
    width: 45px;
    height: 45px;
    margin: 5px 0;
    background: var(--dark);
    transition: .5s;
}

.header-carousel .owl-dots .owl-dot.active {
    width: 60px;
    height: 60px;
}

.header-carousel .owl-dots .owl-dot img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 2px;
    transition: .5s;
    opacity: .3;
}

.header-carousel .owl-dots .owl-dot.active img {
    opacity: 1;
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}


/*** Section Title ***/
.section-title {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 3px; /* Reduced from 5px for mobile */
    text-transform: uppercase;
    font-size: 14px;
}

@media (max-width: 768px) {
    .section-title {
        letter-spacing: 2px;
        font-size: 12px;
    }
}


/*** Facts ***/
.fact-item .fact-icon {
    width: 120px;
    height: 120px;
    margin-top: -60px;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 120px;
    transition: .5s;
}

.fact-item:hover .fact-icon {
    background: var(--dark);
}

.fact-item .fact-icon i {
    color: var(--primary);
    transition: .5;
}

.fact-item:hover .fact-icon i {
    color: #FFFFFF;
}

/* Mobile facts improvements */
@media (max-width: 768px) {
    .fact-item {
        padding: 1rem 0.5rem !important;
    }
    
    .fact-item .fact-icon {
        width: 100px;
        height: 100px;
        margin-top: -50px;
    }
    
    .fact-item .fact-icon img {
        width: 50px;
        height: 50px;
    }
}


/*** About & Feature ***/
.about-img,
.feature-img {
    position: relative;
    height: 100%;
    min-height: 300px; /* Reduced from 400px */
}

.about-img img,
.feature-img img {
    position: absolute;
    width: 60%;
    height: 80%;
    object-fit: cover;
}

.about-img img:last-child,
.feature-img img:last-child {
    margin: 20% 0 0 40%;
}

.about-img::before,
.feature-img::before {
    position: absolute;
    content: "";
    width: 60%;
    height: 80%;
    top: 10%;
    left: 20%;
    border: 5px solid var(--primary);
    z-index: -1;
}

/* Mobile about/feature improvements */
@media (max-width: 768px) {
    .about-img,
    .feature-img {
        min-height: 250px;
        margin-bottom: 30px;
    }
    
    .about-img img,
    .feature-img img {
        width: 50%;
        height: 70%;
    }
    
    .d-flex.align-items-center.mb-5 {
        flex-direction: column;
        text-align: center;
    }
    
    .d-flex.align-items-center.mb-5 .ps-4 {
        padding-left: 0 !important;
        margin-top: 15px;
    }
}


/*** Service ***/
.service-item .bg-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.service-item .service-text {
    background: var(--light);
    transition: .5s;
}

.service-item:hover .service-text {
    background: rgba(0, 0, 0, .7);
}

.service-item * {
    transition: .5;
}

.service-item:hover * {
    color: #FFFFFF;
}

.service-item .btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    color: var(--dark);
    background: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    transition: .5s;
}

.service-item:hover .btn {
    width: 140px;
}

/* Mobile service improvements */
@media (max-width: 768px) {
    .service-item .service-text {
        padding: 2rem 1rem !important;
    }
    
    .service-item .service-text img {
        width: 60px;
        height: 60px;
    }
    
    .service-item .service-text h3 {
        font-size: 1.3rem;
    }
    
    .service-item .service-text p {
        font-size: 14px;
    }
}


/*** Project ***/
.project .nav .nav-link {
    background: var(--light);
    transition: .5s;
}

.project .nav .nav-link.active {
    background: var(--primary);
}

.project .nav .nav-link.active h3 {
    color: #FFFFFF !important;
}

/* Mobile project improvements */
@media (max-width: 768px) {
    .project .nav-pills {
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }
    
    .project .nav-pills .nav-link {
        display: inline-block !important;
        width: auto !important;
        margin-right: 10px;
        padding: 0.75rem 1rem !important;
    }
    
    .project .nav-pills .nav-link h3 {
        font-size: 1rem !important;
        margin: 0 !important;
    }
    
    .project .tab-content .row {
        flex-direction: column;
    }
    
    .project .tab-content .col-md-6 {
        width: 100%;
    }
    
    .project .tab-content [style*="min-height: 350px"] {
        min-height: 250px !important;
        margin-bottom: 20px;
    }
}


/*** Team ***/
.team-items {
    margin: -.75rem;
}

.team-item {
    padding: .75rem;
}

.team-item::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    background: #FFFFFF;
    transition: .5s;
    z-index: -1;
}

.team-item:hover::after {
    height: 100%;
    background: var(--primary);
}

.team-item .team-social {
    position: absolute;
    width: 100%;
    bottom: -20px;
    left: 0;
}

.team-item .team-social .btn {
    display: inline-flex;
    margin: 0 2px;
    color: var(--primary);
    background: var(--light);
}

.team-item .team-social .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}

/* Mobile team improvements */
@media (max-width: 768px) {
    .team-item {
        margin-bottom: 30px;
    }
    
    .team-item img {
        width: 100%;
    }
    
    .team-item .bg-light {
        padding: 1rem !important;
    }
    
    .team-item h3 {
        font-size: 1.2rem;
    }
}


/*** Appointment ***/
.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}

/* Mobile appointment improvements */
@media (max-width: 768px) {
    .appointment-form .row.g-3 {
        --bs-gutter-y: 1rem;
    }
    
    .appointment-form input,
    .appointment-form select,
    .appointment-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn.w-100.py-3 {
        padding: 0.75rem !important;
    }
}


/*** Testimonial ***/
.testimonial-carousel {
    display: flex !important;
    flex-direction: column-reverse;
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-carousel .owl-dots {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.testimonial-carousel .owl-dots .owl-dot {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 5px;
    transition: .5s;
}

.testimonial-carousel .owl-dots .owl-dot.active {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .owl-dots .owl-dot::after {
    position: absolute;
    width: 40px;
    height: 40px;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    content: "\f10d";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px;
    transition: .5s;
    opacity: 0;
}

.testimonial-carousel .owl-dots .owl-dot.active::after {
    opacity: 1;
}

.testimonial-carousel .owl-dots .owl-dot img {
    opacity: .4;
    transition: .5s;
}

.testimonial-carousel .owl-dots .owl-dot.active img {
    opacity: 1;
}

/* Mobile testimonial improvements */
@media (max-width: 768px) {
    .testimonial-carousel .owl-dots .owl-dot {
        width: 40px;
        height: 40px;
    }
    
    .testimonial-carousel .owl-dots .owl-dot.active {
        width: 60px;
        height: 60px;
    }
    
    .testimonial-carousel .owl-dots .owl-dot::after {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .testimonial-item p {
        font-size: 14px !important;
        padding: 0 15px;
    }
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #777777;
    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: var(--primary);
    margin-right: 10px;
}

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

.footer .form-control {
    border-color: #777777;
}

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

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

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

/* Mobile footer improvements */
@media (max-width: 768px) {
    .footer .container .row {
        --bs-gutter-y: 2rem;
    }
    
    .footer h3 {
        font-size: 1.3rem;
    }
    
    .footer .btn.btn-link {
        font-size: 14px;
    }
    
    .footer .copyright .row {
        flex-direction: column;
        text-align: center;
    }
    
    .footer .copyright .col-md-6 {
        width: 100%;
        text-align: center !important;
    }
}

/* Additional mobile utility classes */
@media (max-width: 768px) {
    .container-xxl,
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Improve touch targets */
    a, button, .btn, [role="button"] {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Fix overflow issues */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Improve spacing */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    /* Fix text alignment */
    .text-center-mobile {
        text-align: center;
    }
    
    /* Fix flexbox issues */
    .d-flex.align-items-start {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    
    .d-flex.align-items-start .ms-4 {
        margin-left: 0 !important;
        margin-top: 15px;
    }
    
    /* Improve form elements */
    input, select, textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
}

/* Small phone improvements */
@media (max-width: 480px) {
    h1, .h1 {
        font-size: 1.8rem !important;
    }
    
    h2, .h2 {
        font-size: 1.5rem !important;
    }
    
    .display-1 {
        font-size: 2.5rem !important;
    }
    
    .display-5 {
        font-size: 1.3rem !important;
    }
    
    .btn {
        font-size: 13px;
    }
}

/* Fix for orientation changes */
@media (orientation: landscape) and (max-width: 900px) {
    .header-carousel .owl-carousel-item {
        min-height: 300px;
    }
    
    .navbar-collapse {
        max-height: 70vh;
    }
}

/* Print styles */
@media print {
    .back-to-top,
    .whatsapp-float,
    .footer {
        display: none !important;
    }
}