/* ============================================
   PoolReady Tampa Bay - Component Styles
   Buttons, Forms, Cards, Trust Elements
   ============================================ */

/* ============================================
   HEADER (No Navigation - Conversion Focused)
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: white;
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) 0;
}

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

.logo {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
}

.logo img {
  height: 40px;
  width: auto;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--font-semibold);
  color: var(--color-primary);
  font-size: var(--text-sm);
}

.header-phone svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 768px) {
  .header-phone {
    font-size: var(--text-lg);
  }

  .logo img {
    height: 50px;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  text-align: center;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1.2;
}

.btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Primary Button - Uses variation accent color */
.btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-md);
}

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

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

/* Secondary Button */
.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

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

/* Large Button */
.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
}

/* Full Width Button */
.btn-full {
  width: 100%;
}

/* Button with Arrow */
.btn svg,
.btn-arrow::after {
  transition: transform var(--transition-fast);
}

.btn:hover svg,
.btn-arrow:hover::after {
  transform: translateX(4px);
}

.btn-arrow::after {
  content: '→';
  margin-left: var(--space-2);
}

/* ============================================
   FORMS
   ============================================ */
.form-container {
  background: white;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.form-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
  text-align: center;
  color: var(--color-primary);
}

.form-subtitle {
  font-size: var(--text-sm);
  color: #666;
  text-align: center;
  margin-bottom: var(--space-6);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: #374151;
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-4);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: #f9fafb;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
  background: white;
}

.form-input::placeholder {
  color: #9ca3af;
}

/* Form Input with Icon */
.form-input-wrapper {
  position: relative;
}

.form-input-wrapper .form-input {
  padding-left: var(--space-12);
}

.form-input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #9ca3af;
}

/* Form Micro-copy */
.form-microcopy {
  font-size: var(--text-xs);
  color: #6b7280;
  text-align: center;
  margin-top: var(--space-3);
}

.form-microcopy svg {
  width: 14px;
  height: 14px;
  display: inline;
  vertical-align: middle;
  margin-right: var(--space-1);
}

/* Multi-Step Form */
.form-steps {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.form-step-indicator {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: #e5e7eb;
  transition: all var(--transition-base);
}

.form-step-indicator.active {
  background: var(--color-primary);
  transform: scale(1.2);
}

.form-step-indicator.completed {
  background: var(--color-accent);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   TRUST ELEMENTS
   ============================================ */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: #4b5563;
}

.trust-bar-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.trust-bar-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}

/* Star Rating */
.stars {
  display: inline-flex;
  gap: 2px;
  color: #fbbf24;
}

.stars svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-6) 0;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.trust-badge-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: var(--radius-full);
  color: var(--color-primary);
}

.trust-badge-icon svg {
  width: 24px;
  height: 24px;
}

.trust-badge-text {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: #374151;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Feature Card */
.feature-card {
  text-align: center;
}

.feature-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  border-radius: var(--radius-xl);
  color: white;
}

.feature-card-icon svg {
  width: 32px;
  height: 32px;
}

.feature-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.feature-card p {
  font-size: var(--text-sm);
  color: #6b7280;
  margin-bottom: 0;
}

/* Testimonial Card */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  font-size: 4rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.1;
  font-family: Georgia, serif;
}

.testimonial-content {
  position: relative;
  z-index: 1;
  font-size: var(--text-lg);
  font-style: italic;
  color: #374151;
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.testimonial-name {
  font-weight: var(--font-semibold);
  color: #1a1a1a;
}

.testimonial-location {
  font-size: var(--text-sm);
  color: #6b7280;
}

/* ============================================
   CHECKLIST
   ============================================ */
.checklist {
  list-style: none;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  font-size: var(--text-base);
}

.checklist-item svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  margin-top: 2px;
}

/* ============================================
   SERVICE AREAS
   ============================================ */
.service-areas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.service-area-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: #f3f4f6;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: #374151;
}

.service-area-badge svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

/* ============================================
   PRICING
   ============================================ */
.pricing-highlight {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

.pricing-note {
  font-size: var(--text-sm);
  color: #6b7280;
  margin-top: var(--space-2);
}

/* ============================================
   STEPS / HOW IT WORKS
   ============================================ */
.steps {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.step h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.step p {
  font-size: var(--text-sm);
  color: #6b7280;
  margin-bottom: 0;
}

/* ============================================
   GUARANTEE BADGE
   ============================================ */
.guarantee-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: #f0fdf4;
  border: 2px solid #22c55e;
  border-radius: var(--radius-xl);
}

.guarantee-badge svg {
  width: 32px;
  height: 32px;
  color: #22c55e;
}

.guarantee-badge-text {
  text-align: left;
}

.guarantee-badge-title {
  font-weight: var(--font-bold);
  color: #166534;
}

.guarantee-badge-subtitle {
  font-size: var(--text-sm);
  color: #15803d;
}

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

.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) 0;
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  text-align: left;
  color: #1a1a1a;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-question svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-base);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding-bottom: var(--space-5);
  color: #4b5563;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #1a1a1a;
  color: #9ca3af;
  padding: var(--space-8) 0;
  text-align: center;
  font-size: var(--text-sm);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.footer-links a {
  color: #9ca3af;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-divider {
  display: inline;
  margin: 0 var(--space-2);
  color: #4b5563;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding-top: calc(80px + var(--space-8));
  padding-bottom: var(--space-12);
  min-height: 70vh;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .hero {
    padding-top: calc(80px + var(--space-16));
    padding-bottom: var(--space-16);
  }
}

.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

/* On mobile, ensure text content appears before images in value prop sections */
.hero-grid > div:has(h2) {
  order: 1;
}

.hero-grid > div:has(img) {
  order: 2;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }

  /* Reset order on desktop - let natural DOM order apply */
  .hero-grid > div:has(h2),
  .hero-grid > div:has(img) {
    order: unset;
  }
}

.hero-content {
  text-align: center;
}

.hero-headline {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  line-height: 1.1;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .hero-headline {
    font-size: var(--text-5xl);
  }
}

.hero-subheadline {
  font-size: var(--text-lg);
  color: #4b5563;
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .hero-subheadline {
    font-size: var(--text-xl);
  }
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  text-align: center;
  padding: var(--space-16) 0;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--space-4);
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: var(--space-6);
}

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

.cta-section .btn-primary:hover {
  background: #f9fafb;
}

/* ============================================
   FORM MODAL
   ============================================ */
.form-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.form-modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #e5e7eb;
}

.modal-close svg {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
