/* ============================================
   Professional Home-Style.css
   Modern, clean design for Gouna Homes
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #1e3c5c;        /* Deep navy */
  --primary-light: #2c4e6e;
  --primary-dark: #0f2a3f;
  --accent: #d4af37;          /* Gold accent */
  --accent-light: #e5c767;
  --text-dark: #2c3e50;
  --text-muted: #6c757d;
  --text-light: #f8f9fa;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 32px rgba(0,0,0,0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.25s ease;
}

/* ---------- Base Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1100;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.logo:hover {
  color: var(--primary-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover {
  background: rgba(30, 60, 92, 0.05);
  color: var(--primary);
}

.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
  background: rgba(30, 60, 92, 0.05);
}

.nav-btn {
  padding: 0.6rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: 40px;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

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

/* ---------- Burger Menu ---------- */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  z-index: 1200;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

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

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  height: 85vh;
  min-height: 600px;
  overflow: hidden;
  margin-bottom: 4rem;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  transition: transform 6s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 0 2rem;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  letter-spacing: -0.5px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin-bottom: 2.5rem;
  max-width: 700px;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero button {
  padding: 1rem 3rem;
  background: var(--accent);
  border: none;
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
}

.hero button:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* ---------- Intro Section ---------- */
.intro {
  max-width: 800px;
  margin: 5rem auto;
  padding: 0 2rem;
  text-align: center;
}

.intro p {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ---------- Container ---------- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Category Blocks ---------- */
.category-block {
  margin: 5rem 0;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
}

.category-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.see-all {
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: 40px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.see-all:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* ---------- Homes Track (Horizontal Scroll) ---------- */
.homes-track {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 1rem 0.5rem 2rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) #e0e0e0;
}

.homes-track::-webkit-scrollbar {
  height: 8px;
}

.homes-track::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 10px;
}

.homes-track::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 10px;
}

.homes-track::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ---------- Home Cards ---------- */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: var(--transition);
}

.home-card {
  min-width: 300px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
}

.home-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.home-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 30px;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.heart {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.8rem;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: var(--transition);
  z-index: 3;
  text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.heart:hover {
  transform: scale(1.2);
  color: #ff6b6b;
}

.heart.active {
  color: #ff4757;
  animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.home-info {
  padding: 1.5rem;
}

.home-info h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-info .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.75rem;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ---------- Page Header (for category/favorites) ---------- */
.page-header {
  max-width: 1400px;
  margin: 5rem auto 2rem;
  padding: 0 2rem;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.page-header p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* ---------- Homes Grid (for category & favorites) ---------- */
.homes-page {
  max-width: 1400px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
}

.homes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}

/* ---------- Pagination ---------- */
.pagination-controls {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0 1rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid #d4af37;
  background: #fff;
  color: #1e3c5c;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.12s;
}

.page-btn:hover:not(:disabled) {
  background: #d4af37;
  color: #fff;
  transform: translateY(-2px);
}

.page-btn.active {
  background: #1e3c5c;
  color: #d4af37;
  border-color: #1e3c5c;
  cursor: default;
}

.page-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 4px;
  color: #999;
  font-size: 1rem;
  line-height: 40px;
}

/* ---------- Similar Properties ---------- */
.similar-properties {
  margin: 4rem 0;
}

.similar-properties h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.similar-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.similar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.similar-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.similar-card-content {
  padding: 1.5rem;
}

.similar-card h4 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.similar-card .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Bottom Bar ---------- */
.bottom-bar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 60px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.3);
  z-index: 2000;
}

.bottom-bar a {
  text-decoration: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  transition: var(--transition);
}

.bottom-bar a:hover {
  background: rgba(30,60,92,0.05);
  color: var(--primary);
}

.bottom-bar a.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 5px 15px rgba(30,60,92,0.3);
}

.bottom-bar a.active span {
  filter: brightness(0) invert(1);
}

.bottom-bar span {
  margin-bottom: 0.2rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.bottom-bar small {
  font-size: 0.7rem;
  letter-spacing: 0.3px;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 1024px) {
  .nav-inner {
    padding: 1rem;
  }
  .container, .homes-page, .page-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .category-header h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 1rem;
    right: 1rem;
    background: var(--bg-white);
    flex-direction: column;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.05);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 1rem;
  }
  .hero {
    height: 70vh;
    min-height: 500px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero button {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
  .intro {
    margin: 3rem auto;
  }
  .category-block {
    margin: 3rem 0;
  }
  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .see-all {
    align-self: flex-start;
  }
  .homes-grid {
    gap: 1.5rem;
  }
  .bottom-bar {
    bottom: 1rem;
    padding: 0.5rem 1rem;
    width: calc(100% - 2rem);
    justify-content: space-around;
  }
  .bottom-bar a {
    padding: 0.5rem 0.8rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 0.9rem;
  }
  .category-header h2 {
    font-size: 1.5rem;
  }
  .home-card {
    min-width: 260px;
  }
  .home-info h3 {
    font-size: 1.1rem;
  }
  .price {
    font-size: 1.5rem;
  }
  .bottom-bar a span {
    font-size: 1rem;
  }
  .bottom-bar a small {
    font-size: 0.6rem;
  }
}

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }

/* ---------- Print Styles ---------- */
@media print {
  .nav, .bottom-bar, .hero button, .heart, .see-all {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .home-card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px; /* المسافة بين كلمة Gouna Homes والزرار */
}

.lang-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
}

.lang-label {
    font-size: 12px;
    font-weight: 600;
    color: #000000;
    letter-spacing: 1px;
}

/* شكل السويتش نفسه */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid rgba(212, 175, 55, 0.5); /* برواز دهبي خفيف */
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 2px;
    background-color: #d4af37; /* الكرة الدهبية */
    transition: .4s;
}

input:checked + .slider {
    background-color: rgba(212, 175, 55, 0.2);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* لجعل السويتش دائري */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ========== Loader العالمي ========== */
.loader-global {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.loader-global.show-loader {
  display: flex;
}

.loader-global::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #d4af37;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* تنسيق الشعار الجديد */
.site-logo {
    height: 70px;      /* هذا الارتفاع مناسب جداً للهيدر الحالي */
    width: auto;       /* للحفاظ على أبعاد الشعار دون تمطيط */
    display: block;
    transition: transform 0.3s ease; /* إضافة حركة خفيفة عند التفاعل */
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* حركة تفاعلية عند مرور الماوس على الشعار */
.site-logo:hover {
    transform: scale(1.05); /* تكبير بسيط جداً يعطي لمسة احترافية */
}

/* تنسيق للهواتف (Bottom Bar) ليبقى الشعار متناسقاً */
@media (max-width: 768px) {
    .site-logo {
        height: 40px; /* تصغير الشعار قليلاً في الشاشات الصغيرة */
    }
}

.footer-contact {
    background-color: #1e3c5c; /* اللون الأزرق الداكن الخاص بموقعك */
    color: white;
    padding: 40px 20px 100px 20px; /* زيادة Padding من الأسفل لترك مساحة للـ Bottom Bar */
    margin-top: 50px;
    font-family: sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-info h3, .footer-social h4 {
    color: #d4af37; /* اللون الذهبي */
    margin-bottom: 20px;
}

.contact-details .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.contact-item i {
    color: #d4af37;
    width: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #d4af37;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #ccc;
}

/* ضبط التصميم للهواتف */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .contact-item {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
}

.offer-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff4757;
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10;
}

.home-card:hover .offer-tag {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}