/*
Theme Name: RestorationFAQs.com Theme (CONVERSION OPTIMIZED)
Theme URI: https://restorationfaqs.com
Author: Your Name
Description: Custom theme with conversion-optimized design
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: restorationfaqs
*/

/* ---- Base ---- */
body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  padding-bottom: 80px; /* Space for floating CTA on mobile */
}

/* ---- Header ---- */
.site-header {
  background: #fff;
  position: relative;
  z-index: 1040;
  border-bottom: none;
}

/* Decorative bottom gradient */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(to bottom, rgba(200,200,200,0.4), rgba(200,200,200,0));
}

/* ---- Footer ---- */
.site-footer {
  background: #222;
  color: #ccc;
  padding: 2rem 0;
}

.footer-social a {
  color: #ccc;
  transition: color 0.3s ease;
}
.footer-social a:hover {
  color: #fff;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: #212529;
  margin: 1.5rem 0;
}
h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
}

p { margin-bottom: 1.25rem; }
ul, ol { margin-bottom: 2rem; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

blockquote {
  border-left: 4px solid #ccc;
  padding-left: 1rem;
  color: #555;
  margin: 1.5rem 0;
  font-style: italic;
}

a {
  color: #0056b3;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.6rem; }
  h4 { font-size: 1.4rem; }
  h5 { font-size: 1.2rem; }
  h6 { font-size: 0.95rem; }
  p { margin-bottom: 1rem; }
}

/* ---- Hero Section ---- */
.hero {
  background: url('https://restorationfaqs.com/wp-content/themes/restorationfaqs/images/hero.png') center/cover no-repeat;
  min-height: 650px;
  display: flex;
  align-items: center;
  position: relative;
  padding: 80px 0;
}

.hero-cta {
  max-width: 650px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 2rem 2.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Trust badges in hero */
.hero-cta .badge {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
}

/* ---- Post Meta ---- */
.post-meta {
  color: #6c757d;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.post-meta .author-link { color: #212529; font-weight: 500; }
.post-meta .author-link:hover { color: #0056b3; }
.post-meta .last-updated { color: #666; font-size: 0.85rem; }
@media (max-width: 576px) {
  .post-meta { flex-direction: column; align-items: flex-start; }
}

/* ---- Accessibility ---- */
.screen-reader-text,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.screen-reader-text:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5em 1em;
  background: #f1f1f1;
  color: #000;
  z-index: 10000;
}

/* =========================================================
   Sticky Header + Logo Shrink
   ========================================================= */
.sticky-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

body.scrolled .sticky-header {
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
}

.brand-row {
  padding: 1rem 0;
  transition: padding 0.3s ease;
}
body.scrolled .brand-row { padding: 0.5rem 0; }

.navbar-brand img {
  max-width: 280px;
  height: auto;
  transition: transform 0.3s ease, max-width 0.3s ease;
}
body.scrolled .navbar-brand img {
  max-width: 220px;
  transform: scale(0.95);
}

body.scrolled .call-now-btn {
  transform: scale(0.95);
  transition: transform 0.3s ease;
  font-size: 1.05rem;
}

@media (max-width: 991.98px) {
  body.scrolled .navbar-brand img { max-width: 180px; }
  body.scrolled .brand-row { padding: 0.75rem 0; }
}

/* =========================================================
   Call Now Button (Orange / Jiggle / White Icon)
   ========================================================= */
.call-now-btn {
  background-color: #ff7a00 !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700;
  transition: all 0.3s ease;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}

.call-now-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.call-now-btn:hover::before {
  width: 300px;
  height: 300px;
}

.call-now-btn:hover,
.call-now-btn:focus {
  background-color: #e96b00 !important;
  color: #fff !important;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 122, 0, 0.4);
}

/* White phone icon */
.call-now-btn .call-icon {
  color: #ffffff !important;
  font-size: 1.2em;
  display: inline-block;
  margin-right: 0.4rem;
  vertical-align: middle;
  transform-origin: center;
}

/* Enhanced jiggle animation */
@keyframes phone-jiggle-periodic {
  0%, 88%, 100% { transform: rotate(0deg); }
  89%, 91%, 93%, 95%, 97% { transform: rotate(-12deg); }
  90%, 92%, 94%, 96%, 98% { transform: rotate(12deg); }
  99% { transform: rotate(0deg); }
}

.call-now-btn .call-icon {
  animation: phone-jiggle-periodic 4s ease-in-out infinite;
}

/* Add pulse effect on hover */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.call-now-btn:hover .call-icon {
  animation: pulse 0.6s ease-in-out infinite;
}

/* =========================================================
   FLOATING MOBILE CALL BUTTON (Bottom of Screen)
   ========================================================= */
.floating-call-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background-color: #ff7a00;
  color: #fff;
  padding: 1rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  border: none;
  text-decoration: none;
  display: none; /* Hidden by default, shown via JS on mobile */
  transition: all 0.3s ease;
}

.floating-call-btn:hover,
.floating-call-btn:active {
  background-color: #e96b00;
  color: #fff;
  text-decoration: none;
}

.floating-call-btn .call-icon {
  font-size: 1.4em;
  margin-right: 0.5rem;
  animation: phone-jiggle-periodic 3s ease-in-out infinite;
}

/* Show only on mobile/tablet when scrolled */
@media (max-width: 991.98px) {
  body.scrolled .floating-call-btn {
    display: block;
  }
  
  /* Add padding to body so content isn't hidden */
  body.scrolled {
    padding-bottom: 80px;
  }
}

/* =========================================================
   Navigation: Dark Blue Background, White Links
   ========================================================= */
.site-header .nav-row,
.site-header .navbar {
  background-color: #0f2741 !important;
  border-top: none;
  padding: 0;
}

.site-header .navbar-nav {
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: center;
  margin: 0;
  padding: 0 1rem;
}

.site-header .nav-link {
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 1.25rem !important;
  line-height: 1.2;
  display: flex;
  align-items: center;
  border-radius: 0;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus,
.site-header .nav-item.active .nav-link,
.site-header .current-menu-item > .nav-link {
  background-color: #2b6cb0 !important;
  color: #ffffff !important;
}

/* Dropdowns */
.site-header .dropdown-menu {
  background-color: #0f2741 !important;
  border: none;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  margin-top: 0;
}
.site-header .dropdown-item {
  color: #ffffff !important;
  padding: 0.75rem 1.25rem;
  transition: background-color 0.2s ease;
}
.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
  background-color: #2b6cb0 !important;
  color: #ffffff !important;
}

/* Mobile Nav */
.navbar-toggler {
  border: none;
  background: transparent;
}
.navbar-toggler-icon {
  filter: invert(1) brightness(2);
}

@media (max-width: 991.98px) {
  .site-header .navbar-nav {
    flex-direction: column !important;
    align-items: flex-start;
    padding: 0.5rem 1rem;
  }
  .site-header .nav-link {
    width: 100%;
    padding: 0.75rem 1rem !important;
  }
  .site-header .dropdown-menu {
    background-color: #0f2741 !important;
  }
}

/* ---- Footer Menu ---- */
.footer-menu a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-menu a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-social a {
  color: #ccc;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: #fff;
}

@media (max-width: 576px) {
  .footer-menu {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* =========================================================
   CONVERSION OPTIMIZATIONS
   ========================================================= */

/* Trust Bar */
.trust-bar {
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.trust-bar strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f2741;
}

/* CTA Box Styling */
.cta-box {
  border: 3px solid #ff7a00;
  position: relative;
}

.cta-box::before {
  content: '🔥 POPULAR';
  position: absolute;
  top: -15px;
  right: 20px;
  background: #ff7a00;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* Process Steps */
.step-number {
  font-size: 1.5rem;
  min-width: 50px;
  min-height: 50px;
  background: linear-gradient(135deg, #0f2741, #2b6cb0);
}

/* Final CTA Enhancement */
.final-cta {
  position: relative;
  overflow: hidden;
}

.final-cta .btn {
  position: relative;
  z-index: 10; /* Ensures button is above the ::before overlay */
}
.final-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Page Content Styling */
.page-content h2 {
  font-size: 1.8rem;
  color: #0f2741;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.page-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: #ff7a00;
}

.page-content p, 
.page-content li {
  font-size: 1.05rem;
  line-height: 1.7;
}

.page-content section {
  border-bottom: 1px solid #eee;
  padding-bottom: 2rem;
}

/* Card hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #dee2e6;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Alert boxes */
.alert {
  border-width: 2px;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: #ffc107;
}

.alert-info {
  background-color: #cfe2ff;
  border-color: #0d6efd;
}

/* =========================================================
   MOBILE OPTIMIZATIONS
   ========================================================= */
@media (max-width: 767.98px) {
  /* Larger tap targets for mobile */
  .call-now-btn {
    min-height: 60px;
    font-size: 1.1rem;
  }
  
  /* Hero adjustments */
  .hero {
    min-height: 500px;
    padding: 40px 0;
  }
  
  .hero-cta {
    padding: 1.5rem;
  }
  
  .hero-cta h1 {
    font-size: 1.75rem;
  }
  
  /* Trust bar stacks better */
  .trust-bar strong {
    font-size: 1.5rem;
  }
  
  /* Process steps stack */
  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

/* =========================================================
   PRINT STYLES (for saving/sharing)
   ========================================================= */
@media print {
  .floating-call-btn,
  .site-header,
  .site-footer,
  .cta-box,
  .final-cta {
    display: none;
  }
  
  body {
    padding-bottom: 0;
  }
}
