/* ======================
   تعريفات الخطوط المخصصة
   ====================== */
   @font-face {
    font-family: "SFDroob";
    src: url("fonts/SFDroob.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0020-007E;
    font-weight: 100 900;
    font-display: swap;
  }
  
  @font-face {
    font-family: "SFLogo Regular";
    src: url("fonts/SFLogoVF.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 50% 200%;
    font-display: swap;
  }
  
  @keyframes logo-animation {
    0% { font-variation-settings: "wght" 100, "wdth" 50; }
    50% { font-variation-settings: "wght" 900, "wdth" 200; }
    100% { font-variation-settings: "wght" 100, "wdth" 50; }
  }
  
  /* ==============
     متغيرات الألوان
     ============== */
  :root {
    --primary: #065f5b;
    --accent: #6f706e;
    --bg: #f3f3f3;
    --branding-clr: #1a237e;
    --publishing-clr: #1b5e20;
    --display-clr: #e65100;
    --apps-clr: #01579b;
    --license-clr: #0091ff;
    --blog-clr: #12a7a0;
    --courses-clr: #7a007a;
  }  
  
  /* ==============
     التنسيق العام
     ============== */
  body {
    font-family: 'SFDroob', Tahoma, sans-serif;
    background: #F2F2F2;
    margin: 0;
    transition: 0.3s;
  }
  
  /* ==============
     أزرار التنقل بين الحزم
     ============== */
  .bundle-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 25px 0;
  }
  
  .bundle-nav .nav-btn {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    transition: opacity 0.2s;
    min-width: 160px;
    text-align: center;
  }
  
  .bundle-nav .nav-btn:hover {
    opacity: 0.9;
  }
  
  /* ألوان كل زر */
  .branding-btn { background: var(--branding-clr); }
  .publishing-btn { background: var(--publishing-clr); }
  .display-btn { background: var(--display-clr); }
  .apps-btn { background: var(--apps-clr); }
  .blog-btn { background: var(--blog-clr); }
  .Courses-btn { background: var(--courses-clr); }
  .license-btn { background: var(--license-clr); }
  
  /* ==============
     الهيدر
     ============== */
  .site-header {
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    width: 100%;
  }
  
  .navbar-container {
    width: 94%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo-wrapper {
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #222;
    font-weight: 800;
    font-size: 1.5rem;
    white-space: nowrap;
    font-family: "SFLogo Regular", sans-serif;
    animation: logo-animation 8s infinite ease-in-out;
  }
  
  .tilde {
    color: #F56721;
    margin-left: 5px;
  }
  
  .lang-toggle {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: 0.3s ease;
  }
  
  .lang-toggle:hover {
    background: #222;
    color: #fff;
  }
  
  /* ==============
     رابط العودة
     ============== */
  .back-link {
    text-align: center;
    margin: 20px 0;
  }
  
  .back-link a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
  }
  
  /* ==============
     الحاوية الرئيسية
     ============== */
  .container {
    width: 94%;
    max-width: 1400px;
    margin: 40px auto;
  }
  
  /* ==============
     رؤوس الحزم
     ============== */
  .bundle-group {
    margin-bottom: 70px;
  }
  
  .bundle-header {
    padding: 20px 30px;
    border-radius: 15px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
  }
  
  .bg-branding { background: var(--branding-clr); }
  .bg-publishing { background: var(--publishing-clr); }
  .bg-display { background: var(--display-clr); }
  .bg-apps { background: var(--apps-clr); }
  .bg-blog { background: var(--blog-clr); }
  .bg-courses { background: var(--courses-clr); }
  .bg-license { background: var(--license-clr); }
  
  /* ==============
     شبكة الخطوط
     ============== */
  .fonts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
  }
  
  /* ==============
     بطاقة الخط  
     ============== */
  .font-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 12;
    padding: 15px;
    border: 1px solid #c4c3c3;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: auto;
    min-height: 180px; /* ← ارتفاع موحد يضمن التناسق */
  }
  
  .font-card:hover {
    transform: translateY(-5px); /* حركة أخف */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }
  
  /* ==============
     الشارات (Variable / Static)
     ============== */
     .v-badge,
     .s-badge {
       position: absolute;
       top: 10px;
       left: 10px;
       font-size: 14px; /* تصغير حجم الشارة */
       padding: 2px 8px;
       border-radius: 4px;
       font-weight: bold;
       color: white;
       z-index: 10;
     }
  
  .v-badge { background: #12a7a0; } /* Variable */
  .s-badge { background: #9e9e9e; } /* Static */
  
  /* ========
     اسم الخط
     ======== */
     .font-name-display {
      font-size: 1.8rem; /* تصغير العنوان من 2.2rem */
      margin-top: 25px;   /* لإعطاء مساحة للشارة فوق الاسم */
      margin-bottom: 5px;
      text-align: center;
      color: #222;
      font-family: "SFDroob", sans-serif;
      flex-shrink: 0;
    }
  
  /* =======
    وصف الخط
     ======= */
  .font-desc {
    font-size: 1rem;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
  }
  
  /* ==============
     تذييل البطاقة
     ============== */
     .card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-top: 1px solid #ddd; /* خط أنحف */
      padding-top: 12px;
      margin-top: auto; /* دفع التذييل للأسفل دائماً */
    }
    
    .price-tag {
      font-weight: bold;
      color: var(--accent);
      font-size: 1.2rem;
    }
  
    .details-btn {
      background: #12a7a0;
      color: white;
      text-decoration: none;
      padding: 6px 20px; /* تقليل العرض الداخلي للزر من 40px إلى 20px */
      border-radius: 6px;
      font-size: 1.1rem; /* حجم خط أنسب للزر */
      transition: 0.3s;
    }
  
    /* ==============
       الاستجابة للجوال
       ============== */
    @media (max-width: 768px) {
      .fonts-grid {
        gap: 15px;
      }
      .font-card {
        padding: 12px;
      }
      .font-name-display {
        font-size: 1.6rem;
      }
      .details-btn {
          padding: 5px 15px;
          font-size: 1rem;
      }
    }  
  /* ==============
     الفوتر
     ============== */
  footer {
    background: #065f5b;
    color: #e5e7eb;
    padding: 3rem 0 2rem;
    margin-top: 3rem;
  }
  
  .footer-brand {
    text-align: center;
    margin-bottom: 2.5rem;
  }
  
  .footer-brand .logo {
    font-size: 1.5rem;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
  }
  
  .footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: rgb(255, 255, 255);
    text-align: start;
  }
  
  .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .footer-col ul li {
    margin-bottom: 0.8rem;
  }
  
  .footer-col a {
    color: #cbd5f5;
    font-size: 0.95rem;
    transition: color 0.2s;
  }
  
  .footer-col a:hover {
    color: white;
  }
  
  /* Social Links */
  .social-links {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-start; 
  }
  
  .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
  }
  
  .social-links a:hover {
    background: white;
    transform: translateY(-3px);
  }
  
  .social-links img {
    width: 18px;
    height: auto;
    filter: brightness(0) invert(1);
  }
  
  .social-links a:hover img {
    filter: none;
  }
  
  /* Footer Bottom */
  .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .copyright {
    font-size: 0.85rem;
    opacity: 0.85;
  }
  
  .legal-links {
    display: flex;
    gap: 1.5rem;
  }
  
  .legal-links a {
    color: #cbd5f5;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
  }
  
  .legal-links a:hover {
    text-decoration: underline;
  }
  
  /* RTL */
  body:dir(rtl) .legal-links {
    flex-direction: row-reverse;
  }
  
  /* Animated Logo */
  .animated-logo {
    font-family: 'SFLogo Regular', sans-serif;
    animation: logo-animation 4s infinite alternate ease-in-out;
    font-size: clamp(3.5rem, 10vw, 8rem);
    line-height: 1;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    gap: 0.02em;
    justify-content: center;
    align-items: center;
  }
  
  .animated-logo .line {
    display: block;
    width: auto;
  }
  
  /* Tilde Colors */
  header .logo .tilde {
    color: #F56721;
  }
  footer .logo .tilde {
    color: white;
  }
  
  /* LTR */
  body.en { direction: ltr; }
  a {
    text-decoration: none;
  }