/* ===== CSS Variables & Base ===== */
:root {
  --primary: #8B4513;
  --primary-light: #A0522D;
  --primary-dark: #6B3410;
  --secondary: #D4A574;
  --accent: #C19A6B;
  --gold: #DAA520;
  --bg: #FDF8F0;
  --bg-alt: #F5EDE0;
  --text: #2C1810;
  --text-light: #5C4033;
  --text-muted: #8B7355;
  --white: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 32px rgba(44, 24, 16, 0.1);
  --shadow-lg: 0 16px 48px rgba(44, 24, 16, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Heebo', 'Arial', sans-serif;
  --font-display: 'Frank Ruhl Libre', 'Georgia', serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }

.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title h2 {
  color: var(--primary);
  margin-bottom: 15px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--secondary));
  margin: 20px auto 0;
  border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

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

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #C8960C);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 15px 0;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(253, 248, 240, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  padding: 10px 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--transition);
}

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

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

.nav-links a {
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 5px 0;
}

.navbar.scrolled .nav-links a { color: var(--text); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  padding: 8px 24px !important;
  background: var(--gold) !important;
  color: var(--white) !important;
  border-radius: 50px !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 5px;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: all var(--transition);
}

.navbar.scrolled .menu-toggle span { background: var(--text); }

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ===== Hero Sections ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(44, 24, 16, 0.75), rgba(139, 69, 19, 0.55));
  z-index: 1;
}

.hero-home .hero-bg { background-image: url('_uploads/ai_16a3bc2882e99df3.jpg'); }
.hero-about .hero-bg { background-image: url('_uploads/ai_6ad320f642b753d3.jpg'); }
.hero-services .hero-bg { background-image: url('_uploads/ai_933940dafcaac33e.jpg'); }

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 20px;
}

.hero-content h1 {
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 35px;
  opacity: 0.9;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Page hero (shorter) */
.page-hero {
  min-height: 50vh;
}

.page-hero .hero-content h1 { font-size: clamp(2rem, 4vw, 3rem); }

/* ===== Sections ===== */
section {
  padding: 100px 0;
}

section:nth-child(even) {
  background: var(--bg-alt);
}

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--primary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}

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

.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.card h3 {
  color: var(--primary);
  margin-bottom: 12px;
}

.card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* ===== Grid Layouts ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }

/* ===== Glass Card ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

/* ===== Features Section ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card {
  text-align: center;
  padding: 40px 30px;
}

.feature-card .card-icon {
  margin: 0 auto 20px;
}

/* ===== Stats ===== */
.stats-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.stat-item p {
  font-size: 1rem;
  opacity: 0.9;
}

/* ===== Testimonials ===== */
.testimonial-card {
  padding: 35px;
  position: relative;
}

.testimonial-card .quote-icon {
  font-size: 3rem;
  color: var(--secondary);
  opacity: 0.3;
  position: absolute;
  top: 15px;
  right: 20px;
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-author .avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
}

.testimonial-author strong { color: var(--primary); }
.testimonial-author span { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Contact Form ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #E8DDD0;
  border-radius: var(--radius);
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: all var(--transition);
  direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-message {
  padding: 15px 20px;
  border-radius: var(--radius);
  margin-top: 15px;
  display: none;
  font-weight: 500;
  text-align: center;
}

.form-message.success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #A5D6A7;
  display: block;
}

.form-message.error {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #EF9A9A;
  display: block;
}

/* ===== FAQ Accordion ===== */
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq-item:hover { box-shadow: var(--shadow); }

.faq-question {
  width: 100%;
  padding: 20px 25px;
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: right;
  direction: rtl;
  transition: color var(--transition);
}

.faq-question:hover { color: var(--primary); }

.faq-question .icon {
  font-size: 1.5rem;
  transition: transform var(--transition);
  color: var(--gold);
  flex-shrink: 0;
  margin-right: auto;
  margin-left: 0;
}

.faq-item.active .faq-question .icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 25px 20px;
  color: var(--text-light);
  line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(135deg, #1A0E08, var(--primary-dark));
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 15px;
}

.footer-about p {
  opacity: 0.8;
  line-height: 1.8;
}

.footer-col h4 {
  color: var(--gold);
  margin-bottom: 18px;
  font-size: 1.1rem;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  opacity: 0.8;
  transition: opacity var(--transition);
}
.footer-col ul li a:hover { opacity: 1; color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 25px;
  text-align: center;
  opacity: 0.6;
  font-size: 0.9rem;
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 { color: var(--gold); margin-bottom: 15px; }
.cta-section p { opacity: 0.9; max-width: 600px; margin: 0 auto 30px; font-size: 1.1rem; }

/* ===== Process/Steps ===== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  counter-reset: step;
}

.process-step {
  text-align: center;
  padding: 30px;
  position: relative;
}

.process-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #C8960C);
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 auto 20px;
}

/* ===== Funnel Section ===== */
.funnel-form {
  max-width: 600px;
  margin: 0 auto;
}

.funnel-step {
  display: none;
}

.funnel-step.active {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #E8DDD0;
  border-radius: 3px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--primary));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ===== Quote Flow ===== */
.quote-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.quote-option {
  padding: 20px;
  border: 2px solid #E8DDD0;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
}

.quote-option:hover,
.quote-option.selected {
  border-color: var(--primary);
  background: rgba(139, 69, 19, 0.05);
}

.quote-option.selected {
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.15);
}

.quote-option .option-icon { font-size: 2rem; margin-bottom: 8px; }
.quote-option .option-label { font-weight: 600; color: var(--text); }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* ===== Service Detail ===== */
.service-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.service-info h3 { color: var(--primary); margin-bottom: 15px; }
.service-info p { margin-bottom: 20px; }

.service-features li {
  padding: 10px 0;
  padding-right: 30px;
  position: relative;
  border-bottom: 1px solid #F0E8DC;
}

.service-features li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ===== Privacy & Legal ===== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h3 {
  color: var(--primary);
  margin-top: 35px;
  margin-bottom: 12px;
}

.legal-content p {
  margin-bottom: 15px;
  color: var(--text-light);
}

.legal-content ul {
  margin-bottom: 15px;
  padding-right: 25px;
}

.legal-content ul li {
  list-style: disc;
  margin-bottom: 8px;
  color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .service-detail-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 80px 30px 30px;
    gap: 20px;
    transition: right var(--transition);
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
  }

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

  .nav-links a {
    color: var(--text) !important;
    font-size: 1.1rem;
  }

  .hero { min-height: 90vh; }
  .hero-bg { background-attachment: scroll; }
  .page-hero { min-height: 40vh; }
  section { padding: 60px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 25px; }
  .section-title { margin-bottom: 40px; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.8rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; }
}
