/* Modern Graphy Footer Styles */
.graphy-footer {
  background: linear-gradient(135deg, #1a3c6c 0%, #0f2a4e 100%);
  color: #6b7280;
  padding: 4rem 2rem 6rem;
  padding-bottom: 25px;
  margin: 2rem;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.graphy-footer.footer-visible {
  transform: translateY(0);
  opacity: 1;
}

.graphy-footer:not(.footer-visible) {
  transform: translateY(50px);
  opacity: 0;
}

/* Animated Background Elements */
.footer-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.floating-particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: particle-float 8s linear infinite;
}

@keyframes particle-float {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(1);
    opacity: 0;
  }
}

/* Generate random positions for particles */
.particle-1 { left: 10%; animation-delay: 0s; }
.particle-2 { left: 20%; animation-delay: 0.5s; }
.particle-3 { left: 30%; animation-delay: 1s; }
.particle-4 { left: 40%; animation-delay: 1.5s; }
.particle-5 { left: 50%; animation-delay: 2s; }
.particle-6 { left: 60%; animation-delay: 2.5s; }
.particle-7 { left: 70%; animation-delay: 3s; }
.particle-8 { left: 80%; animation-delay: 3.5s; }
.particle-9 { left: 90%; animation-delay: 4s; }
.particle-10 { left: 15%; animation-delay: 4.5s; }
.particle-11 { left: 25%; animation-delay: 5s; }
.particle-12 { left: 35%; animation-delay: 5.5s; }
.particle-13 { left: 45%; animation-delay: 6s; }
.particle-14 { left: 55%; animation-delay: 6.5s; }
.particle-15 { left: 65%; animation-delay: 7s; }
.particle-16 { left: 75%; animation-delay: 7.5s; }
.particle-17 { left: 85%; animation-delay: 8s; }
.particle-18 { left: 95%; animation-delay: 8.5s; }
.particle-19 { left: 5%; animation-delay: 9s; }
.particle-20 { left: 95%; animation-delay: 9.5s; }

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  position: relative;
  z-index: 2;
}

/* Newsletter Section */
.footer-newsletter {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.footer-newsletter:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.newsletter-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
}

.newsletter-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00a69c, #1a3c6c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.newsletter-text h3 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.newsletter-text p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  min-width: 300px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
  outline: none;
  border-color: #00a69c;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.newsletter-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #00a69c, #1a3c6c);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Footer Main Section */
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

/* Company Info */
.company-info {
  max-width: 320px;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.footer-logo:hover {
  transform: scale(1.05);
}

.logo-container {
  position: relative;
  margin-right: 1rem;
}

[dir='rtl'] .logo-container {
  margin-left: 1rem;
  margin-right: 0;
}

.logo-img {
  width: 70px;
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
  transform: translateY(-3.5px);
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #00a69c 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.footer-logo:hover .logo-glow {
  opacity: 0.6;
  animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Contact Information */
.footer-contact {
    display: flex;
    margin: 2rem 0;
    justify-content: space-between;
    flex-direction: row-reverse;
    flex-wrap: wrap;
}

.footer-contact .contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1.5rem 0.75rem;
  width: 31.5%;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  transition: all 0.3s ease;
}

.footer-contact .contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.footer-contact .contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, #00a69c, #1a3c6c);
  transition: all 0.4s ease;
}

.contact-item:hover .contact-icon {
  transform: scale(1.1);
}

/* Contact Details Styling */
.contact-details {
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.9);
  gap: 0.25rem;
  flex: 1;
  margin-left: 20px;
}

[dir='rtl'] .contact-details {
  margin-left: 0;
  margin-right: 20px;
}

.contact-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.1rem;
}

.contact-value {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.contact-value:hover {
  color: #00a69c;
  text-decoration: none;
  transform: translateX(3px);
}

/* Phone number specific styling */
.contact-value[href^="tel:"] {
  direction: ltr;
  text-align: left;
}

[dir='rtl'] .contact-value[href^="tel:"] {
  text-align: right;
}

.footer-description {
  color: #ffffffc2;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Footer Column Titles */
.footer-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.title-icon {
  color: #00a69c;
  font-size: 1.1rem;
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 1rem;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.footer-links li:hover {
  transform: translateX(8px);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  display: block;
  position: relative;
  transition: all 0.3s ease;
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: #00a69c;
  transition: width 0.3s ease;
}

[dir='rtl'] .footer-links a::before {
  left: unset;
  right: -15px;
}

.footer-links a:hover {
  color: #ffffff !important;
  text-decoration: none;
  padding-left: 1rem;
}

.footer-links a:hover::before {
  width: 12px;
}

/* Social Media */
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #00a69c, #1a3c6c);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.social-link i {
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.social-link:hover {
  color: #ffffff;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.social-link:hover::before {
  opacity: 1;
}

.social-link:hover i {
  transform: scale(1.2);
}

/* Social platform specific colors */
.social-link.twitter:hover::before {
  background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.social-link.instagram:hover::before {
  background: linear-gradient(135deg, #e4405f, #833ab4, #fcb045);
}

.social-link.linkedin:hover::before {
  background: linear-gradient(135deg, #0077b5, #005885);
}

.social-link.facebook:hover::before {
  background: linear-gradient(135deg, #1877f2, #166fe5);
}

.social-link.whatsapp:hover::before {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

/* Social tooltips */
.social-tooltip {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10;
}

.social-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid rgba(0, 0, 0, 0.8);
}

.social-link:hover .social-tooltip {
  opacity: 1;
  bottom: -45px;
}

/* Footer Bottom */
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 2;
  margin-top: 2rem;
}

.footer-bottom-container {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.copyright {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copyright-icon {
  color: #00a69c;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

.footer-bottom-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #00a69c;
  transition: width 0.3s ease;
}

.footer-bottom-links a:hover {
  color: #ffffff;
}

.footer-bottom-links a:hover::after {
  width: 100%;
}

/* Language Selector */
.footer-language {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
}

.language-selector-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
  width: 120px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-selector-wrapper:hover {
  border-color: #00a69c;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.language-selector-wrapper:focus-within {
  border-color: #00a69c;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.language-icon {
  color: white;
  font-size: 1.1rem;
  margin-left: 0.8rem;
}

[dir="rtl"] .language-icon {
  margin-right: 0.8rem;
}

.language-arrow {
  color: white;
  font-size: 0.8rem;
  margin-right: 0.8rem;
  pointer-events: none;
}

[dir="rtl"] .language-arrow {
  margin-left: 0.8rem;
}

.language-selector {
  background: transparent;
  position: absolute;
  border: none;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  height: 100%;
  text-align: center;
  font-weight: 500;
  transition: all 0.2s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1.4;
}

.language-selector:focus {
  outline: none;
}

.language-selector option {
  background: #2a2a3e !important;
  color: white !important;
  padding: 8px 12px !important;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 2px 0;
  line-height: 1.5;
}

.language-selector option:hover {
  background: #3a3a5e !important;
  color: white !important;
}

.language-selector option:checked,
.language-selector option:selected {
  background: #4a4a7e !important;
  color: white !important;
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* تحسين مظهر القائمة المنسدلة في المتصفحات المختلفة */
.language-selector::-ms-expand {
  display: none;
}

/* تحسين مظهر القائمة في Firefox */
@-moz-document url-prefix() {
  .language-selector {
    text-indent: 0.01px;
    text-overflow: '';
  }
  
  .language-selector option {
    background: #2c2c54;
    color: white;
  }
}

/* تحسين مظهر القائمة في WebKit browsers */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  .language-selector {
    padding-right: 0;
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .newsletter-form {
    justify-self: center;
  }
}

@media (max-width: 992px) {
    .newsletter-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
        justify-items: center;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
  }
  .footer-logo {
    justify-content: center;
  }
  
  .company-info {
    grid-column: 1 / -1;
    max-width: none;
    margin-bottom: 1rem;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  .footer-column {
    text-align: center;
  }

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

  
  .footer-bottom-container {
    grid-template-columns: auto auto;
    text-align: center;
    gap: 1.5rem;
  }
  .footer-bottom-links {
    gap: 0.5rem!important;
  }
  
  .footer-language {
    justify-self: center;
  }
}

@media (max-width: 768px) {
  .graphy-footer {
    padding: 3rem 1.5rem 5rem;
    margin: 1rem 1rem 3rem;
    border-radius: 16px;
  }
  
  .footer-newsletter {
    padding: 2rem 1.5rem;
  }
  
  .newsletter-form {
    flex-direction: column;
    min-width: auto;
    width: 100%;
  }
  
  .newsletter-btn {
    justify-content: center;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-contact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transition: all 0.3s ease;
  }
  
  .footer-contact .contact-item {
    justify-content: center;
    min-width: 100%;
    margin-bottom: 0;
    border: unset;
    border-radius: unset;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  .footer-contact .contact-item:last-child {
    border: unset;
  }
  
  .footer-social {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .floating-shape {
    display: none;
  }
  
  .particle {
    display: none;
  }
  .footer-bottom-container{
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .logo-img{
    width: 100px;
  }
  .graphy-footer {
    padding: 2rem 1rem 4rem;
    margin: 0.5rem 0.5rem 2rem;
    border-radius: 12px;
  }
  
  .footer-newsletter {
    padding: 1.5rem 1rem;
  }
  
  .newsletter-text h3 {
    font-size: 1.2rem;
  }
  
  .newsletter-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  
  .footer-main {
    gap: 2rem;
  }
  
  .footer-logo {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .logo-container {
    margin-right: 0;
  }

  .footer-contact {
    margin: 1.5rem 0;
  }
  
  .contact-item {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  
  .contact-label {
    font-size: 0.75rem;
  }
  
  .contact-value {
    font-size: 0.85rem;
  }
  
  .footer-social {
    gap: 0.75rem;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .social-tooltip {
    display: none;
  }
  
  .footer-title {
    font-size: 1.1rem;
    text-align: center;
    justify-content: center;
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-links li:hover {
    transform: none;
  }
  
  .footer-links a:hover {
    padding-left: 0;
  }
  
  .footer-links a::before {
    display: none;
  }
  
  .footer-bottom-links {
    flex-direction: column;
  }
  
  .language-selector {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  .graphy-footer {
    margin: 0.25rem;
    padding: 1.5rem 0.75rem 3rem;
  }
  
  .footer-newsletter {
    padding: 1rem 0.75rem;
  }
  
  .newsletter-form {
    gap: 0.75rem;
  }
  
  .newsletter-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .footer-main {
    gap: 1.5rem;
  }
  
  .footer-social {
    gap: 0.5rem;
  }
  
  .social-link {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .contact-details {
    gap: 0.15rem;
  }
  
  .contact-label {
    font-size: 0.7rem;
  }
  
  .contact-value {
    font-size: 0.8rem;
  }
}