/* ===========================================
   main.css
   Bilingual (Arabic + English) RTL/LTR
   للتكيف والتبريد (Cooling & Refrigeration)
   =========================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&family=Inter:wght@400;500;700&display=swap');

/* CSS Variables */
:root {
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: #E0F2FE;
  --secondary: #0F172A;
  --accent: #F97316;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-600: #475569;
  --gray-900: #0F172A;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

/* Typography & Direction */
html[lang="ar"] {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  text-align: right;
}

html[lang="en"] {
  font-family: 'Inter', sans-serif;
  direction: ltr;
  text-align: left;
}

body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray-900);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin: 0 0 15px 0; }

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }

/* Layout */
.container { max-width: 1200px; margin-left: auto; margin-right: auto; padding: 0 20px; }
.section { padding: 80px 0; }
.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: 30px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; border-radius: var(--radius-md); transition: var(--transition);
  text-decoration: none; cursor: pointer; border: 2px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); padding: 14px 32px; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; border-color: var(--primary); color: var(--primary); padding: 14px 32px; }
.btn-secondary:hover { background: var(--primary); color: var(--white); }
.btn-accent { background: var(--accent); color: var(--white); padding: 14px 32px; }
.btn-accent:hover { filter: brightness(1.1); }
.btn-whatsapp { background: #25D366; color: var(--white); padding: 14px 32px; }
.btn-whatsapp:hover { background: #128C7E; }
.btn-whatsapp::before { content: "💬"; font-size: 1.2rem; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius-md); padding: 30px; box-shadow: var(--shadow-sm); transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-5px); }
.card-icon { width: 70px; height: 70px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 1.8rem; color: var(--primary); }

/* Badges */
.badge { display: inline-block; padding: 4px 14px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-accent { background: #FED7AA; color: #9A3412; }

/* Section Header */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2rem; margin-bottom: 15px; }
.section-header p { color: var(--gray-600); max-width: 600px; margin-left: auto; margin-right: auto; }

/* Header & Navbar */
.top-bar { background: var(--secondary); color: var(--white); padding: 10px 0; font-size: 0.9rem; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.navbar { background: var(--white); position: sticky; top: 0; z-index: 1000; height: 70px; box-shadow: var(--shadow-sm); transition: var(--transition); }
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; font-weight: 700; font-size: 1.3rem; color: var(--secondary); }
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu a { font-weight: 500; position: relative; }
.nav-menu a.active, .nav-menu a:hover { color: var(--primary); }

/* Language Toggle */
.lang-toggle { display: flex; border: 2px solid var(--primary); border-radius: 50px; overflow: hidden; }
.lang-btn { padding: 6px 16px; font-weight: 700; cursor: pointer; background: transparent; color: var(--primary); transition: var(--transition); }
.lang-btn.active { background: var(--primary); color: var(--white); }

/* Mobile Menu */
.hamburger { display: none; flex-direction: column; gap: 6px; cursor: pointer; }
.hamburger span { display: block; width: 25px; height: 3px; background: var(--secondary); border-radius: 3px; }
.mobile-menu { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--white); flex-direction: column; gap: 15px; padding: 20px; box-shadow: var(--shadow-md); z-index: 999; }
.mobile-menu.active { display: flex; }

/* Hero Section */
.hero { background: linear-gradient(135deg, var(--secondary) 0%, #1E3A5F 50%, var(--primary) 100%); color: var(--white); min-height: 90vh; display: flex; align-items: center; padding: 100px 0; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.3; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; }
.hero-stats { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: var(--radius-lg); padding: 25px; display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hero-stats .stat-item { text-align: center; }
.hero-stats .stat-number { font-size: 2rem; font-weight: 700; display: block; }
.hero-btns { display: flex; gap: 15px; margin-top: 30px; }

/* Floating Buttons */
.whatsapp-float, .call-float { position: fixed; z-index: 9999; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--white); box-shadow: var(--shadow-lg); transition: var(--transition); animation: pulse 2s infinite; }
.whatsapp-float { bottom: 30px; background: #25D366; }
.call-float { bottom: 100px; background: var(--primary); }
html[lang="ar"] .whatsapp-float, html[lang="ar"] .call-float { right: 30px; }
html[lang="en"] .whatsapp-float, html[lang="en"] .call-float { left: 30px; right: auto; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Announcement Bar */
.announcement-bar { background: var(--accent); color: var(--white); text-align: center; padding: 10px; position: relative; }
.announcement-close { position: absolute; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 1.2rem; background: none; border: none; color: var(--white); }
html[lang="ar"] .announcement-close { left: 15px; right: auto; }
html[lang="en"] .announcement-close { right: 15px; left: auto; }

/* Footer */
.footer { background: var(--secondary); color: var(--white); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 20px; text-align: center; font-size: 0.9rem; color: var(--gray-400); margin-top: 40px; }

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--gray-600); }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; } .mt-4 { margin-top: 40px; } .mt-5 { margin-top: 50px; }
.mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 30px; } .mb-4 { margin-bottom: 40px; } .mb-5 { margin-bottom: 50px; }
.pt-1 { padding-top: 10px; } .pt-2 { padding-top: 20px; } .pt-3 { padding-top: 30px; } .pt-4 { padding-top: 40px; } .pt-5 { padding-top: 50px; }
.pb-1 { padding-bottom: 10px; } .pb-2 { padding-bottom: 20px; } .pb-3 { padding-bottom: 30px; } .pb-4 { padding-bottom: 40px; } .pb-5 { padding-bottom: 50px; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.gap-1 { gap: 10px; } .gap-2 { gap: 20px; } .gap-3 { gap: 30px; } .gap-4 { gap: 40px; }
.hidden { display: none !important; }
.visible { display: block !important; }

/* Scroll Animations */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* Responsive Overrides */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hamburger { display: flex; }
  .nav-menu { display: none; }
  .hero h1 { font-size: 2.2rem; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .hero { min-height: 80vh; text-align: center; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { max-width: 100%; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .whatsapp-float { bottom: 20px; width: 50px; height: 50px; }
  .call-float { bottom: 80px; width: 50px; height: 50px; }
  html[lang="ar"] .whatsapp-float, html[lang="ar"] .call-float { right: 20px; }
  html[lang="en"] .whatsapp-float, html[lang="en"] .call-float { left: 20px; }
}