@tailwind base;
@tailwind components;
@tailwind utilities;

/* Theme Color Variables */


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

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .py-24 {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .mb-24 {
    margin-bottom: 6rem;
  }

/* Modified Reset */
.bare-input {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
    border-width: 2px !important;

}

/* Add transition to inputs */
input, textarea {
    transition: all 0.2s ease-in-out;
}

/* Turkish language override */
html[lang="tr"] {
    font-family: "Red Hat Display", system-ui !important;
  }

  /* Specific heading override for Turkish */
  html[lang="tr"] .font-black-hans {
    font-family: "Red Hat Display", system-ui !important;
  }

  /* Arabic language override */
  /* Removed: html[lang="ar"] {
    font-family: "Tajawal", system-ui !important;
  }

  html[lang="ar"] .font-black-hans,
  html[lang="ar"] .font-poppins {
    font-family: "Tajawal", system-ui !important;
    font-weight: 700 !important;
  } */

  .media-tab-content {
    display: none;
}

.media-tab-content.active {
    display: block;
}

/* Fix icon positioning for property fields */
.input-container {
    position: relative;
}

.input-container .absolute {
    position: absolute !important;
    top: 0 !important;
    height: 100% !important;
    z-index: 10;
}

.input-container .absolute i {
    position: static !important;
    transform: none !important;
}

.input-container .absolute.inset-y-0 {
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
}

/* Ensure error messages don't affect input layout */
.form-group {
    position: relative;
}

.error-message {
    position: relative;
    z-index: 1;
}
/*  End Fix icon positioning for property fields */



.hoverGoTo:hover i {
    color: white;
}

.hoverGoTo:hover .title {
    color: var(--primary-color);
}

.hoverGoTo:hover svg path,
.hoverGoTo:hover svg rect {
    stroke: var(--primary-color);
}

.hoverGoTo svg path,
.hoverGoTo svg rect {
    stroke: white;
}

select {
    @apply appearance-none ;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='gray' class='w-5 h-5'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.96l3.71-3.73a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 1.5rem;
    padding-right: 2.5rem;
    -webkit-appearance: none; /* For Safari */
    -moz-appearance: none; /* For Firefox */
    appearance: none; /* Standard */
}

[dir="rtl"] select {
    background-position: left 12px center !important;
    padding-left: 2.5rem !important;
}



.fill-primary svg path {
    fill: var(--primary-color) !important;

    color: white; /* Adjust text color to contrast with the primary color */
}

.fill-dark svg path {
    fill: #333333 !important;
    fill: #333333 !important;
    color: white; /* Adjust text color to contrast with the primary color */
}

/* Focus States */
.focus\:ring-primary:focus {
    box-shadow: 0 0 0 4px rgba(251, 65, 65, 0.25) !important;
    border-color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color);
}

button.bg-primary:hover,
a.bg-primary:hover,
.swiper-button-next.bg-primary:hover,
.swiper-button-prev.bg-primary:hover {
    background-color: color-mix(in srgb, var(--primary-color) 85%, black);
}

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



/* Dark mode overrides */
.dark .text-primary {
    color: var(--primary-color) !important;
}

.identityImg svg rect, .identityImg svg path {
    fill: var(--primary-color);
    stroke: var(--primary-color);
}

.identityIcon svg rect, .identityIcon svg path {
    fill: var(--primary-color);
}

.identityLogo svg path {
    fill: var(--primary-color);
}

/* For modern browsers */
::selection {
    /* background-color: color-mix(in srgb, var(--primary-color) 50%, #00000000); */
    background-color: var(--primary-color);
    color: white;
}

/* For Webkit-based browsers (Safari, Chrome, Edge) */
::-webkit-selection {
    background-color: var(--primary-color);
    color: white;
}

/* For Mozilla Firefox */
::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}



/* Chrome, Safari, Edge, and Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

textarea {
    resize: none;
  }

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}




/* Base styles */
/* body {
    @apply bg-white dark:bg-gray-900;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
} */


/* Ensure smooth transition when switching themes */
.transition-colors {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Heart Animation Styles */
.heart-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.heart-btn:hover {
    transform: scale(1.1);
}

.heart-btn .heart-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: white;
    border-radius: 50%;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.heart-btn .heart-icon svg {
    width: 100%;
    height: 100%;
    stroke: #FB4141;
    fill: transparent;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.heart-btn.active .heart-icon {
    background: #FB4141;
}

.heart-btn.active .heart-icon svg {
    fill: white;
    stroke: white;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.heart-btn.active .heart-icon {
    animation: heartPop 0.3s ease forwards;
}

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
.header {
    @apply h-20 border-0 border-b border-solid border-gray-200 dark:border-gray-800;
    border-width: 1px;
    height: 88px;
    background-color: var(--primary-bg);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__menu {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav__menu a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
}

.nav__logo img {
    height: 40px;
}

.nav__buttons {
    display: flex;
    gap: 24px;
    align-items: center;
}

.btn {
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 24px;
    border-radius: 4px;
}

.btn-text {
    color: #000;
}

/* Hero section styles */
.hero {
    height: 550px;
    background-image: url('assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    margin-top: 88px;
    position: relative;
}

.hero .container {
    text-align: center;
}

.hero__title {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 64px;
    color: white;
    margin-bottom: 32px;
}

.hero__search {
    margin-bottom: 24px;
}

.search-box {
    background: white;
    border-radius: 8px;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-box__input,
.search-box__location {
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

.search-box__input {
    flex: 1;
    border-right: 1px solid #eee;
}

.search-box__icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

.search-box__button {
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    margin-left: 8px;
}

.search-box__button img {
    width: 24px;
    height: 24px;
}

.hero__subtitle {
    color: white;
    font-size: 18px;
}

.hero__subtitle span {
    color: var(--primary-color);
}

/* Burger Menu Animation */
.burger-line {
    transition: all 0.3s ease-in-out;
}

.burger-active .burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-active .burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Animation */
.mobile-menu {
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.hidden {
    transform: translateX(-100%);
}

/* WhatsApp button */
.whatsapp-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
}

.whatsapp-button img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.iconRowWhite:hover svg path {
    fill: #fff;
}

.iconRowDuoWhite:hover svg path.primary {
    fill: #fff;
    stroke: #fff;
}

.iconRowDuoWhite:hover .hoverTextWhite {
    color: white;
}

.fas, .far, .fab {
    display: inline-flex; /* Use inline-flex for better alignment */
    align-items: center; /* Vertically center */
    justify-content: center; /* Horizontally center */
    width: 1.25rem; /* Adjust width */
    height: 1.25rem; /* Adjust height */
    font-size: 1rem; /* Ensure consistent font size */
    line-height: 1; /* Remove extra line height */
}

/* Custom Swiper styles */
.swiper-container {
    width: 100%;
    height: 100%;
}



.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Swiper navigation styles */
.swiper-button-next::after,
.swiper-button-prev::after {
    display: none;
}

/* .swiper-button-prev,
.swiper-button-next {
    opacity: 0;
    transition: opacity 0.3s ease;
} */

.swiper-container:hover .swiper-button-prev,
.swiper-container:hover .swiper-button-next {
    opacity: 1;
}

/* Add smooth transition for hover effects */
.swiper-button-prev:hover,
.swiper-button-next:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Prevent text selection on interactive elements */
button,
.tab-btn,
.swiper-button-prev,
.swiper-button-next,
nav a,
.mobile-menu a {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.swiper-button-prev,
.swiper-button-next {
    width: 32px !important;
    height: 32px !important;
}

#thumbnailSliderContainer .swiper-wrapper {
    justify-content: center;
}

/* RTL Swiper Navigation */
[dir="rtl"] .swiper-button-next {
    right: auto !important;
    left: 15px !important;
}

[dir="rtl"] .swiper-button-prev {
    left: auto !important;
    right: 15px !important;
}

/* Card section styles */
.card-component {
    padding: 48px;
    border-radius: 48px;
    gap: 24px;
}

.card-component img {
    height: 96px;
    margin-bottom: 24px;
}

.card-component h3 {
    margin-bottom: 16px;
}

.card-component p {
    color: #6B7280;
}

body {
    font-family: 'Poppins', sans-serif;
}

.title-font { font-family: 'Black Han Sans', sans-serif; }
.body-font { font-family: 'Poppins', sans-serif; }

/* Ensure consistent icon sizes */
.fas, .far, .fab {
    @apply flex items-center justify-center;
    width: 1.25rem;
    height: 1.25rem;
}

.iconHoverWhite:hover svg path {
    stroke: #fff;
    color: #fff;
}



/* Search Results */

.price-range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
}

.property-card {
    transition: transform 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
}

#map {
    height: 400px;
    width: 100%;
    border-radius: 0.5rem;
}

.view-toggle-btn.active {
    background-color: #FB4141;
    color: white;
}
/* End Search Results */




/* CSS */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F5F5F5; /* Match your website's background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999999;
}

.dark #preloader {
    background: #2D2D2D; /* Match your website's background */
}

.preloader-logo {
    width: 100px; /* Adjust size as needed */
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Preloader */
#preloader {
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes loading {
    0% {
        transform: scale(0.3);
        opacity: 0.3;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.3);
        opacity: 0.3;
    }
}

.animate-loading {
    animation: loading 1.5s ease-in-out infinite;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    content: none; /* Prevent Swiper's default SVG from appearing */
}

.swiper-pagination-bullet {
    width: 8px; /* Default width */
    height: 8px; /* Default height */
    background: rgba(255, 255, 255, 0.6); /* Inactive bullet color */
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
    margin: 0 6px !important; /* Spacing between bullets */
}

.swiper-pagination-bullet-active {
    width: 24px !important; /* Wider active bullet */
    height: 8px; /* Keep height consistent */
    background: var(--primary-color) !important; /* Use primary color */
    border-radius: 8px; /* Slightly rounded rectangle */
    transform: scale(1.2); /* Slight scale-up effect */
    opacity: 1; /* Full opacity */
}

.swiper-pagination-bullet:hover {
    background: var(--primary-color); /* Change to primary color on hover */
    transform: scale(1.1); /* Slight scale-up on hover */
    opacity: 1; /* Full opacity */
}

.swiper-container .swiper-pagination-bullet {
    background: #000; /* Inactive bullet color */
}

.dark.swiper-container .swiper-pagination-bullet {
    background: #fff; /* Inactive bullet color */
}


@keyframes scroll-down {
    0% {
      transform: translateY(16%);
    }
    100% {
      transform: translateY(50%);
    }
  }

  .animate-scroll-down {
    animation: scroll-down 4s linear infinite;
  }
