/* 
 * Plumbing Demo Site - Professional & Trustworthy Theme
 * Personalized via URL parameter
 */

:root {
  --primary: #1a1a2e;
  --secondary: #ffffff;
  --accent: #e63946;
  --text: #333333;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-600: #666666;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--primary);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
  padding: 0.5rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.logo-icon-container {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon {
  width: 26px;
  height: 26px;
  fill: var(--white);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: all 0.3s ease;
}

@media (max-width: 968px) {
  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 0.5rem 1.25rem;
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.hero-badge .stars {
  color: #ffc107;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--light-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
  padding: 8rem 0 4rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.75rem;
  color: var(--white);
  margin-bottom: 1rem;
  font-weight: 800;
}

.page-header p {
  color: rgba(255,255,255,0.8);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--gray-200);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  border-color: var(--accent);
}

.service-card .icon {
  width: 50px;
  height: 50px;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.service-card .learn-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Process Steps */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  position: relative;
}

.process-step {
  text-align: center;
  padding: 2rem;
}

.process-number {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
}

.process-step h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.process-step p {
  color: var(--gray-600);
}

/* Reviews / Star Rating */
.star-rating-section {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
  color: var(--white);
}

.star-display {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.star-display .star {
  font-size: 2.5rem;
  color: #ffc107;
  text-shadow: 0 2px 10px rgba(255, 193, 7, 0.4);
}

.star-rating-text {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.star-rating-source {
  font-size: 1rem;
  opacity: 0.8;
}

.promo-blurb {
  max-width: 700px;
  margin: 2rem auto 0;
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.9;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-category {
  margin-bottom: 2rem;
}

.faq-category-title {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-bottom: 1.25rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.faq-search {
  max-width: 500px;
  margin: 0 auto 2rem;
  position: relative;
}

.faq-search input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.faq-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.faq-search .search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
}

/* Guides Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.guide-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

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

.guide-card .guide-icon {
  width: 50px;
  height: 50px;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.guide-card h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.guide-card p {
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.contact-info-card {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.contact-info-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.contact-form {
  max-width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Content with Sidebar */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-card {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.sidebar-card h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

@media (max-width: 968px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  margin-top: 1rem;
  line-height: 1.7;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--white);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--accent) 0%, #c1121f 100%);
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.cta-section .btn {
  background: var(--white);
  color: var(--accent);
  font-weight: 700;
}

.cta-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Mobile Sticky CTA */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  padding: 0.75rem 1rem;
  z-index: 999;
  text-align: center;
}

.mobile-sticky-cta .btn {
  width: 100%;
  justify-content: center;
  background: var(--white);
  color: var(--accent);
  padding: 0.75rem;
}

@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .page-header {
    padding: 6rem 0 3rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  body {
    padding-bottom: 60px;
  }
}

/* Chatbot Styles */
.chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
  z-index: 1001;
  transition: all 0.3s ease;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
}

.chatbot-window {
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 370px;
  height: 480px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
  color: var(--white);
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h4 {
  font-size: 1rem;
  font-weight: 600;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.8;
}

.chatbot-close:hover {
  opacity: 1;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-msg.bot {
  background: var(--gray-100);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: var(--accent);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--gray-200);
}

.chatbot-input input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  font-size: 0.9rem;
  outline: none;
}

.chatbot-input input:focus {
  border-color: var(--accent);
}

.chatbot-input button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.chatbot-input .mic-btn {
  background: var(--primary);
  color: var(--white);
}

.chatbot-input .mic-btn.listening {
  background: var(--accent);
  animation: pulse 1s infinite;
}

.chatbot-input .send-btn {
  background: var(--accent);
  color: var(--white);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); }
}

@media (max-width: 768px) {
  .chatbot-toggle {
    bottom: 70px;
  }
  .chatbot-window {
    bottom: 135px;
    right: 10px;
    left: 10px;
    width: auto;
    height: 60vh;
  }
}

/* About page */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.about-content h3 {
  color: var(--primary);
  margin: 2rem 0 1rem;
  font-size: 1.35rem;
}

.about-content p {
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-content ul {
  list-style: none;
  padding: 0;
}

.about-content ul li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  color: var(--gray-600);
}

.about-content ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* View All FAQs button */
.view-all-btn {
  text-align: center;
  margin-top: 2rem;
}
