/* ============================================================================
   FOOTER OPTIMIZATION - DOM Reduced by 45%
   Created: Nov 5, 2025
   Purpose: Clean CSS Grid layout for optimized footer structure
   ============================================================================ */

/* Base Footer Styles - Full Width Dark Footer */
.site-footer {
  width: 100% !important;
  max-width: 100%;
  background: #2c2c2c; /* Dark background */
  color: #e0e0e0; /* Light text for contrast */
  border-top: 3px solid #555; /* Subtle gray instead of orange */
  padding: 3rem 0 1rem;
  margin-top: 2rem;
}



/* Footer Grid Layout - 4 columns: First 30% (newsletter+contact), rest 70% (3 equal sections) */
.footer-grid {
  display: grid;
  grid-template-columns: 30% 1fr 1fr 1fr; /* First column 30%, rest equal */
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Footer Column Base Styles */
.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-column h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff; /* White for dark background */
  border-bottom: 2px solid #555; /* Subtle gray accent */
  padding-bottom: 0.5rem;
}

/* Footer Links - Direct children (no ul/li) */
.footer-column.links {
  gap: 0.5rem;
}

.footer-column.links a {
  color: #ccc; /* Light gray for dark background */
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0.25rem 0;
  position: relative;
  padding-left: 12px;
}

/* CSS List Style - Replaces "- " text prefix */
.footer-column.links a::before {
  content: "›";
  position: absolute;
  left: 0;
  color: #888; /* Subtle gray accent */
  font-weight: bold;
}

.footer-column.links a:hover {
  color: #fff; /* White on hover for emphasis */
  padding-left: 16px;
}


.site-footer .partner-area{
    border-top:0px solid #555 !important;
}
/* ============================================================================
   NEWSLETTER SECTION - Optimized from 15 nodes to 8 nodes
   ============================================================================ */
.footer-column.newsletter {
  grid-column: 1; /* First column (30%) */
  grid-row: 1;
}

.footer-column.newsletter p {
  margin: 0 0 0.5rem 0;
  color: #ccc; /* Light text for dark background */
  font-size: 0.95rem;
}

/* Newsletter Form */
.footer-column.newsletter form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.footer-column.newsletter input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.footer-column.newsletter input[type="email"]:focus {
  outline: none;
  border-color: #888; /* Subtle gray focus */
  box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.2);
}

/* Newsletter Submit Button */
.btn-newsletter {
  padding: 0.75rem 1.5rem;
  background: #555; /* Subtle gray button */
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.btn-newsletter:hover {
  background: #666; /* Lighter gray on hover */
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(136, 136, 136, 0.3);
}

.btn-newsletter:active {
  transform: translateY(0);
}

/* Newsletter Messages - Single container (replaces 3 hidden divs) */
.newsletter-message {
  padding: 0.75rem;
  border-radius: 4px;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.newsletter-message.hidden {
  display: none;
}

.newsletter-message.error {
  background: #fee;
  border-left: 3px solid #c00;
  color: #c00;
}

.newsletter-message.success {
  background: #efe;
  border-left: 3px solid #0a0;
  color: #060;
}

/* Screen Reader Only Label */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================================
   CONTACT SECTION - Optimized from 10 nodes to 5 nodes
   ============================================================================ */
.footer-column.contact {
  grid-column: 1; /* First column (30%) - same as newsletter */
  grid-row: 2; /* Second row - below newsletter */
  background: rgba(255, 255, 255, 0.05); /* Subtle lighter background */
  padding: 1rem;
  border-radius: 4px;
  border-left: 3px solid #666; /* Subtle gray accent */
}

.footer-column.contact .contact-help {
  margin: 0 0 1rem 0;
  color: #ccc; /* Light text */
  font-size: 0.95rem;
}

.footer-column.contact .phone-number {
  color: #fff; /* White for emphasis */
  font-size: 1.1em;
  white-space: nowrap;
}

/* Semantic Address Element */
.footer-column.contact address {
  font-style: normal;
  line-height: 1.6;
  color: #aaa; /* Light gray text */
  font-size: 0.9rem;
}

/* Optional: Add phone icon via CSS (replaces inline Font Awesome) */
.footer-column.contact h4::before {
  content: "☎";
  margin-right: 0.5rem;
  color: #888; /* Subtle gray accent */
}

/* ============================================================================
   DISCLAIMER SECTION
   ============================================================================ */
.footer-disclaimer {
  background: rgba(255, 255, 255, 0.03); /* Very subtle lighter background */
  padding: 1.5rem;
  border-radius: 4px;
  margin: 2rem 0;
  border-left: 3px solid #555; /* Subtle gray accent */
}

.footer-disclaimer p {
  margin: 0 0 0.75rem 0;
  color: #aaa; /* Light gray text */
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-disclaimer p:last-child {
  margin-bottom: 0;
}

.footer-disclaimer a {
  color: #ccc; /* Light gray link */
  text-decoration: none;
  font-weight: 600;
}

.footer-disclaimer a:hover {
  text-decoration: underline;
}

/* ============================================================================
   PARTNER BANNER
   ============================================================================ */
.partner-area {
  text-align: center;
  margin: 2rem 0;
}

.partner-area img {
  max-width: 100%;
  height: auto;
}

/* ============================================================================
   COPYRIGHT SECTION
   ============================================================================ */
.copyright {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider */
  color: #aaa; /* Light gray text */
  font-size: 0.9rem;
}

.copyright p {
  margin: 0 0 0.5rem 0;
}

/* Inline Footer Links */
.footer-links-inline {
  margin: 0.5rem 0;
}

.footer-links-inline a {
  color: #ccc; /* Light gray link */
  text-decoration: none;
  font-weight: 500;
}

.footer-links-inline a:hover {
  text-decoration: underline;
}

.footer-links-inline .separator {
  margin: 0 0.5rem;
  color: #ccc;
}

/* Cache Status Indicator */
.cache-status {
  font-size: 10px;
  color: #777; /* Slightly darker gray for subtle look */
  margin-top: 0.75rem;
  font-family: monospace;
}

/* ============================================================================
   RESPONSIVE DESIGN - Mobile First
   ============================================================================ */

/* Mobile Devices (< 768px) */
@media (max-width: 767px) {
  .site-footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Hide newsletter on mobile */
  .footer-column.newsletter {
    display: none;
  }
  
  /* Contact section - now first on mobile since newsletter is hidden */
  .footer-column.contact {
    padding: 0.75rem;
    order: -1; /* Move to top */
  }
  
  /* Hide partner banner on small mobile */
  .partner-area {
    display: none;
  }
}

/* Tablets (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 35% 1fr 1fr; /* First column wider, 2 columns for links */
    gap: 1.5rem;
  }
  
  /* Newsletter and Contact in first column */
  .footer-column.newsletter {
    grid-column: 1;
    grid-row: 1;
  }
  
  .footer-column.contact {
    grid-column: 1;
    grid-row: 2;
  }
}

/* Desktop (> 1024px) */
@media (min-width: 1025px) {
  .footer-grid {
    grid-template-columns: 30% 1fr 1fr 1fr; /* First column 30%, rest equal (70% divided by 3) */
    grid-auto-flow: dense; /* Fill gaps efficiently */
  }
  
  /* Newsletter and Contact in first column (30%) */
  .footer-column.newsletter {
    grid-column: 1;
    grid-row: 1;
  }
  
  .footer-column.contact {
    grid-column: 1;
    grid-row: 2;
  }
  
  /* Link sections span both rows in their columns */
  .footer-column.links {
    grid-row: 1 / 3; /* Span both rows */
  }
}

/* Large Desktop (> 1400px) */
@media (min-width: 1400px) {
  .site-footer {
    padding: 4rem 0 2rem;
  }
  
  .footer-grid {
    gap: 3rem;
  }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */
@media print {
  .site-footer {
    border-top: 1px solid #000;
    padding: 1rem 0;
  }
  
  .footer-column.newsletter,
  .partner-area,
  .cache-status {
    display: none;
  }
  
  .footer-column.links a::before {
    content: "• ";
  }
}

/* ============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

/* Focus Visible for Keyboard Navigation */
.footer-column.links a:focus-visible,
.btn-newsletter:focus-visible,
.footer-links-inline a:focus-visible {
  outline: 2px solid #888; /* Subtle gray focus outline */
  outline-offset: 2px;
  border-radius: 2px;
}

/* Reduced Motion for Users with Vestibular Disorders */
@media (prefers-reduced-motion: reduce) {
  .footer-column.links a,
  .btn-newsletter {
    transition: none;
  }
  
  .btn-newsletter:hover {
    transform: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .site-footer {
    border-top: 3px solid #000;
  }
  
  .footer-column h4 {
    border-bottom: 3px solid #000;
  }
  
  .btn-newsletter {
    border: 2px solid #000;
  }
}

/* ============================================================================
   LEGACY SUPPORT - Fallback for older browsers
   ============================================================================ */

/* Fallback for browsers without CSS Grid support */
@supports not (display: grid) {
  .footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .footer-column {
    flex: 1 1 200px;
    margin: 0 1rem 2rem 0;
  }
  
  .footer-column.newsletter {
    flex: 2 1 400px;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

/* Hidden Utility (replaces inline style="display:none;") */
.hidden {
  display: none !important;
}

/* Visible on Mobile Only */
.visible-mobile {
  display: none;
}

@media (max-width: 767px) {
  .visible-mobile {
    display: block;
  }
}

/* Hidden on Mobile */
@media (max-width: 767px) {
  .hidden-mobile {
    display: none;
  }
}

