/********** Template CSS **********/
:root {
    --primary: #000000;
    --secondary: #F0F0F0;
    --light: #FFFFFF;
    --dark: #4A4E69;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    padding-top: 0; /* Remove the top padding */
    margin-top: 0; /* Ensure no top margin */
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.bg-dark {
    background-color: var(--dark) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.btn-primary {
  background-color: #000;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background-color: #333;
}

.btn-primary:active {
  background-color: #333;
}

.btn-primary:focus {
  background-color: #000;
}

.btn-primary span.full-text {
  display: inline;
}

.btn-primary span.short-text {
  display: none;
}

@media (max-width: 767px) {
  .btn-primary span.full-text {
    display: none;
  }
  .btn-primary span.short-text {
    display: inline;
  }
}

.navbar {
    background-color: var(--light);
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

@media (max-width: 1320px) {
    .navbar {
        max-width: 100%;
    }
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark);
}


.service-item {
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    color: #ffffff;
    border-radius: 50%;
}

.service-item h4 {
    font-weight: bold;
}

.price {
    font-weight: bold;
    color: #007bff;
}

.price-container, .hours-container {
    background-color: var(--light);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.team-item {
    background-color: var(--light);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.team-img {
    position: relative;
    overflow: hidden;
}

.team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.team-item:hover .team-social {
    opacity: 1;
}

.team-social .btn-square {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

/* Remove any existing ::before and ::after pseudo-elements */
.team-item .team-img::before,
.team-item .team-img::after {
    display: none;
}

.footer {
    background-color: var(--secondary);
}

.back-to-top {
    position: fixed;
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    right: 20px; /* Adjust position */
    bottom: 20px; /* Adjust position */
    z-index: 9999; /* Ensure it's above other elements */
    width: 56px;  /* Slightly larger for better touch target */
    height: 56px; /* Slightly larger for better touch target */
    border-radius: 50%;
    padding: 0;
    background-color: #000000; /* Adjust color as needed */
    color: #ffffff; /* Adjust color as needed */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Add some shadow for visibility */
}

.back-to-top i {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: 24px; /* Adjust size as needed */
}

/* Hide on desktop */
@media (min-width: 768px) {
    .back-to-top {
        display: none !important;
    }
}

/*** 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-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;
}


/*** Navbar ***/
.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: 40px 0;
    color: var(--light);
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 600;
    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;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link,
    .navbar.shadow-sm .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 8px;
        border-top: 1px solid var(--light);
    }
}

@media (min-width: 992px) {
    .navbar.shadow-sm .navbar-nav .nav-link {
        padding: 20px 0;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        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;
    z-index: 1;
}

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

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

/* Add these new styles */
.carousel-item img {
    filter: brightness(1.2);
}

.carousel-caption h1,
.carousel-caption h4,
.carousel-caption p,
.carousel-caption span {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

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

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


/*** Service ***/
.service-item .btn {
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 50px;
    height: 50px;
    color: var(--primary);
    background: var(--dark);
    opacity: 0;
}

.service-item:hover .btn {
    right: 0;
    bottom: 0;
    opacity: 1;
}


/*** Team ***/
.team-item .team-img::before,
.team-item .team-img::after {
    display: none;
}

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

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

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


/*** Testimonial ***/
.testimonial-section {
    background-color: #ffffff;
}

.subheading {
    display: inline-block;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    color: #fff;
    background-color: #000;
    margin-bottom: 10px;
}

.heading {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
}

.testimonial-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 20px;
}

.testimonial-text {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 20px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-author h5 {
    font-size: 18px;
    margin-bottom: 5px;
}

.testimonial-author span {
    font-size: 14px;
    color: #6c757d;
}

.testimonial-rating {
    color: #ffc107;
    font-size: 18px;
    margin-top: 10px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: #000;
    border-radius: 50%;
    opacity: 0.8;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

.carousel-control-prev {
    left: -20px;
}

.carousel-control-next {
    right: -20px;
}

/* Ensure the carousel doesn't overflow on small screens */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
}

/* Add this new rule for the About Us section */
.about-image-container {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.about-text-container {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.4);
}

.popup-content {
    background-color: #fefefe;
    width: 90% !important;
    max-width: 1000px !important;
    margin: 80px auto 20px;
    padding: 20px;
    background-color: #fefefe;
    border: 1px solid #888;
    border-radius: 10px;
    position: relative;
    max-height: calc(100vh - 100px);
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above other content */
    background-color: transparent;
    border: none;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* New styles for the X icon */
.close-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close-icon:hover {
    opacity: 1;
}

.close-icon:before,
.close-icon:after {
    position: absolute;
    left: 15px;
    content: ' ';
    height: 30px;
    width: 2px;
    background-color: #333;
}

.close-icon:before {
    transform: rotate(45deg);
}

.close-icon:after {
    transform: rotate(-45deg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Adjust size as needed */
    gap: 15px;
    padding: 15px;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.05);
}

/* Full-screen image viewer */
.fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
}

.nav-arrow.left {
    left: 20px;
}

.nav-arrow.right {
    right: 20px;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

/* Disable scrolling on body when popup is open */
body.popup-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        margin: 60px auto 10px; /* Adjust for mobile */
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 767px) {
    .barber-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 20px 0;
        margin: 0 -10px; /* Negative margin to counteract padding on cards */
    }
    .barber-grid > div {
        flex: 0 0 auto;
        width: calc(50% - 20px);
        max-width: 200px;
        margin: 10px;
        padding: 0 10px; /* Added padding */
        box-sizing: border-box;
    }
    .team-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 575px) {
    .barber-grid > div {
        width: calc(100% - 20px);
        max-width: 300px;
    }
}

.tab {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 100;
    padding: 10px 0;
}

.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 17px;
}

.tab button:hover {
    background-color: #ddd;
}

.tab button.active {
    background-color: #ccc;
}

.tabcontent {
    padding: 6px 12px;
    margin-top: 0px; /* Adjust this value based on the height of your tab */
    overflow-y: auto;
    flex-grow: 1;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding-top: 10px; /* Add some padding to prevent images from being cut off */
}

.store-status {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  margin: 0 10px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  background-color: #888;
}

.status-text {
  font-weight: bold;
  font-size: 14px;
  color: #333;
  text-transform: uppercase;
}

.status-open .status-indicator { background-color: #2ecc71; }
.status-closed .status-indicator { background-color: #e74c3c; }
.status-soon .status-indicator { background-color: #f39c12; }

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0; /* Remove any border radius */
}

/* Target the main container of each testimonial slide */
.testimonial-item,
.carousel-item > div,
[class*="testimonial-container"] {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    background-image: none !important;
    border: none !important;
}

/* Remove any potential pseudo-element shadows */
.testimonial-item::before,
.testimonial-item::after,
.carousel-item > div::before,
.carousel-item > div::after,
[class*="testimonial-container"]::before,
[class*="testimonial-container"]::after {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    content: none !important;
}

#header-carousel {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, 
        black 0%,
        black 40%,
        rgba(0, 0, 0, 0.98) 45%,
        rgba(0, 0, 0, 0.95) 50%,
        rgba(0, 0, 0, 0.9) 55%,
        rgba(0, 0, 0, 0.85) 60%,
        rgba(0, 0, 0, 0.8) 65%,
        rgba(0, 0, 0, 0.75) 70%,
        rgba(0, 0, 0, 0.7) 74%,
        rgba(0, 0, 0, 0.65) 78%,
        rgba(0, 0, 0, 0.6) 82%,
        rgba(0, 0, 0, 0.55) 85%,
        rgba(0, 0, 0, 0.5) 88%,
        rgba(0, 0, 0, 0.45) 90%,
        rgba(0, 0, 0, 0.4) 92%,
        rgba(0, 0, 0, 0.35) 94%,
        rgba(0, 0, 0, 0.3) 95.5%,
        rgba(0, 0, 0, 0.25) 97%,
        rgba(0, 0, 0, 0.2) 98%,
        rgba(0, 0, 0, 0.1) 99%,
        transparent 100%
    );
    mask-image: linear-gradient(to bottom, 
        black 0%,
        black 40%,
        rgba(0, 0, 0, 0.98) 45%,
        rgba(0, 0, 0, 0.95) 50%,
        rgba(0, 0, 0, 0.9) 55%,
        rgba(0, 0, 0, 0.85) 60%,
        rgba(0, 0, 0, 0.8) 65%,
        rgba(0, 0, 0, 0.75) 70%,
        rgba(0, 0, 0, 0.7) 74%,
        rgba(0, 0, 0, 0.65) 78%,
        rgba(0, 0, 0, 0.6) 82%,
        rgba(0, 0, 0, 0.55) 85%,
        rgba(0, 0, 0, 0.5) 88%,
        rgba(0, 0, 0, 0.45) 90%,
        rgba(0, 0, 0, 0.4) 92%,
        rgba(0, 0, 0, 0.35) 94%,
        rgba(0, 0, 0, 0.3) 95.5%,
        rgba(0, 0, 0, 0.25) 97%,
        rgba(0, 0, 0, 0.2) 98%,
        rgba(0, 0, 0, 0.1) 99%,
        transparent 100%
    );
}

.carousel-inner,
.carousel-item,
.carousel-item img {
    border-radius: 0; /* Remove any border radius */
}

/* Remove the gradient from the carousel wrapper */
.carousel-wrapper::after {
    content: none;
}

.price-plan-container {
    display: flex;
    flex-direction: column-reverse;
}

.price-list-column,
.price-image-column {
    width: 100%;
}

.price-image-column img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.price-image-column {
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .price-plan-container {
        flex-direction: row;
    }

    .price-list-column,
    .price-image-column {
        width: 50%;
    }

    .price-image-column {
        margin-bottom: 0;
    }
}

/* Ensure the content after the carousel has no top margin */
.container-xxl:first-of-type {
    margin-top: 0;
    padding-top: 3rem; /* Adjust this value as needed */
    background-color: var(--light); /* Ensure this matches the end color of the gradient */
}

/* Ensure the body background matches */
body {
    background-color: var(--light);
}

.header-content {
    max-width: 1140px; /* Adjust if your main content has a different max-width */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.barber-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px 0;
    margin: 0 -10px; /* Negative margin to counteract padding on cards */
}

.barber-grid > div {
    flex: 0 0 auto;
    width: calc(20% - 20px);
    max-width: 220px; /* Reduced from 250px */
    margin: 10px;
    padding: 0 10px; /* Added padding */
    box-sizing: border-box;
}

.team-item {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.team-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
}

.team-img {
    position: relative;
    overflow: hidden;
}

.team-img img {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-item:hover .team-overlay {
    opacity: 1;
}

.team-overlay-text {
    color: white;
    font-size: 18px;
    text-align: center;
}

.team-item .bg-secondary {
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}



@media (max-width: 992px) {
    .barber-grid > div {
        width: calc(33.333% - 20px);
    }
}

@media (max-width: 768px) {
    .barber-grid > div {
        width: calc(33.333% - 20px);
        max-width: 240px;
    }
}

@media (max-width: 576px) {
    .barber-grid > div {
        width: calc(50% - 20px);
        max-width: 200px;
    }
}

@media (max-width: 400px) {
    .barber-grid > div {
        width: calc(50% - 10px);
        margin: 5px;
    }
}

.subheading {
    display: inline-block;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    color: #fff;
    background-color: #000;
    margin-bottom: 10px;
}

.heading {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
}
