/*
 * Footer Styles (cleaned and conflict-free)
 */

:root {
    --footer-primary-accent: #0052d4;
    --footer-secondary-accent: #65c7f7;
    --footer-text-light: #e0e0e0;
    --footer-text-white: #ffffff;
    --footer-bg-darker: rgba(0, 0, 0, 0.15);
}

/* Footer base */
.site-footer {
    color: var(--footer-text-light);
    padding: 60px 0 0;
    font-size: 15px;
    position: relative;
    overflow: visible;
    width: 100%;
    margin: 0;
}

/* Remove theme max-width caps so footer content can span full width */
.site-footer:not(.dynamic-footer),
.site-footer.footer-full-width {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Footer container (independent from global .container) */
.site-footer .footer-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 20px; /* safe gutters */
}

/* CTA section (full-bleed background handled by alignfull class in markup) */
.site-footer .cta-section {
    background: linear-gradient(135deg, var(--footer-primary-accent) 0%, var(--footer-secondary-accent) 100%);
    text-align: center;
    padding: 80px 0 40px;
}

/* Remove CTA content styles as the block is deleted */
.site-footer .cta-content,
.site-footer .cta-content h2,
.site-footer .cta-content p,
.site-footer .cta-btn { display: none !important; }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-widget-area { padding: 0 15px; }

/* Left-align widget titles and contact info, including on mobile */
.site-footer .footer-widget-area { text-align: left; }
.site-footer .footer-widget-area .widget-title { text-align: left; }

.footer-about .site-title a {
    color: var(--footer-text-white);
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
}

.footer-about .site-description { margin-top: 15px; line-height: 1.7; }

.social-links { margin-top: 20px; }

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--footer-text-white);
    margin-right: 10px;
    transition: background-color 0.3s, color 0.3s;
}

.social-links a:hover { background-color: var(--footer-text-white); color: var(--footer-primary-accent); }

/* Footer title spacing improvements */
.widget-title {
    color: var(--footer-text-white);
    font-size: 20px;
    margin-bottom: 18px; /* was 25px */
    font-weight: 600;
    position: relative;
    padding-bottom: 6px; /* was 10px, brings the underline closer */
    line-height: 1.2; /* tighter line height for better visual balance */
    display: inline-block; /* keep underline tight to the text width */
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0; /* sits right under the text */
    width: 50px;
    height: 3px; /* slightly thicker for better visibility */
    background-color: var(--footer-text-white);
    border-radius: 2px; /* soften the edges */
}

.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 12px; }

.footer-menu li a {
    color: var(--footer-text-light);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    position: relative;
}

.footer-menu li a:hover { color: var(--footer-text-white); padding-left: 10px; }
.footer-menu li a:hover::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.contact-info { list-style: none; padding: 0; margin: 0; }
.contact-info li { display: flex; align-items: center; margin-bottom: 15px; }
.contact-info li i { color: var(--footer-text-white); font-size: 16px; margin-right: 15px; width: 20px; text-align: center; }
.contact-info li span { color: var(--footer-text-light); }

.footer-bottom-bar {
    background-color: var(--footer-bg-darker);
    padding: 20px 0;
    margin-top: 60px;
    text-align: center;
}

.copyright p { margin: 0; color: var(--footer-text-light); }

/* Make texts readable on gradient */
.site-footer .footer-grid .widget-title,
.site-footer .footer-grid .footer-menu li a,
.site-footer .footer-grid .contact-info li span { color: var(--footer-text-white); }
.site-footer .footer-grid .footer-menu li a { opacity: 0.9; }
.site-footer .footer-grid .footer-menu li a:hover { opacity: 1; }

/* Responsive */
@media (max-width: 991px) {
    .footer-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 767px) {
    .site-footer { padding: 40px 0 0; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .widget-title::after { left: 50%; transform: translateX(-50%); }
    .social-links { text-align: center; }
    .contact-info li { justify-content: center; }
    .footer-menu li a:hover { padding-left: 0; }
    .footer-menu li a:hover::before { display: none; }
}

/* Override mobile centering specifically for these elements */
@media (max-width: 767px) {
  .site-footer .footer-widget-area { text-align: left; }
  .site-footer .widget-title::after { left: 0; transform: none; }
  .site-footer .contact-info li { justify-content: flex-start; }
}

/* Mobile layout: place Quick Links and Services side-by-side */
@media (max-width: 767px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "about about"
      "links services"
      "contact contact";
    gap: 20px;
    text-align: left; /* keep content left-aligned */
  }
  .site-footer .footer-about { grid-area: about; }
  .site-footer .footer-grid > .footer-widget-area:nth-of-type(2) { grid-area: links; }
  .site-footer .footer-grid > .footer-widget-area:nth-of-type(3) { grid-area: services; }
  .site-footer .footer-grid > .footer-widget-area:nth-of-type(4) { grid-area: contact; }
}

/* Responsive tweaks for CTA heading */
@media (max-width: 768px) {
    .site-footer .cta-content h2 { font-size: 2rem; }
    .site-footer .cta-content p { font-size: 1.05rem; }
}
