/* FOOTER STYLES */
footer{
  background:linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color:var(--white);
  padding:0;
}
.footer-top{
  padding:48px 0 36px;
  border-bottom:1px solid rgba(255,255,255,.2);
}
.footer-grid{
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr 1fr;
  gap:40px;
  align-items:start;
}
.footer-brand{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* ============================================== */
/* FOOTER BRAND STYLES - MATCHING HEADER EXACTLY */
/* ============================================== */

.footer-brand .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  transition: all 0.3s ease;
  padding: 0;
  margin-bottom: 20px;
  justify-content: flex-start;
}

.footer-brand .brand:hover {
  transform: translateY(-2px);
}

.footer-brand .brand-text {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.footer-brand .brand:hover .brand-text {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 6px 25px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.footer-brand .brand-en,
.footer-brand .brand-ar {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--white);
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  font-family: "Times New Roman", Times, serif;
}

.footer-brand .brand-ar {
  font-family: "Times New Roman", "Tajawal", "Cairo", serif;
  letter-spacing: 0;
}

/* Elegant separator between brand names */
.footer-brand .brand-separator {
  width: 2px;
  height: 28px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,0.7),
    transparent
  );
  border-radius: 2px;
}

/* Hover effects for brand text */
.footer-brand .brand:hover .brand-en,
.footer-brand .brand:hover .brand-ar {
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.footer-brand .brand:hover .brand-separator {
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,1),
    transparent
  );
}

/* Keep brand order same for RTL - don't flip */
[dir="rtl"] .footer-brand .brand-text {
  flex-direction: row; /* Keep English left, Arabic right */
}

.footer-brand p{
  color:rgba(255,255,255,.9);
  line-height:1.8;
  font-size:.98rem;
  margin-top:4px;
}
.footer-col{
  display:flex;
  flex-direction:column;
}
.footer-col h4{
  color:var(--white);
  font-weight:800;
  margin:0 0 20px;
  font-size:1.05rem;
  letter-spacing:.3px;
  border-bottom:2px solid rgba(255,255,255,.2);
  padding-bottom:10px;
  text-align:center;
}
.footer-col ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.footer-col li{
  line-height:1.5;
}
.footer-col a{
  color:rgba(255,255,255,.85);
  transition:all .2s;
  display:flex;
  align-items:center;
  font-size:.95rem;
  padding:4px 0;
  width:100%;
}

.footer-col a:hover{
  color:white;
  transform:translateX(5px);
}

[dir="rtl"] .footer-col a:hover{
  transform:translateX(-5px);
}

/* Fix for RTL footer links alignment */
[dir="rtl"] .footer-col {
  text-align: right;
}

[dir="rtl"] .footer-col a {
  justify-content: flex-end;
  text-align: right;
}

/* ARABIC SPECIFIC FIXES */
[lang="ar"] .footer-brand {
  text-align: right;
}

[lang="ar"] .footer-brand p {
  text-align: right;
  line-height: 1.7;
}

[lang="ar"] .footer-col h4 {
  text-align: center;
}

[lang="ar"] .footer-col ul {
  text-align: right;
}

[lang="ar"] .footer-col a {
  text-align: right;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  width: 100%;
}

[dir="rtl"] .footer-contact-item {
  flex-direction: row-reverse;
  text-align: right;
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
}

[dir="rtl"] .footer-contact-item svg {
  margin-left: 0;
  margin-right: 0;
}

.footer-contact-text {
  flex: 1;
  text-align: left;
}

[dir="rtl"] .footer-contact-text {
  text-align: right;
}

.phone-number {
  direction: ltr !important;
  text-align: left !important;
  font-family: monospace;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
  unicode-bidi: embed;
}

[dir="rtl"] .phone-number {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: embed;
}

/* WhatsApp link specific fix for Arabic */
[lang="ar"] .footer-contact-item a {
  text-align: right;
  display: inline-block;
  width: auto;
  max-width: 100%;
}

[lang="ar"] .footer-contact-text a {
  text-align: right;
  display: block;
  width: 100%;
}

/* Remove extra spacing in Arabic footer */
[lang="ar"] .footer-grid {
  gap: 30px;
}

[lang="ar"] .footer-brand {
  gap: 12px;
}

[lang="ar"] .footer-col h4 {
  margin-bottom: 15px;
  padding-bottom: 8px;
}

[lang="ar"] .footer-col ul {
  gap: 10px;
}

[lang="ar"] .footer-contact-item {
  margin-bottom: 10px;
  gap: 8px;
}

/* Make all footer columns perfectly aligned */
.footer-col ul li {
  display: flex;
  align-items: center;
}

[dir="rtl"] .footer-col ul li {
  justify-content: flex-end;
}

.footer-bottom{
  padding:24px 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
}
.footer-bottom .mini{
  color:rgba(255,255,255,.75);
  font-size:.9rem;
}

[lang="ar"] .footer-bottom .mini {
  text-align: right;
}

/* SOCIAL LINKS - WHITE CIRCLES WITH RED ICONS */
.social-links{
  display:flex;
  gap:12px;
  flex-wrap: wrap;
}
.social-links a{
  width:44px;
  height:44px;
  background:white;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--red);
  transition:all .3s;
  font-size:1.1rem;
  border:2px solid white;
}
.social-links a:hover{
  background:rgba(255,255,255,.9);
  color:var(--red-dark);
  transform:translateY(-3px) scale(1.1);
  border-color:white;
  box-shadow:0 8px 20px rgba(0,0,0,.3);
}
.social-links a svg{
  width:20px;
  height:20px;
}

/* Responsive adjustments for brand text */
@media (max-width: 1024px) {
  .footer-brand .brand-en,
  .footer-brand .brand-ar {
    font-size: 22px;
  }
  
  .footer-brand .brand-separator {
    height: 24px;
  }
  
  .footer-brand .brand-text {
    gap: 12px;
    padding: 6px 10px;
  }
}

/* TABLET RESPONSIVE */
@media (max-width: 980px){
  .footer-grid{
    grid-template-columns:1fr 1fr;
    gap:32px;
  }
  .footer-brand{
    grid-column:1/-1;
  }
  .footer-top{
    padding:40px 0 32px;
  }
  
  .footer-brand .brand-en,
  .footer-brand .brand-ar {
    font-size: 20px;
    letter-spacing: 1px;
  }
  
  .footer-brand .brand-separator {
    height: 22px;
  }
  
  .footer-brand .brand-text {
    gap: 10px;
    padding: 6px 10px;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    gap: 24px;
  }
  
  .footer-col h4 {
    margin-bottom: 15px;
  }
  
  .footer-col ul {
    gap: 10px;
  }
  
  .footer-top{
    padding:36px 0 28px;
  }
  
  .footer-bottom{
    padding:20px 0;
  }
  
  /* Social links responsive */
  .social-links{
    gap:10px;
  }
  
  .social-links a{
    width:40px;
    height:40px;
  }
  
  .social-links a svg{
    width:18px;
    height:18px;
  }
  
  .footer-brand .brand-en,
  .footer-brand .brand-ar {
    font-size: 18px;
  }
  
  .footer-brand .brand-separator {
    height: 20px;
  }
  
  /* Arabic mobile fixes */
  [lang="ar"] .footer-grid {
    gap: 25px;
  }
  
  [lang="ar"] .footer-col h4 {
    text-align: center;
  }
  
  [lang="ar"] .footer-col ul {
    text-align: center;
  }
  
  [lang="ar"] .footer-col a {
    justify-content: center;
  }
}

/* MOBILE RESPONSIVE */
@media (max-width: 580px){
  .footer-grid{
    grid-template-columns:1fr;
    gap:30px;
  }
  
  .footer-top{
    padding:32px 0 24px;
  }
  
  .footer-bottom{
    justify-content:center;
    text-align:center;
    padding:18px 0;
  }
  
  .footer-bottom > div:first-child{
    text-align:center;
    width:100%;
  }
  
  .footer-bottom .mini{
    font-size:.85rem;
  }
  
  /* Social links mobile */
  .social-links{
    justify-content:center;
    width:100%;
    gap:10px;
  }
  
  .social-links a{
    width:48px;
    height:48px;
  }
  
  .social-links a svg{
    width:22px;
    height:22px;
  }
  
  .footer-brand .brand {
    justify-content: center;
  }
  
  .footer-brand .brand-text {
    justify-content: center;
  }
  
  .footer-brand .brand-en,
  .footer-brand .brand-ar {
    font-size: 16px;
  }
  
  .footer-brand .brand-separator {
    height: 18px;
  }
  
  .footer-col {
    text-align: center;
  }
  
  [dir="rtl"] .footer-col {
    text-align: center;
  }
  
  .footer-col a {
    justify-content: center;
  }
  
  [dir="rtl"] .footer-col a {
    justify-content: center;
  }
  
  .footer-contact-item {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 5px;
  }
  
  [dir="rtl"] .footer-contact-item {
    flex-direction: column;
    text-align: center;
  }
  
  .phone-number {
    text-align: center !important;
    margin: 0 auto;
  }
  
  [lang="ar"] .footer-contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  [lang="ar"] .footer-contact-text {
    text-align: center;
  }
  
  [lang="ar"] .footer-contact-text a {
    text-align: center;
  }
}

/* EXTRA SMALL MOBILE */
@media (max-width: 380px){
  .social-links a{
    width:44px;
    height:44px;
  }
  
  .social-links a svg{
    width:20px;
    height:20px;
  }
  
  .footer-brand .brand-en,
  .footer-brand .brand-ar {
    font-size: 14px;
  }
  
  .footer-brand .brand-separator {
    height: 16px;
  }
  
  .footer-brand .brand-text {
    gap: 8px;
    padding: 4px 8px;
  }
  
  .footer-bottom .mini{
    font-size:.8rem;
  }
}

.social-links{
    display:flex;
    gap:12px;
  }
  .social-links a{
    width:44px;
    height:44px;
    background:rgba(255,255,255,.25);
    border-radius:50%;
    display:grid;
    place-items:center;
    color:white;
    transition:all .3s;
    font-size:1.1rem;
    border:2px solid rgba(255,255,255,.3);
  }
  .social-links a:hover{
    background:white;
    color:var(--red);
    transform:translateY(-3px) scale(1.1);
    border-color:white;
    box-shadow:0 8px 20px rgba(0,0,0,.2);
  }
  .social-links a svg{
    width:20px;
    height:20px;
  }