/* Main CSS - Below the fold and component styles */

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--secondary-color);
  transition: var(--transition);
}

a:hover, a:focus {
  color: var(--primary-color);
}

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

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

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

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Mobile navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-white);
  z-index: 999;
  overflow-y: auto;
  padding: 2rem;
}

.mobile-nav.active {
  display: block;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.mobile-nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-dark);
}

.mobile-nav-list {
  list-style: none;
  padding-top: 3rem;
}

.mobile-nav-item {
  margin-bottom: 1.5rem;
}

.mobile-nav-link {
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
  padding: 0.5rem 0;
}

/* Search widget */
.search-widget {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin-top: -3rem;
  position: relative;
  z-index: 10;
}

.search-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--bg-light);
  overflow-x: auto;
}

.search-tab {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  min-width: 44px;
  min-height: 44px;
}

.search-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.search-tab:hover, .search-tab:focus {
  color: var(--primary-color);
}

.search-form {
  display: grid;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 0.875rem;
}

.form-input, .form-select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255,87,34,0.1);
}

.form-input::placeholder {
  color: #999;
}

/* Cards */
.cards-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover, .card:focus-within {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.card-description {
  color: var(--text-light);
  margin-bottom: 1rem;
  flex: 1;
}

.card-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.card-price-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Deal cards with countdown */
.deal-card {
  position: relative;
}

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

.countdown-item {
  text-align: center;
}

.countdown-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.countdown-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
}

/* Featured section */
.featured-deals {
  display: grid;
  gap: 2rem;
}

/* Trust indicators */
.trust-indicators {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.trust-item {
  text-align: center;
  padding: 2rem;
}

.trust-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
}

.trust-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.trust-description {
  color: var(--text-light);
}

/* Testimonials */
.testimonials {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.testimonial {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.testimonial-content {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 600;
  color: var(--text-dark);
}

.testimonial-location {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: white;
  text-align: center;
  padding: 4rem 1rem;
}

.newsletter-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: white;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
}

.newsletter-input {
  padding: 1rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.newsletter-btn {
  background-color: var(--text-dark);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-btn:hover, .newsletter-btn:focus {
  background-color: #333;
  transform: translateY(-2px);
}

/* Ad zones */
.ad-zone {
  margin: 2rem 0;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-zone img {
  max-width: 100%;
  height: auto;
}

.sidebar-ad {
  margin-bottom: 2rem;
  text-align: center;
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
}

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

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

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

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

.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover, .footer-links a:focus {
  color: white;
  padding-left: 5px;
}

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

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  background-color: var(--bg-light);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb-item::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb-item:last-child::after {
  display: none;
}

.breadcrumb-link {
  text-decoration: none;
  color: var(--text-dark);
}

/* Page header */
.page-header {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
}

.page-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.page-description {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.95;
}

/* Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--bg-light);
}

.comparison-table th {
  background-color: var(--text-dark);
  color: white;
  font-weight: 600;
}

.comparison-table tr:hover {
  background-color: var(--bg-light);
}

/* FAQ */
.faq-item {
  background-color: var(--bg-white);
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: none;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover, .faq-question:focus {
  background-color: var(--bg-light);
}

.faq-icon {
  transition: var(--transition);
}

.faq-question.active .faq-icon {
  transform: rotate(180deg);
}

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

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

.faq-answer-content {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* Form styles */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.form-textarea {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 150px;
  width: 100%;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255,87,34,0.1);
}

/* Loading states */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Alert messages */
.alert {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Responsive utilities */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

/* Tablet breakpoint (768px) */
@media (min-width: 768px) {
  .search-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-form .form-group:last-child {
    grid-column: 1 / -1;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-indicators {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .newsletter-form {
    flex-direction: row;
  }

  .newsletter-input {
    flex: 1;
  }

  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }
}

/* Desktop breakpoint (1024px) */
@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .search-form {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }

  .mobile-only {
    display: none;
  }

  .desktop-only {
    display: block;
  }
}

/* Large desktop breakpoint (1280px) */
@media (min-width: 1280px) {
  .section {
    padding: 6rem 0;
  }

  h1 { font-size: 3.5rem; }
  h2 { font-size: 3rem; }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
