/**
 * Components CSS - Footer (Simplified)
 * Simple 2-column footer design with background
 */

/* ============================================
   Site Footer
   ============================================ */

.site-footer {
  background-color: var(--footer-bg-color);
  background-image: var(--footer-bg-image);
  background-size: 65%;

  background-position: left left;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
  position: relative;
  padding: 50px 0 25px;
  margin-top: 90px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Overlay for better text readability */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 47, 95, 0.85);
  z-index: 0;
}

.site-footer > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   Footer Container
   ============================================ */
.footer-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 30px;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* ============================================
   Footer Column
   ============================================ */
.footer-column {
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}

.footer-title {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--footer-heading-color);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--footer-border-color);
}

/* ============================================
   Contact Information
   ============================================ */
.footer-contact .contact-details {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 100%;
}

/* Desktop and larger screens */
@media (min-width: 769px) {
  .footer-contact .contact-details {
    flex-wrap: wrap;
    justify-content: flex-start;
    max-width: 100%;
    gap: 18px;
  }

  .footer-contact .address,
  .footer-contact .phone,
  .footer-contact .email {
    flex-shrink: 1;
    min-width: fit-content;
    white-space: nowrap;
  }
}

/* Large desktop screens */
@media (min-width: 1200px) {
  .footer-contact .contact-details {
    gap: 20px;
  }
}

.footer-contact .university-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--footer-heading-color);
  margin: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-contact .university-name i {
  font-size: 1.2rem;
  opacity: 0.9;
}

.footer-contact .address,
.footer-contact .phone,
.footer-contact .email,
.footer-contact .registration {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--footer-text-color);
  opacity: 0.95;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* Add separator between contact elements */
.footer-contact .contact-details > *:not(:first-child) {
  position: relative;
  padding-left: 12px;
}

.footer-contact .contact-details > *:not(:first-child)::before {
  content: " | ";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--footer-text-color);
  opacity: 0.6;
  font-size: 0.9em;
  font-weight: normal;
  line-height: inherit;
}

.footer-contact .address i,
.footer-contact .phone i,
.footer-contact .email i {
  font-size: 1rem;
  opacity: 0.8;
  margin-top: 0.2em;
  flex-shrink: 0;
}

.footer-contact .phone a,
.footer-contact .email a {
  color: var(--footer-link-color);
  text-decoration: none;
  transition: var(--transition-default);
  opacity: 0.95;
}

.footer-contact .phone a:hover,
.footer-contact .phone a:focus,
.footer-contact .email a:hover,
.footer-contact .email a:focus {
  color: var(--footer-link-hover-color);
  text-decoration: none;
  opacity: 1;
}

/* ============================================
   Links & Social
   ============================================ */
.footer-links-social .footer-nav {
  margin: 0 0 30px 0;
  padding: 0;
}

.footer-nav-horizontal .nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0;
  margin: 0;
  gap: 20px;
  list-style: none;
  justify-content: flex-start;
}

.footer-nav-horizontal .nav-menu a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--footer-link-color);
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition-default);
  line-height: 1.4;
  opacity: 0.95;
  white-space: nowrap;
}

.footer-nav-horizontal .nav-menu a:hover,
.footer-nav-horizontal .nav-menu a:focus {
  color: var(--footer-link-hover-color);
  text-decoration: none;
  opacity: 1;
  transform: translateY(-2px);
}

/* Social Section */
.social-section {
  margin-top: 20px;
}

.social-title {
  margin: 0 0 15px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--footer-heading-color);
  opacity: 0.9;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  color: var(--footer-text-color);
  text-decoration: none;
  transition: var(--transition-default);
  opacity: 0.9;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-icon:hover,
.social-icon:focus {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--footer-link-hover-color);
  opacity: 1;
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4);
}

.social-icon i {
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ============================================
   Copyright
   ============================================ */
/* Registration Number */
.footer-registration {
  text-align: center;
  margin: 15px 0;
  font-size: 0.85rem;
  color: var(--footer-text-color);
  opacity: 0.8;
}

.footer-registration .registration-label {
  font-weight: 500;
  margin-right: 5px;
}

.footer-registration .registration-number {
  font-family: monospace;
  font-weight: 600;
  color: var(--footer-heading-color);
}

.footer-copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--footer-border-color);
  text-align: center;
}

.footer-copyright p {
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--footer-text-color);
  line-height: 1.6;
  opacity: 0.9;
}

.footer-copyright .site-name {
  font-weight: 600;
  color: var(--footer-heading-color);
  opacity: 1;
}

/* ============================================
   RTL Support for Arabic
   ============================================ */
[dir="rtl"] .footer-container {
  direction: rtl;
}

[dir="rtl"] .footer-nav-horizontal .nav-menu {
  justify-content: flex-start;
  direction: rtl;
}

[dir="rtl"] .footer-contact .university-name,
[dir="rtl"] .footer-contact .address,
[dir="rtl"] .footer-contact .phone,
[dir="rtl"] .footer-contact .email,
[dir="rtl"] .footer-contact .registration {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-contact .contact-details > *:not(:first-child) {
  position: relative;
  padding-right: 12px;
  padding-left: 0;
}

[dir="rtl"] .footer-contact .contact-details > *:not(:first-child)::before {
  content: " | ";
  position: absolute;
  right: 0;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  color: var(--footer-text-color);
  opacity: 0.6;
  font-size: 0.9em;
  font-weight: normal;
  line-height: inherit;
}

[dir="rtl"] .footer-contact .phone a {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}

[dir="rtl"] .phone a {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}

[dir="rtl"] .social-icons {
  justify-content: flex-start;
}

[dir="rtl"] .footer-registration .registration-label {
  margin-right: 0;
  margin-left: 5px;
}

[dir="rtl"] .footer-copyright p {
  text-align: center;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Mobile */
@media (max-width: 768px) {
  .site-footer {
    padding: 30px 0 20px;
    margin-top: 60px;
    background-size: cover;

    background-position: left left;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 20px;
    background-size: cover;

    background-position: left left;
  }

  .footer-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
  }

  .footer-contact .contact-details {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
  }

  .footer-contact .address,
  .footer-contact .phone,
  .footer-contact .email {
    font-size: 0.9rem;
    justify-content: center;
    text-align: center;
  }

  .footer-nav-horizontal .nav-menu {
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-nav-horizontal .nav-menu a {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .social-section {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
    gap: 12px;
  }

  .social-icon {
    width: 38px;
    height: 38px;
  }

  .footer-copyright p {
    font-size: 0.85rem;
  }

  /* RTL Mobile */
  [dir="rtl"] .footer-nav-horizontal .nav-menu {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row-reverse;
    align-content: center;
  }

  [dir="rtl"] .footer-contact .university-name,
  [dir="rtl"] .footer-contact .address,
  [dir="rtl"] .footer-contact .phone,
  [dir="rtl"] .footer-contact .email {
    flex-direction: row;
    justify-content: center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .site-footer {
    padding: 25px 0 15px;
    margin-top: 50px;
  }

  .footer-container {
    padding: 0 15px;
    gap: 20px;
  }

  .footer-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .footer-contact .contact-details {
    gap: 6px;
  }

  .footer-contact .university-name {
    font-size: 0.8rem;
  }

  .footer-contact .address,
  .footer-contact .phone,
  .footer-contact .email {
    font-size: 0.75rem;
  }

  .footer-nav-horizontal .nav-menu {
    gap: 8px;
    flex-direction: column;
    align-items: center;
  }

  [dir="rtl"] .footer-nav-horizontal .nav-menu {
    align-items: center;
  }

  .footer-nav-horizontal .nav-menu a {
    font-size: 0.8rem;
    padding: 5px 8px;
  }

  .social-icons {
    justify-content: center;
    gap: 10px;
  }

  [dir="rtl"] .social-icons {
    justify-content: center;
  }

  .social-icon {
    width: 35px;
    height: 35px;
  }

  .social-icon i {
    font-size: 1rem;
  }

  .footer-copyright p {
    font-size: 0.8rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .site-footer {
    padding: 20px 0 15px;
    margin-top: 40px;
  }

  .footer-container {
    padding: 0 10px;
    gap: 15px;
  }

  .footer-title {
    font-size: 0.95rem;
  }

  .footer-contact .contact-details {
    gap: 4px;
  }

  .footer-contact .university-name {
    font-size: 0.75rem;
  }

  .footer-contact .address,
  .footer-contact .phone,
  .footer-contact .email {
    font-size: 0.7rem;
  }

  .footer-nav-horizontal .nav-menu a {
    font-size: 0.75rem;
    padding: 4px 6px;
  }

  .social-icon {
    width: 32px;
    height: 32px;
  }

  .social-icon i {
    font-size: 0.9rem;
  }

  .footer-copyright p {
    font-size: 0.75rem;
  }
}
