/* Homepage-specific styles for Rabeekit Redesign */

/* ------------------------- */
/* --- General & Layout --- */
/* ------------------------- */

body.homepage {
  background: var(--card); /* Use white for a more premium, app-like feel */
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hp-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.hp-section {
  padding: 100px 0;
}

@media (max-width: 768px) {
  .hp-section {
    padding: 80px 0;
  }
}

/* ------------------------- */
/* --- Sticky Header --- */
/* ------------------------- */

.hp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

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

.hp-header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.hp-header-nav a {
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hp-header-nav a:hover {
  color: var(--ink);
}

.hp-header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hp-icon-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.hp-icon-btn:hover {
  color: var(--ink);
}

.hp-icon-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}

@media (max-width: 992px) {
  .hp-header-nav { display: none; } /* Simplified for mobile */
}

/* ------------------------- */
/* --- Hero Section --- */
/* ------------------------- */

.hp-hero {
  text-align: center;
  padding: 120px 0 80px;
}

.hp-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hp-hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-transform: uppercase;
  color: var(--ink);
}

.hp-hero p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hp-hero { padding: 80px 0 60px; }
  .hp-hero h1 { font-size: clamp(40px, 10vw, 48px); }
  .hp-hero p { font-size: 16px; }
}

/* ------------------------- */
/* --- Global Search --- */
/* ------------------------- */

.hp-search-wrap {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.hp-search-input {
  width: 100%;
  height: 60px;
  padding: 0 24px 0 56px;
  font-family: 'Work Sans', sans-serif;
  font-size: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background-color: var(--card);
  color: var(--ink);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.hp-search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.2), 0 4px 12px rgba(0,0,0,0.04);
}

.hp-search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

/* ------------------------- */
/* --- Calculator Grid --- */
/* ------------------------- */

.hp-grid-title {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.hp-grid-title h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 36px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.hp-grid-title p {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
}

.hp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hp-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.hp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
  border-color: var(--line);
}

.hp-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background-color: var(--teal);
  color: white;
}

.hp-card-icon svg {
  width: 22px;
  height: 22px;
}

.hp-card h3 {
  font-family: 'Work Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.hp-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

.hp-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-dark);
}

@media (max-width: 1024px) {
  .hp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hp-grid { grid-template-columns: 1fr; }
}

/* ------------------------- */
/* --- Category Sections --- */
/* ------------------------- */

.hp-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 640px) {
  .hp-category-grid { grid-template-columns: 1fr; }
}

/* ------------------------- */
/* --- Why RabeeKit --- */
/* ------------------------- */

.hp-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .hp-features-grid { grid-template-columns: 1fr; }
}

/* ------------------------- */
/* --- FAQ Section --- */
/* ------------------------- */

.hp-faq-wrap {
  max-width: 800px;
  margin: 0 auto;
}

/* Using existing .faq-list styles from style.css */

/* ------------------------- */
/* --- Footer --- */
/* ------------------------- */

.hp-footer {
  background: #F7F8F5; /* A slightly off-white bg for footer */
  padding: 80px 0;
  border-top: 1px solid var(--line-soft);
}

.hp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.hp-footer-col h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 16px;
}

.hp-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hp-footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.hp-footer-col a:hover {
  color: var(--ink);
}

.hp-footer-bottom {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.hp-footer-bottom a {
  color: var(--ink-soft);
  text-decoration: none;
}
.hp-footer-bottom a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hp-footer-grid { grid-template-columns: 1fr 1fr; }
  .hp-footer-bottom { flex-direction: column; gap: 16px; }
}

/* Search results container */
#hp-search-results {
  padding-top: 60px;
}

/* Hide sections when searching */
.searching .hp-hide-on-search {
  display: none;
}