/* ============================================================================= 
   UNIVERSAL FOOTER STYLES - KADALI DENTAL
   Consistent footer design for all pages with responsive functionality
   ============================================================================= */

/* Main Footer Container */
footer {
  background: linear-gradient(135deg, #524d49 0%, #6d6862 100%);
  color: white;
  margin-top: auto;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4a373, #8B4513, #d4a373);
}

.last-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

/* First Footer Section - Contact Info */
.first-footer-section {
  background: rgba(212, 163, 115, 0.1);
  padding: clamp(20px, 4vw, 30px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 6vw, 4rem);
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.first-footer-section p {
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  letter-spacing: 0.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ebe3da;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.05);
}

.first-footer-section p:hover {
  transform: translateY(-2px);
  background: rgba(212, 163, 115, 0.2);
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.first-footer-section p i {
  font-size: 1.2em;
  color: #d4a373;
  transition: all 0.3s ease;
}

.first-footer-section p:hover i {
  color: white;
  transform: scale(1.1);
}

/* Second Footer Section - Links and Address */
.second-footer-section {
  background: rgba(82, 77, 73, 0.3);
  padding: clamp(25px, 5vw, 40px) clamp(20px, 4vw, 30px);
  text-align: center;
}

.second-footer-section #add1 {
  color: #ebe3da;
  font-size: clamp(0.75rem, 1.8vw, 0.9rem);
  letter-spacing: 0.05rem;
  line-height: 1.8;
  margin-bottom: 25px;
  opacity: 0.9;
  font-weight: 400;
}

.second-footer-section #add1 a {
  color: #d4a373;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.second-footer-section #add1 a:hover {
  color: white;
  border-bottom-color: #d4a373;
}

.second-footer-section #address {
  color: #ebe3da;
  font-size: clamp(0.85rem, 2vw, 1rem);
  letter-spacing: 0.1rem;
  line-height: 1.6;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid rgba(212, 163, 115, 0.2);
}

.second-footer-section #address span {
  color: #d4a373;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  display: block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
}

/* Footer Navigation Links */
.footer-nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-bottom: 1.5rem;
}

.footer-nav-links a {
  color: #d4a373;
  text-decoration: none;
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  transition: all 0.3s ease;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}

.footer-nav-links a:hover {
  color: white;
  border-bottom-color: #d4a373;
  transform: translateY(-1px);
}

/* Social Media Section */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0 1rem 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(212, 163, 115, 0.1);
  color: #d4a373;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  border: 2px solid rgba(212, 163, 115, 0.3);
}

.footer-social a:hover {
  background: #d4a373;
  color: white;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(212, 163, 115, 0.4);
}

/* Copyright Section */
.footer-copyright {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  font-size: clamp(0.75rem, 1.6vw, 0.85rem);
  color: rgba(235, 227, 218, 0.8);
}

/* ============================================================================= 
   IMPROVED RESPONSIVE DESIGN - MOBILE & TABLET FOCUSED
   ============================================================================= */

/* Large Desktop */
@media (min-width: 1200px) {
  .first-footer-section {
    padding: 35px 40px;
  }
  
  .second-footer-section {
    padding: 45px 40px;
  }
}

/* Medium Desktop */
@media (max-width: 1024px) {
  .first-footer-section {
    gap: 2rem;
  }
  
  .footer-nav-links {
    gap: 0.3rem 1.5rem;
  }
}

/* Tablet Portrait (768px and below) - MAJOR IMPROVEMENTS */
@media (max-width: 768px) {
  /* Contact Section - Better spacing and organization */
  .first-footer-section {
    flex-direction: column;
    gap: 1.5rem;
    padding: 30px 20px;
    text-align: center;
  }
  
  .first-footer-section p {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 30px;
    margin: 0.5rem 0;
  }
  
  /* Second section - reorganized for mobile flow */
  .second-footer-section {
    padding: 35px 20px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  /* Address gets priority placement */
  .second-footer-section #address {
    order: 1;
    padding: 2rem 1.5rem;
    margin-bottom: 0;
    text-align: center;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
  }
  
  /* Navigation - grid layout for better organization */
  .footer-nav-links {
    order: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .footer-nav-links a {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid rgba(212, 163, 115, 0.1);
    transition: all 0.3s ease;
  }
  
  .footer-nav-links a:hover {
    background: rgba(212, 163, 115, 0.15);
    border-color: rgba(212, 163, 115, 0.3);
    transform: translateY(-2px);
  }
  
  /* Additional info */
  .second-footer-section #add1 {
    order: 3;
    margin-bottom: 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
  }
  
  /* Social media - more prominent */
  .footer-social {
    order: 4;
    gap: 1.5rem;
    margin: 2rem 0 1rem 0;
    padding: 1.5rem 0;
    background: rgba(212, 163, 115, 0.05);
    border-radius: 15px;
  }
  
  .footer-social a {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  /* Copyright */
  .footer-copyright {
    order: 5;
  }
}

/* Mobile Landscape (640px and below) */
@media (max-width: 640px) {
  .first-footer-section {
    padding: 25px 15px;
    gap: 1.2rem;
  }
  
  .first-footer-section p {
    max-width: 280px;
    padding: 0.9rem 1.3rem;
    font-size: 0.95rem;
  }
  
  .second-footer-section {
    padding: 30px 15px;
  }
  
  /* Navigation - three columns for mobile */
  .footer-nav-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    max-width: 400px;
  }
  
  .footer-nav-links a {
    padding: 0.9rem;
    font-size: 0.9rem;
  }
  
  .second-footer-section #address {
    padding: 1.8rem 1.3rem;
  }
  
  .footer-social {
    gap: 1.3rem;
    padding: 1.3rem 0;
  }
  
  .footer-social a {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
  .first-footer-section {
    padding: 20px 12px;
    gap: 1rem;
  }
  
  .first-footer-section p {
    max-width: 260px;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .second-footer-section {
    padding: 25px 12px;
    gap: 1.8rem;
  }
  
  .footer-nav-links {
    gap: 0.5rem;
    max-width: 350px;
  }
  
  .footer-nav-links a {
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
  }
  
  .second-footer-section #address {
    padding: 1.5rem 1.2rem;
    border-radius: 15px;
  }
  
  .footer-social {
    gap: 1.2rem;
    padding: 1.2rem 0;
  }
  
  .footer-social a {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

/* Small Mobile (360px and below) */
@media (max-width: 360px) {
  .first-footer-section {
    padding: 18px 10px;
    gap: 0.8rem;
  }
  
  .first-footer-section p {
    max-width: 240px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    gap: 0.4rem;
  }
  
  .second-footer-section {
    padding: 22px 10px;
    gap: 1.5rem;
  }
  
  .footer-nav-links {
    gap: 0.4rem;
    max-width: 320px;
  }
  
  .footer-nav-links a {
    padding: 0.5rem 0.3rem;
    font-size: 0.75rem;
  }
  
  .second-footer-section #address {
    padding: 1.3rem 1rem;
    font-size: 0.85rem;
  }
  
  .second-footer-section #address span {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
  }
  
  .second-footer-section #add1 {
    padding: 0.8rem;
    font-size: 0.8rem;
  }
  
  .footer-social {
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .footer-social a {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
  
  .footer-copyright {
    padding: 1.2rem 0;
    font-size: 0.75rem;
  }
}

/* ============================================================================= 
   ACCESSIBILITY & ANIMATIONS
   ============================================================================= */

/* Focus states for accessibility */
.first-footer-section p:focus,
.footer-nav-links a:focus,
.footer-social a:focus {
  outline: 2px solid #d4a373;
  outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  footer *,
  footer *::before,
  footer *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  footer {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .first-footer-section,
  .second-footer-section {
    background: transparent !important;
  }
  
  .footer-social {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  footer {
    background: #000000;
    color: #ffffff;
  }
  
  .first-footer-section p,
  .footer-nav-links a {
    border: 1px solid #ffffff;
  }
}