/**
 * Modern Footer Styles with Blueprint Animation
 * 
 * A responsive footer design with RTL (Right-to-Left) support for Hebrew language websites
 * Features animated blueprint background, multiple navigation columns, and contact information
 * Enhanced for mobile devices with optimized layout and touch targets
 * 
 * @WebDev
 * @version 4.3
 */

/* CSS Variables for Theme Customization */
:root {
  /* Primary Colors */
  --footer-bg-start: #0e1a2d;
  --footer-bg-middle: #1a2a3a;
  --footer-bg-end: #0e1d35;
  --footer-text: #F8F9FA;
  --accent-gold: #D4AF37;
  --accent-blue: #4A90E2;
  --accent-light-blue: #56CCF2;
  
  /* Opacities */
  --low-opacity: 0.03;
  --medium-opacity: 0.3;
  --high-opacity: 0.7;
  
  /* Fonts */
  --footer-font: 'Heebo', sans-serif;
  
  /* Sizes */
  --footer-padding-vertical: 80px;
  --footer-padding-horizontal: 30px;
  --section-gap: 60px;
  --content-max-width: 1400px;
  
  /* Shadows & Effects */
  --footer-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  --element-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  --hover-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-bezier: 0.3s cubic-bezier(0.33, 1, 0.68, 1);
  
  /* Breakpoints */
  --breakpoint-desktop: 1200px;
  --breakpoint-tablet: 768px;
  --breakpoint-mobile: 480px;
  --breakpoint-small: 360px;
}

/* Base Footer Styles */
.footer {
  background: linear-gradient(135deg, var(--footer-bg-start) 0%, var(--footer-bg-middle) 50%, var(--footer-bg-end) 100%);
  color: var(--footer-text);
  padding: var(--footer-padding-vertical) 0 30px;
  position: relative;
  overflow: hidden;
  font-family: var(--footer-font);
  font-weight: 500;
  font-size: 1.15rem;
  direction: rtl;
  box-shadow: var(--footer-shadow);
  letter-spacing: 0.01em;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Blueprint Animation */
.blueprint-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: var(--low-opacity);
  z-index: 1;
  pointer-events: none;
}

.blueprint-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Animation lines and elements */
.blueprint-line,
.blueprint-wall,
.blueprint-room,
.blueprint-window,
.blueprint-door,
.blueprint-measure,
.blueprint-circle,
.blueprint-compass,
.blueprint-diagonal {
  stroke: var(--accent-gold);
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 50s linear forwards infinite;
}

/* Variations for different blueprint elements */
.blueprint-wall { 
  stroke-width: 2;
  stroke-opacity: 0.4;
  stroke-dasharray: 600;
  animation-duration: 40s;
}

.blueprint-room { 
  stroke-width: 2;
  stroke-opacity: 0.4;
  stroke-dasharray: 2000;
  animation-duration: 60s;
}

.blueprint-window {
  stroke: var(--accent-blue);
  stroke-width: 1.5;
  stroke-opacity: 0.5;
  stroke-dasharray: 300;
  animation-duration: 30s;
}

.blueprint-door {
  stroke-width: 1.5;
  stroke-opacity: 0.5;
  stroke-dasharray: 200;
  animation-delay: 1s;
  animation-duration: 25s;
}

.blueprint-measure {
  stroke: var(--accent-light-blue);
  stroke-width: 1;
  stroke-opacity: var(--medium-opacity);
  stroke-dasharray: 600;
  animation-delay: 2s;
  animation-duration: 30s;
}

.blueprint-circle {
  stroke-width: 1.5;
  stroke-opacity: var(--medium-opacity);
  stroke-dasharray: 1000;
  animation-delay: 3s;
  animation-duration: 40s;
}

.blueprint-compass {
  stroke: var(--accent-light-blue);
  stroke-width: 1.5;
  stroke-opacity: 0.4;
  stroke-dasharray: 600;
  animation-delay: 4s;
  animation-duration: 35s;
}

.blueprint-text {
  fill: var(--accent-gold);
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  animation: fadeIn 5s linear 30s forwards infinite;
}

.blueprint-diagonal {
  stroke-width: 1;
  stroke-opacity: var(--medium-opacity);
  stroke-dasharray: 400;
  animation-delay: 2s;
  animation-duration: 20s;
}

/* Keyframe Animations */
@keyframes drawLine {
  0% {
    stroke-dashoffset: 1000;
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  50% {
    opacity: var(--high-opacity);
  }
  100% {
    opacity: 0;
  }
}

/* Footer Content Container */
.footer-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--footer-padding-horizontal);
  box-sizing: border-box;
}

/* Main Footer Content */
.footer-main {
  display: flex;
  gap: var(--section-gap);
}

/* Brand Column */
.footer-brand {
  flex: 2;
}

/* Logo and Company Info */
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  width: 100%;
  flex-wrap: nowrap;
  align-content: space-around;
}

.footer-svg-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4)) brightness(1.1);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.footer-svg-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.6)) brightness(1.2);
}

.footer-logo-text {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #ffffff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.footer-about {
  margin-bottom: 2.5rem;
  opacity: 0.95;
  line-height: 1.8;
  font-size: 1.25rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  max-width: 95%;
}

/* Compact CTA Box */
.footer-compact-cta {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 25px;
  border-right: 4px solid var(--accent-gold);
  margin: 30px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.footer-compact-cta .cta-content {
  margin-bottom: 20px;
}

.footer-compact-cta .cta-content h3 {
  font-size: 1.4rem;
  color: white;
  margin: 0 0 10px;
  font-weight: 700;
}

.footer-compact-cta .cta-content p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
}

.footer-compact-cta .cta-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--accent-gold);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
  font-size: 1.1rem;
  -webkit-tap-highlight-color: transparent;
}

.footer-compact-cta .cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: white;
  z-index: -1;
  transition: width var(--transition-fast);
}

.footer-compact-cta .cta-button:hover {
  color: var(--accent-gold);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.footer-compact-cta .cta-button:hover::before {
  width: 100%;
}

/* Social Links */
.footer-social {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-bezier);
  box-shadow: var(--element-shadow);
  -webkit-tap-highlight-color: transparent;
}

.social-link:hover {
  background-color: var(--accent-gold);
  transform: translateY(-7px);
  box-shadow: var(--hover-shadow);
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  transition: all var(--transition-fast);
}

.social-link:hover svg {
  stroke: var(--footer-bg-middle);
  transform: scale(1.1);
}

/* Navigation Columns */
.footer-nav {
  flex: 3;
  display: flex;
  justify-content: space-between;
}

.footer-nav-column {
  flex: 1;
  padding: 0 0px;
}

/* Section Headings */
.footer-heading {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 1rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, rgba(212, 175, 55, 0.3), var(--accent-gold));
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

/* Navigation Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-link {
  margin-bottom: 1.4rem;
}

.footer-link a {
  opacity: 0.9;
  transition: all var(--transition-bezier);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--footer-text);
  padding: 5px 0;
  position: relative;
  overflow: hidden;
  font-size: 1.3rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}

.footer-link a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-gold);
  transition: width var(--transition-fast);
}

.footer-link a svg {
  width: 20px;
  height: 20px;
  margin-left: 12px;
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition-bezier);
  stroke: var(--accent-gold);
}

.footer-link a:hover {
  opacity: 1;
  color: var(--accent-gold);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
  transform: translateX(-3px);
}

.footer-link a:hover::after {
  width: 100%;
}

.footer-link a:hover svg {
  opacity: 1;
  transform: translateX(0);
}

/* Contact Information */
.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  transition: transform var(--transition-fast);
}

.contact-item:hover {
  transform: translateX(-7px);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 18px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
}

.contact-item:hover .contact-icon {
  background-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 6px 12px rgba(212, 175, 55, 0.2);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-gold);
  transition: all var(--transition-fast);
}

.contact-text {
  opacity: 0.95;
  transition: all var(--transition-fast);
  font-size: 1.35rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.contact-text a {
  color: var(--footer-text);
  text-decoration: none;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.contact-item:hover .contact-text,
.contact-item:hover .contact-text a {
  color: var(--accent-gold);
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.contact-item .contact-text {
  white-space: nowrap;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding-top: 15px;
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0.9;
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
  width: 100%;
  margin-top: 40px;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(to right, rgba(212, 175, 55, 0), rgba(212, 175, 55, 0.4), rgba(212, 175, 55, 0));
}

.copyright a {
  color: var(--accent-gold);
  text-decoration: underline;
  transition: all var(--transition-fast);
  font-weight: 600;
}

.copyright a:hover {
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.footer-terms a {
  color: var(--footer-text);
  text-decoration: none;
  transition: all var(--transition-fast);
  margin: 0 8px;
  font-weight: 600;
  position: relative;
  -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
}

.footer-terms a:hover {
  color: var(--accent-gold);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-fast);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--footer-bg-start);
  transform: translateY(-5px);
}

.arrow-up {
  display: block;
  width: 12px;
  height: 12px;
  border-right: 2px solid white;
  border-top: 2px solid white;
  transform: rotate(-45deg);
  margin-top: 4px;
}

/* Focus states for accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.social-link:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Responsive Styles - Desktop First Approach */

/* Large Tablets & Small Desktops */
@media (max-width: 1200px) {
  .footer-main {
    flex-direction: column;
    gap: 40px;
  }
  
  .footer-brand {
    padding-left: 0;
  }
  
  .footer-nav {
    flex-wrap: wrap;
  }
  
  .footer-nav-column {
    flex: 1 0 40%;
    margin-bottom: 30px;
  }
  
  .footer-compact-cta {
    max-width: 100%;
  }
  
  .blueprint-animation {
    opacity: 0.03;
  }
  
  .footer {
    font-size: 1.1rem;
  }
  
  .footer-heading {
    font-size: 1.7rem;
  }
  
  .footer-link a {
    font-size: 1.25rem;
  }
  
  .contact-text {
    font-size: 1.25rem;
  }
}

/* Tablets */
@media (max-width: 768px) {
  :root {
    --footer-padding-vertical: 60px;
    --section-gap: 30px;
  }

  .footer-main {
    gap: 30px;
  }
  
  .footer-nav {
    flex-direction: column;
  }
  
  .footer-nav-column {
    flex: 1 0 100%;
    padding: 0;
    margin-bottom: 40px;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .blueprint-animation {
    opacity: 0.02;
  }
  
  .footer {
    font-size: 1.05rem;
  }
  
  .footer-heading {
    font-size: 1.6rem;
    text-align: center;
  }
  
  .footer-heading::after {
    right: 50%;
    transform: translateX(50%);
  }
  
  .footer-link a {
    font-size: 1.2rem;
    justify-content: center;
  }
  
  .contact-text {
    font-size: 1.2rem;
  }
  
  .footer-brand, 
  .footer-nav-column {
    text-align: center;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-about {
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .contact-item {
    justify-content: center;
  }
  
  .footer-compact-cta {
    text-align: center;
  }
  
  .footer-compact-cta .cta-button {
    display: inline-block;
  }
  
  /* Enhanced touch targets for mobile */
  .footer-link {
    margin-bottom: 1.2rem;
  }
  
  .footer-link a {
    padding: 8px 0;
  }
  
  .contact-item {
    margin-bottom: 1.5rem;
  }
  
  /* Tap highlight color for better touch feedback */
  .footer a, 
  .footer button,
  .social-link,
  .back-to-top {
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
  }
  
  /* Enhanced focus states for touch */
  a:focus-visible,
  .cta-button:focus-visible,
  .social-link:focus-visible,
  .back-to-top:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.8);
    outline-offset: 3px;
  }
}

/* Mobile Devices */
@media (max-width: 480px) {
  :root {
    --footer-padding-vertical: 40px;
    --footer-padding-horizontal: 15px;
  }
  
  /* Core spacing improvements */
  .footer {
    font-size: 0.95rem;
    padding-bottom: 20px;
  }
  
  /* Improved heading readability */
  .footer-heading {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
  }
  
  /* Enhanced navigation layout */
  .footer-link {
    margin-bottom: 1rem;
  }
  
  .footer-link a {
    font-size: 1.1rem;
    padding: 10px 0;
  }
  
  /* Better touch targets for links with icons */
  .footer-link a svg {
    width: 18px;
    height: 18px;
    margin-left: 10px;
  }
  
  /* Optimized contact section */
  .contact-item {
    margin-bottom: 1.2rem;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
    margin-left: 15px;
  }
  
  .contact-text {
    font-size: 1.05rem;
  }
  
  /* Improved CTA box */
  .footer-compact-cta {
    padding: 20px 15px;
    margin: 20px 0;
    border-right-width: 3px;
  }
  
  .footer-compact-cta .cta-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }
  
  .footer-compact-cta .cta-content p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .footer-compact-cta .cta-button {
    padding: 12px 15px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
  
  /* Improved footer bottom section */
  .footer-bottom {
    gap: 15px;
    margin-top: 30px;
    font-size: 0.85rem;
  }
  
  .footer-terms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .footer-terms a {
    margin: 0;
  }
  
  /* Optimized social links */
  .footer-social {
    gap: 15px;
  }
  
  .social-link {
    width: 45px;
    height: 45px;
  }
  
  /* Enhanced back to top button */
  .back-to-top {
    width: 50px;
    height: 50px;
    bottom: 15px;
    left: 15px;
  }
  
  /* Reduce animation complexity for performance */
  .blueprint-animation {
    opacity: 0.015;
  }
  
  /* Optimize SVG logo for mobile */
  .footer-svg-logo {
    height: 40px;
  }
}

/* Extra Small Devices */
@media (max-width: 360px) {
  /* Further optimizations for very small screens */
  .footer {
    --footer-padding-horizontal: 12px;
    font-size: 0.9rem;
  }
  
  .footer-heading {
    font-size: 1.3rem;
  }
  
  .footer-link a {
    font-size: 1.05rem;
  }
  
  .contact-text {
    font-size: 1rem;
  }
  
  /* Compact social links further */
  .footer-social {
    gap: 12px;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
  }
  
  /* Optimize logo size */
  .footer-svg-logo {
    height: 35px;
  }
}

/* Improved RTL-specific mobile optimizations */
@media (max-width: 480px) {
  [dir="rtl"] .footer-link a {
    justify-content: flex-start;
  }
  
  [dir="rtl"] .contact-item {
    justify-content: flex-start;
  }
  
  [dir="rtl"] .contact-icon {
    margin-left: 12px;
    margin-right: 0;
  }
  
  [dir="rtl"] .footer-heading::after {
    right: 0;
    left: auto;
    transform: none;
  }
}

/* RTL Language Support Enhancements */
[dir="rtl"] .footer-link a svg {
  margin-right: 0;
  margin-left: 12px;
  transform: translateX(-8px) rotate(180deg);
}

[dir="rtl"] .footer-link a:hover svg {
  transform: translateX(0) rotate(180deg);
}

/* Homepage testimonial buttons right/left */
.testimonial-prev svg, .testimonial-next svg { transform: scaleX(-1); }

/* Accessibility Focus States */
a:focus-visible,
.cta-button:focus-visible,
.social-link:focus-visible,
.back-to-top:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
}

/* Print Styles */
@media print {
  .footer {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    padding: 20px 0 !important;
  }
  
  .footer-bottom {
    border-top: 1px solid #ddd !important;
  }
  
  .blueprint-animation,
  .back-to-top,
  .footer-social,
  .footer-compact-cta {
    display: none !important;
  }
  
  .footer a {
    color: #000 !important;
    text-decoration: underline !important;
  }
  
  .footer-heading::after {
    background: #000 !important;
  }
  
  .contact-icon {
    border: 1px solid #ddd !important;
    background: none !important;
  }
  
  .contact-icon svg {
    stroke: #000 !important;
  }
}

/* High-DPI / Retina display adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .footer {
    letter-spacing: 0.02em;
  }
  
  .footer-about, 
  .contact-text, 
  .footer-link a {
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  }
}

/* RTL Mobile-Specific Footer Fixes */

/* Ensure proper RTL alignment in mobile view */
@media (max-width: 768px) {
  /* Fix center alignment issue - restore proper RTL alignment */
  .footer-nav-column {
    text-align: right !important;
  }
  
  .footer-heading {
    text-align: right !important;
  }
  
  .footer-heading::after {
    right: 0 !important;
    left: auto !important;
    transform: none !important;
  }
  
  /* Fix link alignment */
  .footer-link a {
    justify-content: flex-start !important;
    padding: 10px 0;
  }
  
  /* Fix contact item alignment */
  .contact-item {
    justify-content: flex-start !important;
    margin-bottom: 18px;
  }
  
  /* Add section spacing */
  .footer-nav-column {
    margin-bottom: 35px;
    position: relative;
  }
  
  /* Visual separation between sections */
  .footer-nav-column:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 0;
    width: 100%;
    height: 1px;
    background: rgba(212, 175, 55, 0.15);
  }
  
  /* Fix section heading spacing */
  .footer-heading {
    margin-bottom: 20px;
    font-size: 1.5rem;
  }
  
  /* Fix contact section */
  .contact-icon {
    margin-left: 15px;
    margin-right: 0;
  }
  
  /* Footer bottom better organization */
  .footer-bottom {
    text-align: center;
    gap: 25px;
  }
  
  /* CTA button full width */
  .footer-compact-cta .cta-button {
    width: 100%;
    text-align: center;
    padding: 12px 15px;
  }
  
  /* Improve footer terms links layout */
  .footer-terms {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .footer-terms a {
    margin: 0;
  }
  
  /* Social links better spacing */
  .footer-social {
    justify-content: center;
    gap: 20px;
  }
  
  /* Improve About section spacing */
  .footer-about {
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: right;
  }
}

/* Specific small mobile adjustments */
@media (max-width: 480px) {
  /* Increased touch targets for links */
  .footer-link a {
    padding: 12px 0;
    font-size: 1.2rem;
  }
  
  /* Optimize for very small screens */
  .contact-item {
    flex-wrap: nowrap;
    align-items: center;
  }
  
  .contact-text {
    font-size: 1.1rem;
    white-space: normal;
  }
  
  /* Ensure proper spacing in footer bottom */
  .footer-bottom {
    padding-bottom: 20px;
  }
  
  /* Fix social icon spacing */
  .footer-social {
    gap: 15px;
  }
  
  /* Fix contact icon alignment */
  .contact-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }
}







/* ServicesHouse.php file css adjustments */

/* Add this to a <style> tag in the head section or to your CSS file */

/* Base Mobile Styles */
@media (max-width: 991px) {
  /* Typography scaling */
  h1 {
    font-size: 3rem !important;
    line-height: 1.2 !important;
    margin-bottom: 15px !important;
  }
  
  h2 {
    font-size: 2.2rem !important;
    margin-bottom: 15px !important;
  }
  
  /* Grid layout fixes */
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  
  /* Reduce section padding */
  section {
    padding: 70px 0 !important;
  }
  
  /* Fix side padding for containers */
  div[style*="max-width: 1200px"] {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Mobile Specific Styles */
@media (max-width: 767px) {
  /* Further reduce typography */
  h1 {
    font-size: 2.3rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 1.8rem !important;
  }
  
  h3 {
    font-size: 1.3rem !important;
  }
  
  p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
  
  /* Further reduce section padding */
  section {
    padding: 50px 0 !important;
  }
  
  /* Hero section specific fixes */
  section:first-of-type {
    padding-top: 100px !important;
  }
  
  /* CTA buttons in hero */
  section:first-of-type div[style*="display: flex"][style*="gap: 20px"] {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }
  
  section:first-of-type div[style*="display: flex"][style*="gap: 20px"] a {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    justify-content: center !important;
  }
  
  /* Box shadow reduction */
  div[style*="box-shadow"] {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  }
  
  /* Fix animation container height */
  #animation-container {
    height: 250px !important;
  }
  
  /* Process timeline mobile fix */
  #process > div > div > div {
    padding-right: 20px !important;
  }
  
  /* Fix timeline marker positioning */
  #process div[style*="position: absolute"][style*="right: calc(100% - 20px)"] {
    right: 0 !important;
  }
  
  /* Improve step cards spacing on mobile */
  #process div[style*="margin-bottom: 50px"] {
    margin-bottom: 30px !important;
    padding-right: 30px !important;
  }
  
  #process div[style*="padding: 30px"] {
    padding: 20px !important;
  }
  
  /* Quality section card improvements */
  div[style*="display: grid"][style*="grid-template-columns: repeat(3, 1fr)"] > div {
    padding: 25px !important;
  }
  
  /* Fix project filter buttons */
  div[style*="display: flex"][style*="justify-content: center"][style*="gap: 15px"] {
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-bottom: 30px !important;
  }
  
  div[style*="display: flex"][style*="justify-content: center"][style*="gap: 15px"] button {
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
    flex: 1 0 auto !important;
    min-width: 70px !important;
  }
  
  /* Fix CTA section */
  section[style*="background-color: #1a2a3a"] div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  section[style*="background-color: #1a2a3a"] div[style*="display: flex"] a {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px 20px !important;
    justify-content: center !important;
  }
  
  /* Form improvements */
  div[style*="background-color: white"][style*="border-radius: 16px"][style*="padding: 40px"] {
    padding: 25px !important;
    margin-top: 30px !important;
  }
  
  /* RTL-specific fixes */
  [dir="rtl"] div[style*="display: flex"][style*="align-items: flex-start"],
  div[style*="display: flex"][style*="align-items: flex-start"] {
    text-align: right !important;
    justify-content: flex-start !important;
  }

  /* Properly fix RTL icon alignment */
  div[style*="display: flex"][style*="align-items: flex-start"] > div:first-child {
    margin-left: 12px !important;
    margin-right: 0 !important;
    min-width: 40px !important;
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Fix icon sizes */
  div[style*="width: 60px"][style*="height: 60px"],
  div[style*="width: 80px"][style*="height: 80px"] {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
  }
  
  div[style*="width: 60px"][style*="height: 60px"] svg,
  div[style*="width: 80px"][style*="height: 80px"] svg {
    width: 24px !important;
    height: 24px !important;
  }
  
  /* Improve contact form elements */
  form input, form select, form textarea, form button {
    font-size: 1rem !important;
    padding: 14px 16px !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    direction: rtl !important;
  }
  
  form select {
    background-position: left 16px center !important;
    padding-left: 40px !important;
  }
  
  form button {
    min-height: 54px !important;
    margin-top: 10px !important;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  h1 {
    font-size: 2rem !important;
  }
  
  h2 {
    font-size: 1.6rem !important;
  }
  
  section {
    padding: 40px 0 !important;
  }
  
  /* Further condense hero section */
  section:first-of-type {
    padding-top: 80px !important;
    padding-bottom: 60px !important;
  }
  
  /* Make hero text more readable */
  section:first-of-type p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }
  
  /* Smaller animation container */
  #animation-container {
    height: 200px !important;
  }
  
  /* Fix the smaller CTA buttons */
  section:first-of-type div[style*="display: flex"] a,
  section[style*="background-color: #1a2a3a"] div[style*="display: flex"] a {
    padding: 14px 20px !important;
    font-size: 1rem !important;
  }
  
  /* Project items smaller height */
  .project-item img {
    height: 200px !important;
  }
  
  /* Reduce form element spacing */
  form input, form select, form textarea {
    padding: 12px 14px !important;
    font-size: 0.95rem !important;
    margin-bottom: 12px !important;
  }
  
  /* Fix smaller cards */
  div[style*="padding: 20px"],
  div[style*="padding: 25px"],
  div[style*="padding: 30px"],
  div[style*="padding: 35px"] {
    padding: 20px !important;
  }
}



/* Specific fixes for icon appearance in RTL layout */
@media (max-width: 767px) {
  /* For RTL layouts */
  [dir="rtl"] div[style*="display: flex"][style*="align-items: center"] {
    flex-direction: row-reverse !important;
  }
  
  /* For LTR layouts (optional if your default is already correct) */
  [dir="ltr"] div[style*="display: flex"][style*="align-items: center"] {
    flex-direction: row !important;
  }
  
  /* Style fixes for touch & active elements */
  a, button, [role="button"], select, input[type="submit"] {
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2) !important;
    touch-action: manipulation !important;
  }
  
  /* Add styles for proper hover feedback on mobile */
  a:active, button:active {
    transform: scale(0.98) !important;
  }
  
  /* Fix sticky positioning for back-to-top button */
  .back-to-top {
    bottom: 20px !important;
    left: 20px !important;
    width: 45px !important;
    height: 45px !important;
  }
  
  /* Fix the CTA box padding */
  .footer-compact-cta {
    padding: 20px !important;
  }
}
.keyboard-shorcut {
  display: none !important;
}