:root {
  --green-primary: #1B7A2B;
  --green-light: #2A9D3A;
  --green-dark: #145E21;
  --red-primary: #C8102E;
  --red-dark: #A00D24;
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --gray-50: #F1F3F5;
  --gray-100: #E9ECEF;
  --gray-200: #DEE2E6;
  --gray-400: #ADB5BD;
  --gray-600: #6C757D;
  --gray-800: #343A40;
  --gray-900: #212529;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  
  /* Additional CSS variables used in components */
  --primary: #EE2A35;
  --secondary: #000000;
  --accent: #FFE066;
  --success: #00732F;
  --text: #1A1A1A;
  --text-light: #666;
  --bg: #F8F8F8;
  --border: #000000;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

html {
  overflow-x: hidden;
}

body {
  font-family: 'Noto Kufi Arabic', 'Noto Naskh Arabic', sans-serif;
  background: var(--off-white);
  color: var(--gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body.rtl {
  direction: rtl;
}

/* Palestinian flag top stripe */
.flag-stripe {
  height: 4px;
  display: flex;
  width: 100%;
  flex-shrink: 0;
}

.flag-stripe span {
  flex: 1;
}

.flag-stripe .s-black { background: #000000; }
.flag-stripe .s-white { background: #FFFFFF; border-bottom: 1px solid var(--gray-100); }
.flag-stripe .s-green { background: var(--green-primary); }
.flag-stripe .s-red { background: var(--red-primary); }

/* Inverted red triangle (المثلث الأحمر المقلوب) */
.red-inverted-triangle {
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 30px solid var(--red-primary);
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(200, 16, 46, 0.3));
}

/* Small red triangle for accents */
.red-inverted-triangle-sm {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid var(--red-primary);
  display: inline-block;
}

/* Keffiyeh SVG pattern definition */
.keffiyeh-pattern-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Header */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--gray-900);
  text-decoration: none;
}

.header-logo span {
  display: inline-block;
  width: 28px;
  height: 3px;
  background: var(--green-primary);
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.header-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.25rem 0;
}

.header-nav a:hover {
  color: var(--gray-900);
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-bottom: 8rem;
  position: relative;
}

main > * {
  position: relative;
  z-index: 1;
}

.brand {
  text-align: center;
  margin-bottom: 3rem;
}

.brand-name {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -1px;
  line-height: 1.1;
}

.brand-underline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0.75rem auto 1.25rem;
}

.brand-underline .line {
  width: 32px;
  height: 3px;
  border-radius: 2px;
}

.brand-underline .line-black { background: #000; }
.brand-underline .line-green { background: var(--green-primary); }

.brand-underline .red-inverted-triangle-sm {
  flex-shrink: 0;
  margin: 0 4px;
}

.brand-tagline {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 1.125rem;
  color: var(--gray-600);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Keffiyeh pattern band - authentic fishnet/ogee pattern */
.keffiyeh-band {
  height: 36px;
  width: 100%;
  background-color: #FAFAFA;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 C8 4, 4 4, 0 0 M12 0 C16 4, 20 4, 24 0 M0 12 C4 8, 4 4, 0 0 M0 12 C4 16, 4 20, 0 24 M12 24 C8 20, 4 20, 0 24 M12 24 C16 20, 20 20, 24 24 M24 12 C20 8, 20 4, 24 0 M24 12 C20 16, 20 20, 24 24 M12 0 C12 4, 8 8, 4 8 M12 0 C12 4, 16 8, 20 8 M0 12 C4 12, 8 8, 8 4 M0 12 C4 12, 8 16, 8 20 M12 24 C12 20, 8 16, 4 16 M12 24 C12 20, 16 16, 20 16 M24 12 C20 12, 16 8, 16 4 M24 12 C20 12, 16 16, 16 20' fill='none' stroke='%23000' stroke-width='0.8' opacity='0.15'/%3E%3Ccircle cx='12' cy='12' r='1.2' fill='%23000' opacity='0.12'/%3E%3Ccircle cx='0' cy='0' r='1.2' fill='%23000' opacity='0.12'/%3E%3Ccircle cx='24' cy='0' r='1.2' fill='%23000' opacity='0.12'/%3E%3Ccircle cx='0' cy='24' r='1.2' fill='%23000' opacity='0.12'/%3E%3Ccircle cx='24' cy='24' r='1.2' fill='%23000' opacity='0.12'/%3E%3C/svg%3E");
  background-size: 24px 24px;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Keffiyeh thick border stripes */
.keffiyeh-band::before,
.keffiyeh-band::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    #000 0px,
    #000 6px,
    transparent 6px,
    transparent 10px
  );
  opacity: 0.12;
}

.keffiyeh-band::before { top: 4px; }
.keffiyeh-band::after { bottom: 4px; }

/* Keffiyeh background watermark for main */
.keffiyeh-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 C8 4, 4 4, 0 0 M12 0 C16 4, 20 4, 24 0 M0 12 C4 8, 4 4, 0 0 M0 12 C4 16, 4 20, 0 24 M12 24 C8 20, 4 20, 0 24 M12 24 C16 20, 20 20, 24 24 M24 12 C20 8, 20 4, 24 0 M24 12 C20 16, 20 20, 24 24' fill='none' stroke='%23000' stroke-width='0.6' opacity='0.04'/%3E%3Ccircle cx='12' cy='12' r='0.8' fill='%23000' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 24px 24px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 70%);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  padding: 0 1rem;
  box-sizing: border-box;
}

.container.home {
  padding-top: 100px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .container.home {
    padding-top: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 0.5rem;
  }
}

/* Features */
.features {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  text-align: center;
  z-index: inherit;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--gray-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8 0 C5.5 2.5, 2.5 2.5, 0 0 M8 0 C10.5 2.5, 13.5 2.5, 16 0 M0 8 C2.5 5.5, 2.5 2.5, 0 0 M0 8 C2.5 10.5, 2.5 13.5, 0 16 M8 16 C5.5 13.5, 2.5 13.5, 0 16 M8 16 C10.5 13.5, 13.5 13.5, 16 16 M16 8 C13.5 5.5, 13.5 2.5, 16 0 M16 8 C13.5 10.5, 13.5 13.5, 16 16' fill='none' stroke='%23000' stroke-width='0.5' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
}

mark {
  background: var(--red-primary);
  color: var(--white);
  padding: 2px 4px;
  font-weight: 700;
  border-radius: 2px;
}

.arabic-url, .result small {
    unicode-bidi: embed;
    direction: rtl;
    font-family: 'Noto Naskh Arabic', serif;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .brand-name {
    font-size: 4rem;
  }
  
  .brand-tagline {
    font-size: 1.1rem;
  }
  
  .features {
    gap: 2rem;
  }
  
  .keffiyeh-watermark {
    width: 500px;
    height: 500px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0;
  }
  
  .container.home {
    padding-top: 0;
  }
  
  .header {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .header-nav {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .header-nav a {
    font-size: 0.8125rem;
  }

  main {
    padding: 1.5rem 1rem;
    padding-bottom: 4rem;
  }

  .brand-name {
    font-size: 3.25rem;
  }

  .brand-tagline {
    font-size: 1rem;
  }

  .features {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .feature-text {
    font-size: 0.75rem;
  }
  
  .keffiyeh-watermark {
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 600px) {
  .brand-name {
    font-size: 2.75rem;
  }
  
  .brand-tagline {
    font-size: 0.95rem;
  }
  
  .brand-underline {
    gap: 6px;
  }
  
  .brand-underline .line {
    width: 28px;
  }
  
  .features {
    gap: 1rem;
  }
  
  .feature-icon {
    width: 40px;
    height: 40px;
  }
  
  .feature-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .keffiyeh-watermark {
    width: 350px;
    height: 350px;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 2.5rem;
  }
  
  .brand-tagline {
    font-size: 0.9rem;
  }
  
  .features {
    flex-direction: column;
    gap: 1rem;
  }

  .feature {
    flex-direction: row;
    gap: 0.75rem;
    justify-content: flex-start;
    width: 100%;
  }
  
  .feature-icon {
    width: 36px;
    height: 36px;
  }
  
  .feature-icon svg {
    width: 16px;
    height: 16px;
  }
  
  .feature-text {
    font-size: 0.8rem;
  }
  
  .keffiyeh-watermark {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 360px) {
  .brand-name {
    font-size: 2.25rem;
  }
  
  .brand-tagline {
    font-size: 0.85rem;
  }
  
  .brand-underline {
    gap: 4px;
  }
  
  .brand-underline .line {
    width: 24px;
  }
  
  .header {
    padding: 0.75rem 0.75rem;
  }
  
  .header-nav {
    gap: 0.5rem;
  }
  
  .header-nav a {
    font-size: 0.75rem;
  }
  
  main {
    padding: 1rem 0.75rem;
    padding-bottom: 3rem;
  }
  
  .feature {
    gap: 0.5rem;
  }
  
  .feature-icon {
    width: 32px;
    height: 32px;
  }
  
  .feature-icon svg {
    width: 14px;
    height: 14px;
  }
  
  .feature-text {
    font-size: 0.75rem;
  }
  
  .keffiyeh-watermark {
    width: 250px;
    height: 250px;
  }
}
