@import './shared.css';

body {
    background: var(--white);
    color: var(--text-dark);
}

section {
    line-height: 1.8;
}

/* ==========================================================================
   PAGE TITLE (replaces hero section)
   ========================================================================== */
.page-title {
    font-size: var(--font-size-display-lg);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.page-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-light);
    max-width: 800px;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ==========================================================================
   PROSE (long-form info pages: accessibility, privacy, terms)
   ========================================================================== */
.prose {
    max-width: 800px;
    line-height: 1.8;
}

.prose h1 {
    color: var(--theme-primary);
    border-bottom: 2px solid var(--gray-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.prose h2 {
    font-size: var(--font-size-lg);
    color: var(--text-dark);
    margin-top: 30px;
    margin-bottom: 8px;
}

.prose section {
    padding: 0;
    margin-bottom: 25px;
}

.prose p {
    margin-bottom: 12px;
}

.prose ul {
    margin: 10px 0;
    padding-inline-end: 20px;
}

.prose li {
    margin-bottom: 5px;
}

.prose .notice {
    font-weight: bold;
    color: #b45309;
    border: 2px solid #b45309;
    padding: 15px;
    background: #fef3c7;
    margin: 20px 0;
    border-radius: 4px;
}

/* ==========================================================================
   LAYOUT & SECTIONS
   ========================================================================== */
section {
    padding: 70px 0;
}

.bg-white {
    background-color: var(--white);
}

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: var(--font-size-display-sm);
    font-weight: 700;
    color: var(--theme-dark);
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: var(--font-size-lg);
    margin-bottom: 48px;
    max-width: 800px;
    margin-inline: auto;
}

/* ==========================================================================
   HERO (landing page search section)
   ========================================================================== */

/* Stretch hero to fill remaining viewport so no white gap appears below footer */
body:has(.hero) {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body:has(.hero) .hero {
    flex: 1;
}

.hero {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-dark) 100%);
    text-align: center;
    padding: clamp(24px, 6vh, 72px) 0;
}

.hero h1 {
    font-size: var(--font-size-display-md);
    font-weight: 400;
    color: var(--white);
    line-height: 1.4;
    max-width: 720px;
    margin: 0 auto 32px;
}

.hero-search {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
}

.hero-search textarea {
    flex: 1;
    block-size: auto;
    padding-inline: 20px;
    padding-block: 14px;
    border: none;
    border-radius: 26px;
    font-size: var(--font-size-lg);
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--white);
    outline: none;
    resize: none;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s;
}

.hero-search textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.hero-search button {
    flex-shrink: 0;
    align-self: flex-end;
    block-size: 52px;
    padding-inline: 24px;
    border: none;
    border-radius: 26px;
    background: var(--white);
    color: var(--theme-primary);
    font-size: var(--font-size-lg);
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, color 0.2s;
}

.hero-search button:hover {
    background: var(--theme-light);
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: var(--font-size-display-sm);
    }

    .hero-search textarea {
        border-radius: 14px;
    }

    .hero-search button {
        border-radius: 14px;
    }
}

/* ==========================================================================
   INTRO GRID (two-column intro section)
   ========================================================================== */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
}

.intro-heading {
    font-size: var(--font-size-display-lg);
    font-weight: 700;
    color: var(--theme-dark);
    margin-bottom: 16px;
}

.intro-text {
    color: var(--text-light);
    font-size: var(--font-size-lg);
    margin-bottom: 16px;
}

.intro-text + .intro-text {
    margin-bottom: 24px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
}

/* ==========================================================================
   FEATURE LIST (right-column of intro grid)
   ========================================================================== */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.feature-card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-card-body strong {
    color: var(--theme-dark);
    display: block;
    margin-bottom: 4px;
}

.feature-card-body span {
    color: var(--text-light);
    font-size: var(--font-size-md);
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 28px 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: start;
}

a.card {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.card .icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    display: inline-block;
}

.card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--theme-dark);
    margin-bottom: 10px;
}

.card p {
    font-size: var(--font-size-md);
    color: var(--text-light);
    margin: 0;
}

/* Card variants */
.card-centered {
    text-align: center;
}

.card-primary {
    border-top: 4px solid var(--theme-primary);
}

.card-neutral {
    border-top: 4px solid var(--gray-border);
}

.card-neutral h3 {
    color: var(--text-dark);
}

/* Color-accented cards */
.card-track-green {
    border-top: 4px solid #22c55e;
}

.card-track-green h3 {
    color: #15803d;
}

.card-track-blue {
    border-top: 4px solid #3b82f6;
}

.card-track-blue h3 {
    color: #1d4ed8;
}

.card-track-purple {
    border-top: 4px solid #a855f7;
}

.card-track-purple h3 {
    color: var(--theme-primary);
}

/* ==========================================================================
   PROCESS STEPS
   ========================================================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.step-card {
    background: var(--gray-bg);
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    padding: 28px 16px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.step-card:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.1);
    transform: translateY(-4px);
    border-color: var(--theme-primary);
}

/* Highlighted step (Gefen Chat step) */
.step-card.highlight-step {
    background: var(--theme-light);
    border: 2px solid var(--theme-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    margin-top: -10px;
    z-index: 10;
}

.step-card.highlight-step:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transform: translateY(-6px);
}

.step-card.highlight-step::before {
    content: 'הכלי שלנו';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--theme-primary);
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Approved step (vaada-melavah) */
.step-card.step-approved {
    border-color: var(--theme-primary);
}

.step-card.step-approved .step-num {
    background: var(--theme-dark);
}

.step-card.step-approved h3 {
    color: var(--theme-dark);
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--text-light);
    color: #fff;
    border-radius: 50%;
    font-size: var(--font-size-lg);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step-card.highlight-step .step-num {
    background: var(--theme-dark);
    font-size: var(--font-size-xl);
}

.step-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-card.highlight-step h3 {
    color: var(--theme-dark);
    font-size: var(--font-size-lg);
}

.step-card p {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.step-card a {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.step-card a:hover {
    color: var(--theme-primary);
}

.step-card.highlight-step a {
    background: var(--theme-primary);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
}

.step-card.highlight-step a:hover {
    background: var(--theme-dark);
    color: #fff;
}

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

.faq-item {
    background: var(--white);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: var(--theme-primary);
}

.faq-question {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--theme-dark);
    font-size: var(--font-size-lg);
    user-select: none;
    transition: background 0.3s;
}

.faq-question:hover {
    background-color: var(--theme-light);
}

.faq-question.active {
    background-color: var(--theme-primary);
    color: var(--white);
}

.faq-toggle {
    font-size: var(--font-size-md);
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

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

.faq-answer.show {
    max-height: 500px;
    padding: 20px 24px;
    border-top: 1px solid var(--theme-border);
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

/* ==========================================================================
   BLOG INDEX CARDS
   ========================================================================== */
.blog-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.blog-index-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    padding: 28px 24px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border-top: 4px solid var(--card-accent, var(--theme-primary));
}

.blog-index-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--card-accent, var(--theme-primary));
}

.blog-index-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--card-accent, var(--theme-primary));
    margin-bottom: 10px;
}

.blog-index-card p {
    font-size: var(--font-size-md);
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   CROSS-LINK CARDS
   ========================================================================== */
.cross-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.cross-link-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.cross-link-card:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

.cross-link-card h3 {
    color: var(--theme-primary);
    font-size: var(--font-size-lg);
    margin-bottom: 8px;
}

.cross-link-card p {
    color: var(--text-light);
    font-size: var(--font-size-md);
    margin: 0;
}

.cross-link-card .arrow {
    color: var(--theme-primary);
    font-weight: 700;
    margin-top: 12px;
    display: inline-block;
}

/* ==========================================================================
   BOTTOM CTA
   ========================================================================== */
.bottom-cta {
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-primary) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 24px;
}

.bottom-cta h2 {
    font-size: var(--font-size-display-lg);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--white);
}

.bottom-cta p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.cta-btn {
    display: inline-block;
    background: var(--white);
    color: var(--theme-primary);
    padding: 16px 40px;
    border-radius: 50px;
    font-size: var(--font-size-lg);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    background: var(--theme-light);
    color: var(--theme-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background: var(--text-dark);
    color: #94a3b8;
    padding: 60px 24px 20px;
    text-align: start;
    font-size: var(--font-size-md);
}

.footer-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: var(--font-size-lg);
}

.footer-logo {
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: var(--theme-border);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

footer a {
    color: #c4b5fd;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #fff;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    color: #64748b;
}

.copyright-minimal {
    border-top: none;
    padding-top: 0;
}

footer:has(.copyright-minimal) {
    padding: 24px;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: #94a3b8;
    font-size: var(--font-size-sm);
}

.footer-legal-links a:hover {
    color: #fff;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .step-card.highlight-step {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.7rem;
    }

    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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