/* Homepage Styles - Professional SaaS Review Site */

/* ========== CSS Variables ========== */
:root {
  --primary-color: #667eea;
  --primary-dark: #5568d3;
  --secondary-color: #764ba2;
  --text-dark: #1a202c;
  --text-gray: #4a5568;
  --text-light: #718096;
  --bg-gray: #f7fafc;
  --border-gray: #e2e8f0;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ========== Hero Section ========== */
.home-hero {
  background: linear-gradient(135deg, #5b6fd8 0%, #6b4ba0 100%);
  padding: 6rem 0 7rem;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.98);
  margin-bottom: 3rem;
  line-height: 1.5;
  font-weight: 400;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Search Bar */
.hero-search {
  max-width: 800px;
  margin: 0 auto 4rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1.75rem 5rem 1.75rem 2.5rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 60px;
  font-size: 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  color: #1a202c;
  font-weight: 500;
}

.search-input::placeholder {
  color: #718096;
}

.search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.search-btn {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6b4ba0 100%);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.search-btn svg {
  width: 22px;
  height: 22px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-number {
  display: block;
  font-size: 3.5rem;
  font-weight: 900;
  color: #10b981;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.stat-label {
  display: block;
  font-size: 1rem;
  color: rgba(255, 255, 255, 1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* ========== Section Headers ========== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
  letter-spacing: -0.02em;
}

.section-title.centered {
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: #718096;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.view-all-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.view-all-link:hover {
  color: var(--secondary-color);
  transform: translateX(4px);
}

/* ========== Featured Reviews ========== */
.featured-reviews {
  padding: 5rem 0;
  background: var(--bg-gray);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.featured-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.logo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.category-badge {
  padding: 0.25rem 0.75rem;
  background: #edf2f7;
  color: #4a5568;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tool-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.75rem;
}

.rating-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.stars {
  display: flex;
  gap: 0.125rem;
}

.star {
  color: #e2e8f0;
  font-size: 1.25rem;
}

.star.filled {
  color: #fbbf24;
}

.rating-text {
  font-weight: 600;
  color: #4a5568;
}

.price-section {
  margin-bottom: 1rem;
}

.price {
  font-size: 1.125rem;
  font-weight: 700;
  color: #667eea;
}

.review-btn {
  display: inline-block;
  width: 100%;
  padding: 0.75rem;
  background: #667eea;
  color: white;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.review-btn:hover {
  background: #764ba2;
}

/* ========== Top Rated Tools ========== */
.top-rated-section {
  padding: 5rem 0;
  background: var(--bg-gray);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.tool-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid transparent;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.tool-image {
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.tool-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tool-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #edf2f7;
  color: #4a5568;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tool-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.tool-title a {
  color: #1a202c;
  text-decoration: none;
}

.tool-title a:hover {
  color: #667eea;
}

.tool-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.rating-value {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.875rem;
}

.tool-excerpt {
  display: none;
}

.tool-footer {
  display: none;
}

.tool-price {
  display: none;
}

.read-more {
  display: none;
}

/* ========== Latest Reviews ========== */
.latest-reviews {
  padding: 5rem 0;
  background: var(--white);
}

.reviews-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

/* Featured Article (Left) */
.featured-article {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border-gray);
  display: flex;
  flex-direction: column;
  height: 480px;
  max-height: 480px;
}

.featured-article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.featured-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  flex-shrink: 0;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.featured-category {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: linear-gradient(135deg, var(--primary-color), #00d4aa);
  color: white;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.featured-date {
  color: #718096;
  font-size: 0.8125rem;
  display: block;
  margin-top: auto;
  padding-top: 1rem;
}

.featured-title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.featured-title a {
  color: #1a202c;
  text-decoration: none;
}

.featured-title a:hover {
  color: #667eea;
}

.featured-excerpt {
  color: #4a5568;
  line-height: 1.5;
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Articles List (Right) */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 480px;
  max-height: 480px;
}

.review-item {
  display: flex;
  gap: 1rem;
  transition: transform 0.2s;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
  height: calc((480px - 2rem) / 3);
}

.review-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-item:hover {
  transform: translateX(4px);
}

.review-thumb {
  flex-shrink: 0;
  width: 140px;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.review-date {
  color: #718096;
  font-size: 0.75rem;
  margin-bottom: 0.375rem;
}

.review-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.review-title a {
  color: #1a202c;
  text-decoration: none;
}

.review-title a:hover {
  color: #667eea;
}

.review-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.review-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #3b82f6;
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.review-category:hover {
  background: #2563eb;
}

.review-meta {
  display: none;
}

.meta-sep {
  display: none;
}

.inline-rating {
  display: none;
}

.review-excerpt {
  display: none;
}

/* ========== Categories Section ========== */
.categories-section {
  padding: 4rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.category-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.category-card p {
  color: #718096;
  margin-bottom: 1rem;
}

.category-count {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #edf2f7;
  color: #4a5568;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ========== Trust Section ========== */
.trust-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

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

.trust-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}

.trust-item h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.trust-item p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.trust-section .section-title {
  color: white;
}



/* ========== Responsive Design ========== */

/* Mobile First - Small devices (phones, up to 640px) */
@media (max-width: 640px) {
  .container-wide {
    padding: 0 1rem;
  }
  
  .home-hero {
    padding: 4rem 0 5rem;
    margin-bottom: 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
  }
  
  .search-input {
    padding: 1rem 4rem 1rem 1.5rem;
    font-size: 1rem;
    border-width: 2px;
  }
  
  .search-btn {
    width: 45px;
    height: 45px;
  }
  
  .search-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .hero-stats {
    gap: 3rem;
    margin-top: 2.5rem;
  }
  
  .stat-number {
    font-size: 2.75rem;
  }
  
  .stat-label {
    font-size: 0.9375rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  /* Featured Reviews */
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .featured-card {
    padding: 1.25rem;
  }
  
  .tool-name {
    font-size: 1.25rem;
  }
  
  /* Top Rated Tools */
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .tool-image {
    height: 180px;
  }
  
  /* Latest Reviews */
  .reviews-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .featured-image {
    height: 220px;
  }
  
  .featured-content {
    padding: 1.5rem;
  }
  
  .featured-title {
    font-size: 1.375rem;
  }
  
  .review-item {
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1.25rem;
  }
  
  .review-thumb {
    width: 100%;
    height: 180px;
  }
  
  /* Categories */
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .category-card {
    padding: 1.5rem;
  }
  
  /* Trust Section */
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
}

/* Tablet devices (641px to 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .container-wide {
    padding: 0 1.5rem;
  }
  
  .home-hero {
    padding: 5rem 0 6rem;
    margin-bottom: 0;
  }
  
  .hero-title {
    font-size: 3.25rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .search-input {
    padding: 1.125rem 4.25rem 1.125rem 1.75rem;
    font-size: 1.0625rem;
  }
  
  .hero-stats {
    gap: 4rem;
  }
  
  .stat-number {
    font-size: 3rem;
  }
  
  .stat-label {
    font-size: 0.9375rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  /* Featured Reviews - 2 columns */
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
  
  /* Top Rated Tools - 2 columns */
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* Latest Reviews - Stack vertically */
  .reviews-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .featured-image {
    height: 280px;
  }
  
  /* Categories - 2 columns */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* Trust - 1 column or 3 columns based on width */
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Large tablets and small desktops (1025px to 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .reviews-container {
    grid-template-columns: 1.2fr 1fr;
  }
  
  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop (above 1200px) - Default styles apply */
@media (min-width: 1201px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Force 3 columns for large screens */
@media (min-width: 1400px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
