/* --- Variables --- */
:root {
  --primary-color: #c9a227;
  /* Logo Gold - precise match */
  --primary-dark: #a8891e;
  --secondary-color: #1a1a1a;
  /* Logo Black/Charcoal */
  --text-dark: #333333;
  --text-light: #f4f4f4;
  --bg-light: #fafafa;
  --white: #ffffff;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;

  --transition: all 0.3s ease-in-out;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);

  --border-radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Reusable Components --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 80px 0;
  position: relative;
}

.premium-section {
  background-color: #fcfaf2;
  /* Creamy white */
  background-image:
    linear-gradient(30deg, #d4af37 12%, transparent 12.5%, transparent 87%, #d4af37 87.5%, #d4af37),
    linear-gradient(150deg, #d4af37 12%, transparent 12.5%, transparent 87%, #d4af37 87.5%, #d4af37),
    linear-gradient(30deg, #d4af37 12%, transparent 12.5%, transparent 87%, #d4af37 87.5%, #d4af37),
    linear-gradient(150deg, #d4af37 12%, transparent 12.5%, transparent 87%, #d4af37 87.5%, #d4af37),
    linear-gradient(60deg, #d4af3777 25%, transparent 25.5%, transparent 75%, #d4af3777 75%, #d4af3777),
    linear-gradient(60deg, #d4af3777 25%, transparent 25.5%, transparent 75%, #d4af3777 75%, #d4af3777);
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
  opacity: 0.05;
  /* Subtle but noticeable pattern */
  background-attachment: fixed;
}

/* Wrapper for the section to show background properly */
.section.with-bg {
  background-color: #fcfaf2;
  position: relative;
  overflow: hidden;
}

.section.with-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://www.transparenttextures.com/patterns/pinstripe-light.png');
  opacity: 0.5;
  pointer-events: none;
}

.premium-section-alt {
  background: linear-gradient(135px, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
}

/* --- Accordion Styles --- */
.accordion-item {
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--white);
  transition: var(--transition);
}

.accordion-header {
  padding: 20px 30px;
  background-color: var(--secondary-color);
  color: var(--white);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  transition: var(--transition);
}

.accordion-header:hover {
  background-color: #333333;
}

.accordion-header i.fa-chevron-down {
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header {
  background-color: var(--primary-color);
  color: var(--white);
}

.accordion-item.active .accordion-header i.fa-chevron-down {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding 0.5s ease;
  background-color: rgba(212, 175, 55, 0.02);
}

.accordion-item.active .accordion-content {
  max-height: 2000px;
  /* Large enough to fit content */
  padding: 30px;
}

.premium-section-dark {
  background: linear-gradient(rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.98)), url('https://www.transparenttextures.com/patterns/cubes.png');
  color: var(--white);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
  background-color: #333333;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-dark);
}

/* --- Header / Navbar --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  padding: 10px 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  transition: var(--transition);
}

header.scrolled .nav-container {
  padding: 5px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary-color);
}

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

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--secondary-color);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: linear-gradient(rgba(10, 25, 47, 0.7), rgba(10, 25, 47, 0.85)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: var(--white);
  padding-top: 80px;
  /* For fixed header */
  background-attachment: fixed;
  /* Parallax effect */
}

.hero-content {
  max-width: 800px;
  padding: 20px;
  z-index: 2;
}

.hero-logo {
  width: 180px;
  height: auto;
  background-color: var(--white);
  border-radius: 15px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
  position: relative;
  overflow: hidden;
  background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=400&q=80');
  /* Professional building/arch background */
  background-size: cover;
  background-position: center;
  /* Animation */
  animation: floatAndShake 4s ease-in-out infinite;
  z-index: 1;
}

.hero-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  /* Light overlay to keep logo visible */
  z-index: -1;
}

.hero-logo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary-color);
  animation: slideUp 1s ease-out;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 40px;
  opacity: 0.9;
  animation: slideUp 1.2s ease-out;
}

/* Animations */
@keyframes floatAndShake {
  0% {
    transform: translateY(0) rotate(0);
  }

  25% {
    transform: translateY(-10px) rotate(-5deg);
  }

  50% {
    transform: translateY(0) rotate(5deg);
  }

  75% {
    transform: translateY(10px) rotate(-3deg);
  }

  100% {
    transform: translateY(0) rotate(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Services / Main Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  padding: 20px 0;
}

.service-card {
  border-radius: var(--border-radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  background-color: var(--secondary-color);
  /* Fallback */
  background-size: cover;
  background-position: center;
  z-index: 1;
}

/* Background Overlays */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10, 25, 47, 0.75), rgba(10, 25, 47, 0.95));
  z-index: -1;
  transition: var(--transition);
}

.service-card:hover::before {
  background: linear-gradient(to bottom, rgba(10, 25, 47, 0.6), rgba(10, 25, 47, 0.85));
}

/* Specific Card Background Images */
.card-real-estate {
  background-image: url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80');
}

.card-umrah {
  background-image: url('https://images.unsplash.com/photo-1591604129939-f1efa4d9f7fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80');
}

.card-construction {
  background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80');
}

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

.service-icon {
  width: 80px;
  height: 80px;
  background-color: rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  font-size: 35px;
  color: var(--primary-color);
  transition: var(--transition);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.service-card:hover .service-icon {
  background-color: var(--primary-color);
  color: var(--white);
  transform: rotateY(360deg);
}

.service-card h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  /* Bright gold to stand out on dark bg */
  margin-bottom: 15px;
}

.service-card p {
  color: #e0e0e0;
  margin-bottom: 30px;
  flex-grow: 1;
}

/* --- List Your Property Section --- */
.list-property-section {
  text-align: center;
  color: var(--white);
  padding: 100px 0;
  background: linear-gradient(rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.9)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') center/cover fixed;
}

.list-property-content {
  max-width: 700px;
  margin: 0 auto;
}

.list-property-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.list-property-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

.chatbot-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-family: 'Tajawal', sans-serif;
}

.chatbot-btn {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  animation: pulse 2s infinite;
}

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

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

.chatbot-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 300px;
  /* Reduced from 350px */
  height: 400px;
  /* Reduced from 450px */
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0);
  transform-origin: bottom right;
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
}

.chatbot-window.active {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chatbot-header {
  background-color: var(--secondary-color);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-header i {
  color: var(--primary-color);
}

.close-chat {
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

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

.chatbot-messages {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #f9f9f9;
}

.msg {
  max-width: 85%;
  padding: 12px 18px;
  border-radius: 15px;
  font-size: 1rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease-out;
}

.msg-bot {
  background-color: white;
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-right-radius: 5px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

.msg-user {
  background-color: var(--primary-color);
  color: white;
  align-self: flex-end;
  border-bottom-left-radius: 5px;
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2);
}

.msg-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.msg-option {
  background: white;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

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

.chatbot-input {
  display: flex;
  padding: 20px 25px;
  background: white;
  border-top: 1px solid #e2e8f0;
  gap: 15px;
}

.chatbot-input input {
  flex-grow: 1;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 15px 20px;
  border-radius: 30px;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.chatbot-input input:focus {
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.chatbot-input button {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.chatbot-input button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Footer --- */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 80px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 25px;
  position: relative;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary-color);
}

.footer-col p {
  color: #ccc;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-col i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #ccc;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(-5px);
  /* RTL */
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    padding: 80px 30px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
  }

  .nav-links.active {
    right: 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .chatbot-window {
    width: 300px;
    height: 400px;
    right: -10px;
  }
}

/* Page Headers (for inner pages) */
.page-header {
  background: linear-gradient(rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.9)), url('../images/page-bg.jpg') center/cover;
  padding: 150px 0 80px;
  text-align: center;
  color: white;
}

.page-header h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}