.about-brief {
    padding: 80px 0;
    background-color: #f9f9f9;
    direction: rtl;
}

.about-brief h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #333;
    position: relative;
}

.about-brief h2:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: #009688;
    bottom: -15px;
    right: 50%;
    transform: translateX(50%);
}

/* More specific selector to increase specificity */
section.about-brief .about-content {
    display: flex;
    gap: 30px;
    align-items: center;
}
  /* Arabic layout with image left, text right */
  html[lang="ar"] .about-content {
      display: flex !important;
      flex-direction: row !important; /* Normal row direction */
  }

  html[lang="ar"] .about-text {
      order: 1 !important; /* Text goes second (right) */
      text-align: right !important; /* Text alignment remains right-to-left */
  }

  html[lang="ar"] .about-image {
      order: 2 !important; /* Image goes first (left) */
  }  /* Positioning image left, text right */
  .about-content {
      display: flex !important;
      flex-direction: row !important;
  }

  .about-text {
      order: 2 !important; /* Text positioned second (right) */
      text-align: left !important; /* Text justified from left to right */
  }

  .about-image {
      order: 1 !important; /* Image positioned first (left) */
  }
  
  /* English-specific text alignment */
  html[lang="en"] .about-text {
      text-align: left !important; /* Ensures text flows left-to-right in English */
  }

  /* Your existing rule for flex sizing remains unchanged */
  .about-text, .about-image {
      flex: 1;
      min-width: 45%;
  }
/* Reset layout on mobile */
@media (max-width: 768px) {
    .about-content {
      flex-direction: column !important;
    }
  
    .about-text, .about-image {
      order: unset !important;
      }
}
/* Base styling for paragraph text */
.about-text p {
      font-size: 18px;
      line-height: 1.7;
      margin-bottom: 30px;
      color: #555;
}

/* English-specific text alignment (LTR) */
html[lang="en"] .about-text p {
      text-align: left; /* Left alignment for English */
}

/* Arabic-specific text alignment (RTL) */
html[lang="ar"] .about-text p {
      text-align: right; /* Right alignment for Arabic */
}
.about-image-gallery {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Make the image square and add 3D effect */
.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 300px;  /* Set a fixed width */
    height: 300px; /* Equal height to make it square */
    margin: 0 auto;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.5s ease;
}

.about-image:hover {
    transform: rotateY(5deg) rotateX(5deg);
    box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.2), 
                -10px -10px 20px rgba(255, 255, 255, 0.5);
}

.about-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
    transform: translateZ(20px);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05) translateZ(10px);
}

@media (max-width: 768px) {
    .about-image-gallery {
        margin-bottom: 30px;
    }
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: #009688;
    border: 2px solid #009688;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #009688;
    color: white;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column-reverse;
    }
}

:root {
    --about-gap: 30px;
    --about-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    --accent-color: #009688;
}
