/*
Theme Name: Azzawya
Description: Azzawya Theme
Version: 1.0
Text Domain: azzawya
*/

@font-face {
  font-family: 'Rabat';
  src: url('assets/font.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary: #144228;
  --primary-light: #207143;
  --primary-dark: #0f3d2f;
  --gold: #d4af37;
  --gold-light: #e8c860;
  --ivory: #f8f6f0;
  --ivory-dim: #e8e4d8;
  --text-primary: #2c3e50;
  --text-secondary: #5a6c7d;
  --border: #e8e4d8;
  --panel: #ffffff;
  --line: rgba(20, 66, 40, 0.18);
  --shadow: 0 12px 32px rgba(20, 66, 40, 0.12);
  --shadow-lg: rgba(20, 66, 40, 0.15);
}

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

body {
  font-family: 'Rabat', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--ivory);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ HEADER ============ */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 2000;
  box-shadow: 0 4px 20px var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/pattern.png');
  opacity: 0.25;
  background-size: 100px;
  pointer-events: none;
  z-index: 0;
}

.site-header.scrolled {
  padding: 0.6rem 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.site-header.scrolled .header-subtitle {
  max-height: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
}

.site-header.scrolled .header-logo {
  max-height: 42px;
}

.site-header.scrolled .header-title {
  font-size: 1.35rem;
  margin-bottom: 0;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-title-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
}

.header-logo {
  width: auto;
  max-height: 65px;
  transition: all 0.3s ease;
}

.header-title {
  font-family: 'Rabat', 'Amiri', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  font-weight: 300;
  transition: all 0.3s ease;
  max-height: 50px;
  margin: 0;
}

nav {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: 'Rabat', 'Cairo', sans-serif;
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--primary-dark);
  font-weight: 700;
}

/* ============ FORM & CONTENT ============ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-content {
  padding: 3rem 0;
  flex: 1;
}

.form-card, .content-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 4px 16px rgba(20, 66, 40, 0.08);
  border: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto;
}

.form-card h2, .content-card h2 {
  font-family: 'Rabat', 'Amiri', serif;
  color: var(--primary);
  margin-bottom: 2rem;
  font-size: 1.8rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.content-card h2 {
  text-align: right;
  margin-bottom: 1.5rem;
}

.form-card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.content-card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}

.content-card p {
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.content-card ul {
  margin-bottom: 1.5rem;
  padding-right: 2rem;
  color: var(--text-secondary);
}

.content-card ul li {
  margin-bottom: 0.8rem;
  line-height: 1.8;
  position: relative;
}

.content-card ul li::marker {
  color: var(--gold);
}

.divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--border), transparent);
  margin: 2.5rem 0;
  border: none;
}

.contact-section {
  text-align: center;
  padding: 2rem 0 0;
}

.contact-section p {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-section a {
  color: var(--primary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(20, 66, 40, 0.08);
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  display: inline-block;
  transition: all 0.3s ease;
  border: 1px solid var(--line);
}

.contact-section a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(20, 66, 40, 0.2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: 'Rabat', 'Cairo', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  background: #fff;
  transition: all 0.3s ease;
  direction: rtl;
}

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

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

.form-group small {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.form-group input[type="file"] {
  padding: 0.6rem;
  border-style: dashed;
  background: var(--ivory);
  cursor: pointer;
}

.form-group input[type="file"]:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
}

.submit-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Rabat', 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1.5rem;
  box-shadow: 0 4px 16px rgba(20, 66, 40, 0.2);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 66, 40, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-note {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.section-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0.5rem 0;
}

.section-divider span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(.65, 0, .35, 1);
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: #C1272D;
}

/* ============ FOOTER ============ */
.site-footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 3rem 0 2rem;
  position: relative;
  overflow: hidden;
  margin-top: auto;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/pattern.png');
  opacity: 0.15;
  background-size: 100px;
  pointer-events: none;
  z-index: 0;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-col h3 {
  font-family: 'Rabat', 'Amiri', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-logo {
  max-width: 200px;
}

.footer-desc {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.6;
  max-width: 300px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  color: white;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.footer-socials a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  opacity: 0.6;
  position: relative;
  z-index: 1;
}

@media (max-width: 780px) {
  .site-header {
    padding: 0.8rem 0;
  }

  .header-content {
    padding: 0 1rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
  }

  .header-title-row {
    justify-content: center;
    flex-direction: column;
    gap: 0.4rem;
  }

  .header-title {
    font-size: 1.5rem;
  }

  .header-subtitle {
    font-size: 0.85rem;
  }

  .header-logo {
    max-height: 45px;
  }

  nav {
    margin-top: 0;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .container {
    padding: 0 1rem;
  }

  .form-card, .content-card {
    padding: 1.5rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-desc {
    max-width: 100%;
  }

  .footer-socials {
    justify-content: center;
  }
}
