/* ========================================
   📱 RESPONSIVE CSS - توحيد Media Queries
   ======================================== */

/* ========================================
   🎯 نقاط التوقف الموحدة
   ======================================== */

/* 
   Mobile First Approach:
   - Base styles for mobile (< 576px)
   - Tablet: 576px - 1023px
   - Desktop: 1024px+
   
   Breakpoints:
   - sm: 576px (Small devices)
   - md: 768px (Medium devices - tablets)
   - lg: 1024px (Large devices - desktops)
   - xl: 1200px (Extra large - wide desktops)
*/

/* ========================================
   🖱️ DESKTOP HOVER EFFECTS (1024px+)
   ======================================== */

@media (hover: hover) and (pointer: fine) {
  /* ✅ Hover للأزرار */
  .btn-primary:hover,
  .btn-primary-medium:hover,
  .btn-primary-small:hover,
  .btn-cta-gold:hover,
  .btn-cta-outline:hover,
  .open-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 81, 50, 0.2);
    transition: all 0.3s ease;
  }

  /* ✅ Hover للكروت */
  .card-link:hover,
  .article-card:hover,
  .service-card:hover,
  .blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
  }

  /* ✅ Hover للروابط */
  .link-primary:hover,
  .link-white:hover,
  .link-primary-line:hover,
  .link-white-line:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
  }

  /* ✅ Hover للأيقونات */
  .icon-accent:hover,
  .icon-success:hover,
  .icon-primary:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
  }

  /* ✅ Hover للشهادات */
  .testimonial:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

  /* ✅ Hover للفريق */
  .member:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

  /* ✅ Hover للخدمات */
  .service-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(15, 81, 50, 0.1);
    transition: all 0.3s ease;
  }

  /* ✅ Hover للـ FAQ */
  .faq-item:hover {
    background: rgba(15, 81, 50, 0.05);
    transition: background 0.3s ease;
  }

  /* ✅ Hover للـ Navigation */
  .nav-links a:hover {
    color: var(--accent);
    transition: color 0.3s ease;
  }

  /* ✅ Hover للـ Footer Links */
  .footer a:hover {
    color: var(--accent);
    transition: color 0.3s ease;
  }
}

/* ========================================
   📱 MOBILE TOUCH EFFECTS (< 576px)
   ======================================== */

@media (hover: none) and (pointer: coarse) {
  /* ✅ Active للأزرار - تأثير ضغط خفيف */
  .btn-primary:active,
  .btn-primary-medium:active,
  .btn-primary-small:active,
  .btn-cta-gold:active,
  .btn-cta-outline:active,
  .open-modal:active {
    transform: scale(0.98);
    opacity: 0.95;
    transition: all 0.1s ease;
  }

  /* ✅ Active للكروت */
  .card-link:active,
  .article-card:active,
  .service-card:active,
  .blog-card:active {
    transform: scale(0.98);
    opacity: 0.95;
    transition: all 0.1s ease;
  }

  /* ✅ Active للروابط */
  .link-primary:active,
  .link-white:active,
  .link-primary-line:active,
  .link-white-line:active {
    opacity: 0.7;
    transition: opacity 0.1s ease;
  }

  /* ✅ Active للأيقونات */
  .icon-accent:active,
  .icon-success:active,
  .icon-primary:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  /* ✅ Active للشهادات */
  .testimonial:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* ✅ Active للفريق */
  .member:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* ✅ Active للخدمات */
  .service-item:active {
    background: rgba(15, 81, 50, 0.05);
    transition: background 0.1s ease;
  }

  /* ✅ Active للـ FAQ */
  .faq-item:active {
    background: rgba(15, 81, 50, 0.08);
    transition: background 0.1s ease;
  }

  /* ✅ Remove hover effects on mobile */
  .btn-primary:hover,
  .btn-primary-medium:hover,
  .btn-primary-small:hover,
  .btn-cta-gold:hover,
  .btn-cta-outline:hover,
  .open-modal:hover,
  .card-link:hover,
  .article-card:hover,
  .service-card:hover,
  .blog-card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ========================================
   📱 SMALL MOBILE (< 576px)
   ======================================== */

@media (max-width: 575px) {
  /* ✅ الهوامش والمسافات */
  .mb-30,
  .mb-40 {
    margin-bottom: 15px;
  }

  .mt-40 {
    margin-top: 15px;
  }

  /* ✅ الأزرار */
  .btn-primary,
  .btn-primary-medium,
  .btn-cta-gold,
  .btn-cta-outline {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95em;
    min-height: 44px; /* Touch friendly */
  }

  /* ✅ الكروت */
  .card-link,
  .article-card,
  .service-card,
  .blog-card {
    padding: 12px;
    margin-bottom: 10px;
  }

  /* ✅ الصناديق */
  .box-light,
  .box-info,
  .box-highlight,
  .box-highlight-alt {
    padding: 12px;
    margin-bottom: 15px;
  }
  .box-light {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


  .box-light .btn {
  width: fit-content;
}




  /* ✅ النصوص */
  .text-large {
    font-size: 1.2em;
    margin-bottom: 8px;
  }

  .text-small-gray,
  .text-small-bold {
    font-size: 0.9em;
  }

  /* ✅ الأيقونات */
  .icon-accent,
  .icon-success,
  .icon-primary,
  .icon-primary-small {
    margin-left: 5px;
  }

  /* ✅ المقالات */
  .article-container {
    padding: 20px 5% 20px;
  }

  /* ✅ الشهادات */
  .testimonial-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* ✅ الفريق */
  .team-member-avatar {
    height: 120px;
    font-size: 2.5rem;
  }

  /* ✅ الجداول */
  .table-cell,
  .table-cell-right {
    padding: 8px;
    font-size: 0.9em;
  }

  /* ✅ الأزرار العائمة */
  .btn-floating {
    width: 45px;
    height: 45px;
    font-size: 20px;
    bottom: 15px;
    left: 15px;
  }

  /* ✅ الروابط */
  .link-primary,
  .link-white,
  .link-primary-line,
  .link-white-line {
    font-size: 0.95em;
    line-height: 1.8;
  }

  /* ✅ القوائم */
  .list-reset {
    font-size: 0.95em;
  }

  /* ✅ الـ Navigation */
  .nav-links {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links a {
    padding: 10px 0;
    display: block;
  }

  /* ✅ الـ Header */
  .header-left {
    gap: 8px;
  }

  /* ✅ الـ Footer */
  .footer-content {
    flex-direction: column;
    gap: 20px;
  }

  .footer-section {
    margin-bottom: 15px;
  }

  /* ✅ الـ Sections */
  section {
    padding: 20px 5%;
  }

  .container {
    padding: 0 5%;
  }
}

@media (min-width: 768px) {
  .box-light {
    flex-direction: row;
    align-items: center;
    gap: 15px;
  }
}

/* ========================================
   📱 TABLET (576px - 1023px)
   ======================================== */

@media (min-width: 576px) and (max-width: 1023px) {
  /* ✅ الهوامش والمسافات */
  .mb-30,
  .mb-40 {
    margin-bottom: 20px;
  }

  .mt-40 {
    margin-top: 20px;
  }

  /* ✅ الأزرار */
  .btn-primary,
  .btn-primary-medium,
  .btn-cta-gold,
  .btn-cta-outline {
    padding: 12px 20px;
    font-size: 0.95em;
    min-height: 44px; /* Touch friendly */
  }

  /* ✅ الكروت */
  .card-link,
  .article-card,
  .service-card,
  .blog-card {
    padding: 15px;
    margin-bottom: 15px;
  }

  /* ✅ الصناديق */
  .box-light,
  .box-info,
  .box-highlight,
  .box-highlight-alt {
    padding: 15px;
    margin-bottom: 20px;
  }

  /* ✅ النصوص */
  .text-large {
    font-size: 1.3em;
    margin-bottom: 10px;
  }

  /* ✅ الأيقونات */
  .icon-accent,
  .icon-success,
  .icon-primary,
  .icon-primary-small {
    margin-left: 6px;
  }

  /* ✅ المقالات */
  .article-container {
    padding: 60px 5% 40px;
  }

  /* ✅ الشهادات */
  .testimonial-avatar {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  /* ✅ الفريق */
  .team-member-avatar {
    height: 150px;
    font-size: 3rem;
  }

  /* ✅ الجداول */
  .table-cell,
  .table-cell-right {
    padding: 10px;
    font-size: 0.95em;
  }

  /* ✅ الأزرار العائمة */
  .btn-floating {
    width: 50px;
    height: 50px;
    font-size: 24px;
    bottom: 20px;
    left: 20px;
  }

  /* ✅ الـ Navigation */
  .nav-links {
    flex-direction: row;
    gap: 15px;
  }

  .nav-links a {
    padding: 8px 12px;
  }

  /* ✅ الـ Header */
  .header-left {
    gap: 10px;
  }

  /* ✅ الـ Footer */
  .footer-content {
    flex-direction: row;
    gap: 30px;
  }

  .footer-section {
    flex: 1;
  }

  /* ✅ الـ Sections */
  section {
    padding: 30px 5%;
  }

  .container {
    padding: 0 5%;
  }

  /* ✅ Grid Layouts */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   🖥️ DESKTOP (1024px+)
   ======================================== */

@media (min-width: 1024px) {
  /* ✅ الهوامش والمسافات */
  .mb-30,
  .mb-40 {
    margin-bottom: 30px;
  }

  .mt-40 {
    margin-top: 40px;
  }

  /* ✅ الأزرار */
  .btn-primary,
  .btn-primary-medium,
  .btn-cta-gold,
  .btn-cta-outline {
    padding: 12px 24px;
    font-size: 1em;
    min-height: 44px;
  }

  /* ✅ الكروت */
  .card-link,
  .article-card,
  .service-card,
  .blog-card {
    padding: 20px;
    margin-bottom: 20px;
  }

  /* ✅ الصناديق */
  .box-light,
  .box-info,
  .box-highlight,
  .box-highlight-alt {
    padding: 20px;
    margin-bottom: 30px;
  }

  /* ✅ النصوص */
  .text-large {
    font-size: 1.5em;
    margin-bottom: 10px;
  }

  /* ✅ الأيقونات */
  .icon-accent,
  .icon-success,
  .icon-primary,
  .icon-primary-small {
    margin-left: 8px;
  }

  /* ✅ المقالات */
  .article-container {
    padding: 100px 5% 60px;
    max-width: 900px;
  }

  /* ✅ الشهادات */
  .testimonial-avatar {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }

  /* ✅ الفريق */
  .team-member-avatar {
    height: 200px;
    font-size: 4rem;
  }

  /* ✅ الجداول */
  .table-cell,
  .table-cell-right {
    padding: 12px;
    font-size: 1em;
  }

  /* ✅ الأزرار العائمة */
  .btn-floating {
    width: 60px;
    height: 60px;
    font-size: 30px;
    bottom: 20px;
    left: 20px;
  }

  /* ✅ الـ Navigation */
  .nav-links {
    flex-direction: row;
    gap: 20px;
  }

  .nav-links a {
    padding: 10px 15px;
  }

  /* ✅ الـ Header */
  .header-left {
    gap: 12px;
  }

  /* ✅ الـ Footer */
  .footer-content {
    flex-direction: row;
    gap: 40px;
  }

  .footer-section {
    flex: 1;
  }

  /* ✅ الـ Sections */
  section {
    padding: 50px 5%;
  }

  .container {
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto;
  }

  /* ✅ Grid Layouts */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   🖥️ EXTRA LARGE DESKTOP (1200px+)
   ======================================== */

@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }

  section {
    padding: 60px 5%;
  }

  .article-container {
    padding: 120px 5% 80px;
    max-width: 1000px;
  }
}

/* ========================================
   ⚠️ PRINT STYLES
   ======================================== */

@media print {
  .btn-floating,
  .nav-toggle,
  .open-modal,
  .header-left {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}


/* TABLET */
/*@media (max-width: 1024px) {
  .hero-cards,
  .services .cards,
  .articles-grid {
    grid-template-columns: repeat(2,1fr);
  }
}*/

/* MOBILE */
/*@media (max-width: 768px) {
  .hero-cards,
  .services .cards,
  .articles-grid {
    grid-template-columns: 1fr;
  }*/
  
  @media (min-width: 576px) and (max-width: 1023px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
 
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    right: -100%;
    top: 70px;
    width: 80%;
    height: calc(100vh - 70px);
  }

  .nav-links.active {
    right: 0;
  }
}




@media (max-width: 575px) {
  .post-footer {
    flex-direction: column;
  }

  .post-footer .btn {
    width: 100%;
    text-align: center;
  }
}


.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 575px) {
  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
  }
}

.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}