/* style.css — Complete Final Version */
/* Gold & Copper Palette | Full-Screen Hero | Compact Footer | Single-Row Header */

:root {
  --gold: #c9a96e;
  --gold-light: #e0c992;
  --gold-dark: #a07d3f;
  --copper: #b87333;
  --copper-light: #d4956b;
  --dark: #1c1816;
  --dark-light: #2e2824;
  --dark-card: #262018;
  --text: #3e3428;
  --text-light: #7a6b5a;
  --bg: #faf7f2;
  --bg-alt: #f0ebe3;
  --card-bg: #ffffff;
  --border: #e5ddd1;
  --shadow: 0 4px 12px -1px rgba(28,24,22,0.12), 0 2px 4px -1px rgba(28,24,22,0.08);
  --shadow-hover: 0 12px 24px -4px rgba(28,24,22,0.18), 0 4px 8px -2px rgba(28,24,22,0.1);
  --shadow-gold: 0 4px 20px rgba(201,169,110,0.3);
  --radius: 12px;
  --font-main: 'Inter', system-ui, sans-serif;
  --font-arabic: 'Tajawal', sans-serif;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --gold: #e0c992;
  --gold-light: #f0ddb8;
  --gold-dark: #c9a96e;
  --copper: #d4956b;
  --copper-light: #e8b896;
  --dark: #faf7f2;
  --dark-light: #f0ebe3;
  --dark-card: #1c1816;
  --text: #d4ccc0;
  --text-light: #a09484;
  --bg: #141010;
  --bg-alt: #1c1816;
  --card-bg: #1c1816;
  --border: #2e2824;
  --shadow: 0 4px 12px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
  --shadow-hover: 0 12px 24px -4px rgba(0,0,0,0.5), 0 4px 8px -2px rgba(0,0,0,0.4);
  --shadow-gold: 0 4px 20px rgba(224,201,146,0.2);
}

/* ========== RESET & BASE ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; margin: 0; padding: 0; }
body { 
  font-family: var(--font-main); 
  background: var(--bg); 
  color: var(--text); 
  line-height: 1.6; 
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
}
body[dir="rtl"] { font-family: var(--font-arabic); }
main { flex: 1 0 auto; width: 100%; }
a { text-decoration: none; color: inherit; transition: 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ========== HEADER (Single Row, Always Visible) ========== */
header { 
  position: sticky; 
  top: 0; 
  background: var(--card-bg); 
  box-shadow: var(--shadow); 
  z-index: 1000; 
  padding: 0.6rem 0;
  transition: background 0.3s ease;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.logo-img { width: 38px; height: 38px; object-fit: contain; }
.logo-text { 
  font-size: 1.3rem; 
  font-weight: 700; 
  background: linear-gradient(135deg, var(--gold) 0%, var(--copper) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px; 
  white-space: nowrap;
}
.nav-links { 
  display: flex; 
  gap: 1rem; 
  list-style: none; 
  align-items: center;
  flex-shrink: 0;
}
.nav-links a { 
  font-weight: 500; 
  position: relative; 
  padding-bottom: 3px;
  color: var(--text);
  font-size: 0.88rem;
  white-space: nowrap;
}
.nav-links a::after { 
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; 
  background: linear-gradient(90deg, var(--gold), var(--copper)); transition: 0.3s; 
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ========== CONTROLS ========== */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle {
  background: none; border: 2px solid var(--border); border-radius: 50%;
  width: 34px; height: 34px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: 0.3s; color: var(--text); flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold); background: var(--bg-alt); transform: rotate(15deg); color: var(--gold); }
.theme-toggle svg { width: 18px; height: 18px; fill: currentColor; }

.lang-dropdown { position: relative; flex-shrink: 0; }
.lang-current {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.35rem 0.7rem; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; font-weight: 600; font-size: 0.8rem;
  color: var(--text); transition: 0.3s; user-select: none; white-space: nowrap;
}
.lang-current:hover { border-color: var(--gold); }
.lang-current svg { width: 10px; height: 10px; fill: var(--text-light); transition: transform 0.3s; }
.lang-current.open svg { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow-hover);
  overflow: hidden; opacity: 0; visibility: hidden;
  transform: translateY(-8px); transition: 0.25s ease; z-index: 100; min-width: 130px;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.9rem; cursor: pointer; font-size: 0.85rem;
  color: var(--text); transition: 0.2s; border: none; background: none; width: 100%; text-align: left;
}
[dir="rtl"] .lang-option { text-align: right; }
.lang-option:hover { background: var(--bg-alt); }
.lang-option.active {
  background: linear-gradient(135deg, rgba(201,169,110,0.15), rgba(184,115,51,0.1));
  color: var(--copper); font-weight: 600;
}

/* ========== HERO (Full Screen) ========== */
.hero { 
  padding: 0; text-align: center; 
  background: linear-gradient(135deg, rgba(28,24,22,0.75) 0%, rgba(41, 33, 27, 0.65) 100%), 
              url('https://images.unsplash.com/photo-1604574081819-cca83c2b0b6d?q=80&w=1920&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-size: cover; background-position: center; background-attachment: fixed;
  min-height: calc(100vh - 68px); height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; color: white; width: 100%;
}
.hero::before, .hero::after { display: none; }
.hero-content { max-width: 800px; position: relative; z-index: 1; padding: 2rem; }
.hero h1 { 
  font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; 
  color: white; text-shadow: 0 2px 8px rgba(0,0,0,0.4); line-height: 1.2; 
}
.hero p { 
  font-size: 1.15rem; margin-bottom: 2rem; color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3); max-width: 600px; margin: 0 auto 2rem; 
}
.btn { 
  display: inline-block; padding: 0.85rem 2rem; 
  background: linear-gradient(135deg, var(--gold), var(--copper));
  color: white; border-radius: var(--radius); font-weight: 600; 
  border: none; cursor: pointer; transition: 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); filter: brightness(1.05); }

/* ========== PRODUCTS ========== */
.products { padding: 4rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { 
  font-size: 2rem; 
  background: linear-gradient(135deg, var(--dark), var(--copper));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 0.5rem; 
}
[data-theme="dark"] .section-title h2 {
  background: linear-gradient(135deg, var(--gold), var(--copper-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-title p { color: var(--text-light); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.card { 
  background: var(--card-bg); border-radius: var(--radius); overflow: hidden; 
  box-shadow: var(--shadow); transition: 0.3s ease; border: 1px solid var(--border);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-img { width: 100%; height: 220px; object-fit: cover; background: var(--bg-alt); }
.card-body { padding: 1.5rem; }
.card h3 { margin-bottom: 0.5rem; color: var(--dark); font-size: 1.2rem; }
[data-theme="dark"] .card h3 { color: var(--gold-light); }
.card p { font-size: 0.95rem; color: var(--text-light); }

/* ========== CONTACT ========== */
.contact { padding: 4rem 0; }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
.contact-info h2 {
  background: linear-gradient(135deg, var(--dark), var(--copper));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 1rem;
}
[data-theme="dark"] .contact-info h2 {
  background: linear-gradient(135deg, var(--gold), var(--copper-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.contact-info > p { color: var(--text-light); margin-bottom: 1.5rem; }
.contact-details p { margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; color: var(--text); }
.contact-details a { color: var(--copper); font-weight: 500; }
.contact-details a:hover { color: var(--gold); text-decoration: underline; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.95rem; color: var(--text); }
.form-group input, .form-group textarea { 
  width: 100%; padding: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); 
  font-family: inherit; transition: 0.3s; background: var(--card-bg); color: var(--text);
}
.form-group input:focus, .form-group textarea:focus { 
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,110,0.2); 
}
.form-group textarea { min-height: 130px; resize: vertical; }
#form-status { margin-top: 1rem; font-weight: 500; display: none; padding: 0.8rem; border-radius: 8px; }
.success { background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.error { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }

/* ========== FOOTER (Compact) ========== */
footer { 
  background: var(--dark); color: var(--bg); padding: 0.7rem 0; 
  margin-top: auto; flex-shrink: 0; transition: background 0.3s ease; width: 100%;
}
[data-theme="dark"] footer { background: #0a0808; color: var(--bg); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-left { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.82rem; }
.footer-left p { color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 0.5rem; margin: 0; white-space: nowrap; }
.footer-left a { color: var(--gold-light); transition: 0.3s; }
.footer-left a:hover { color: var(--gold); text-decoration: underline; }
.footer-middle { text-align: center; font-size: 0.78rem; color: rgba(255,255,255,0.45); margin: 0; }
.footer-right { display: flex; gap: 0.6rem; }
.social-icons a { 
  display: inline-flex; align-items: center; justify-content: center; 
  width: 34px; height: 34px; background: rgba(255,255,255,0.08); border-radius: 50%; transition: 0.3s; 
}
.social-icons a:hover { background: linear-gradient(135deg, var(--gold), var(--copper)); transform: scale(1.1); }
.social-icons svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.8); }

/* ========== RTL & RESPONSIVE ========== */
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .contact-details p { flex-direction: row-reverse; }
[dir="rtl"] .form-group input, [dir="rtl"] .form-group textarea { text-align: right; }
[dir="rtl"] .footer-left p { flex-direction: row-reverse; }

@media (max-width: 900px) {
  .logo-text { font-size: 1.2rem; } .logo-img { width: 34px; height: 34px; }
  .nav-links { gap: 0.8rem; } .nav-links a { font-size: 0.8rem; }
}
@media (max-width: 768px) {
  .header-inner { gap: 0.6rem; }
  .header-left { gap: 0.8rem; }
  .logo-text { font-size: 1rem; } .logo-img { width: 30px; height: 30px; }
  .nav-links { gap: 0.6rem; } .nav-links a { font-size: 0.75rem; }
  .theme-toggle { width: 30px; height: 30px; } .theme-toggle svg { width: 16px; height: 16px; }
  .lang-current { padding: 0.3rem 0.5rem; font-size: 0.75rem; }
  .hero { min-height: calc(100vh - 68px); height: auto; padding: 3rem 1rem; background-attachment: scroll; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; gap: 0.8rem; }
  .footer-left { align-items: center; } .footer-left p { flex-direction: column; gap: 0.2rem; white-space: normal; }
}
@media (max-width: 600px) {
  .logo-text { display: none; }
  .nav-links a { font-size: 0.7rem; }
}
@media (max-width: 480px) {
  .nav-links a::after { display: none; }
  .nav-links { gap: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .fade-in, .card, .btn, .nav-links, a::after, .social-icons a, .theme-toggle, .lang-option, .lang-menu { transition: none !important; animation: none !important; }
}