/**
 * home.css — Homepage-specific styles
 *
 * Loaded only on index.php via $extra_head <link>.
 * Uses CSS custom properties defined in main.css.
 * Sections follow the same order they appear on the page:
 *   1. Hero buttons
 *   2. Why Choose Us (zigzag)
 *   3. How It Works (steps)
 *   4. Services Preview
 *   5. Testimonials carousel
 *   6. Team Teaser
 *   7. Blog Teaser
 *   7b. Newsletter Home
 *   8. Final CTA
 *   9. Responsive overrides
 */

/* ─── 1. Hero buttons ───────────────────────────────────────────────────── */
.page-header .hero-buttons {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

/* ─── 2. Why Choose Us — Zigzag layout ─────────────────────────────────── */
.why-section { padding: 90px 20px; background: var(--c-bg-card); }
.why-section .section-subtitle {
    text-align: center;
    color: var(--c-text-muted);
    font-size: 18px;
    max-width: 650px;
    margin: -30px auto 60px;
    line-height: 1.7;
}
.zigzag-item {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto 70px;
}
.zigzag-item:last-child { margin-bottom: 0; }
.zigzag-item.reverse    { flex-direction: row-reverse; }
.zigzag-image {
    flex: 0 0 48%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.zigzag-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}
.zigzag-text { flex: 1; }
.zigzag-text h3 { font-size: 26px; margin-bottom: 16px; color: var(--c-text); }
.zigzag-text p  { color: var(--c-text-muted); line-height: 1.8; font-size: 16px; }

/* ─── 3. How It Works ───────────────────────────────────────────────────── */
.steps-section { padding: 90px 20px; background: var(--c-bg-alt); }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    max-width: 960px;
    margin: 0 auto;
    position: relative;
}
/* Connector line between steps — hidden on mobile */
.steps-grid::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--c-primary-bg);
}
@media (max-width: 820px) { .steps-grid::before { display: none; } }

.step-card {
    text-align: center;
    position: relative;
    background: var(--c-bg-card);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}
.step-card h3 { font-size: 20px; margin-bottom: 12px; color: var(--c-text); }
.step-card p  { color: var(--c-text-muted); line-height: 1.7; font-size: 15px; }

/* ─── 4. Services Preview ───────────────────────────────────────────────── */
.services-preview { padding: 90px 20px; background: var(--c-bg-card); }
.services-preview .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1100px;
    margin: 0 auto;
}
.services-preview .view-all { text-align: center; margin-top: 50px; }
.view-all-link {
    display: inline-block;
    padding: 14px 36px;
    border: 2px solid var(--c-primary);
    color: var(--c-primary-dark);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
    min-height: 44px;
    line-height: 1.4;
}
.view-all-link:hover {
    background: var(--c-primary);
    color: white;
}

/* ─── 5. Testimonials — Carousel ────────────────────────────────────────── */
.testimonials-section { padding: 90px 20px; background: var(--c-bg-alt); }

.testimonial-carousel {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px;
}
.carousel-track-wrapper { overflow: hidden; }
.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.4s ease;
}
.testimonial-slide {
    flex: 0 0 calc((100% - 60px) / 3); /* 3 visible, 2 gaps */
    min-width: 0;
}
.testimonial-card {
    background: var(--c-bg-card);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.testimonial-card::before {
    content: "\201C";
    font-size: 60px;
    color: var(--c-primary-bg);
    font-family: Georgia, serif;
    position: absolute;
    top: 15px;
    left: 25px;
    line-height: 1;
}
.testimonial-text {
    font-style: italic;
    color: var(--c-text-2);
    line-height: 1.8;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    flex: 1;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.testimonial-name { font-weight: 600; color: var(--c-text); }
.testimonial-role { font-size: 14px; color: var(--c-text-muted); }
/* Stars: terracotta accent — also paired with numeric label for color-blind users */
.testimonial-stars { color: var(--c-accent); margin-bottom: 15px; font-size: 18px; letter-spacing: 2px; }

/* Navigation arrows */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--c-border);
    background: var(--c-bg-card);
    box-shadow: var(--shadow-md);
    font-size: 22px;
    color: var(--c-primary);
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn:hover { background: var(--c-primary); color: white; border-color: var(--c-primary); }
.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

/* Dot indicators */
.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--c-border);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}
.carousel-dot.active { background: var(--c-primary); transform: scale(1.3); }

.testimonials-disclaimer {
    text-align: center;
    margin-top: 35px;
    font-size: 13px;
    color: var(--c-text-muted);
    font-style: italic;
}

/* ─── 6. Team Teaser ─────────────────────────────────────────────────────── */
.team-teaser { padding: 80px 20px; background: var(--c-bg-card); }
.team-teaser .section-subtitle {
    text-align: center;
    color: var(--c-text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: -30px auto 50px;
    line-height: 1.7;
}
.team-strip {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}
.team-strip-item {
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition);
}
.team-strip-item:hover { transform: translateY(-4px); }
.team-strip-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--c-bg-card);
    outline: 2px solid var(--c-primary-light);
}
.team-strip-name  { font-weight: 600; font-size: 15px; color: var(--c-text); display: block; }
.team-strip-title { font-size: 13px; color: var(--c-text-muted); display: block; }
.team-teaser .view-all { text-align: center; margin-top: 40px; }

/* ─── 7. Blog Teaser ─────────────────────────────────────────────────────── */
.blog-teaser { padding: 90px 20px; background: var(--c-bg-alt); }
.blog-teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}
.blog-teaser .view-all { text-align: center; margin-top: 50px; }

/* ─── 7b. Newsletter Home ───────────────────────────────────────────────── */
.newsletter-home { padding: 90px 20px; background: var(--c-bg-card); }
.newsletter-home-card {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    background: var(--c-bg-alt);
    padding: 50px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}
.newsletter-home-icon {
    font-size: 44px;
    margin-bottom: 12px;
    line-height: 1;
}
.newsletter-home-card h2 { font-size: 30px; margin: 0 0 14px; color: var(--c-text); }
.newsletter-home-desc {
    font-size: 16px;
    color: var(--c-text-muted);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 30px;
}
.newsletter-home-fields { display: flex; gap: 10px; justify-content: center; }
.nl-home-input {
    padding: 14px 18px;
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--c-bg-card);
    color: var(--c-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    box-sizing: border-box;
}
.nl-home-input:focus {
    border-color: var(--c-primary);
    box-shadow: var(--focus-ring);
}
.nl-home-input:first-child  { flex: 0 0 160px; }
.nl-home-input:nth-child(2) { flex: 1; min-width: 0; }
.nl-home-btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity var(--transition), transform var(--transition);
    font-family: inherit;
    min-height: 44px;
}
.nl-home-btn:hover   { opacity: 0.9; transform: translateY(-1px); }
.nl-home-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.nl-home-msg {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
}
.nl-home-msg.nl-success { background: var(--c-success-bg); color: var(--c-success); border-left: 4px solid var(--c-success); }
.nl-home-msg.nl-error   { background: var(--c-error-bg);   color: var(--c-error);   border-left: 4px solid var(--c-error); }
.newsletter-home-privacy { margin: 20px 0 0; font-size: 13px; color: var(--c-text-muted); }
.newsletter-home-privacy a { color: var(--c-primary-dark); text-decoration: none; }
.newsletter-home-privacy a:hover { text-decoration: underline; }

/* ─── 8. Final CTA ──────────────────────────────────────────────────────── */
.final-cta {
    background: var(--gradient-hero);
    color: white;
    padding: 100px 20px;
    text-align: center;
}
.final-cta h2 { font-size: 38px; margin-bottom: 18px; }
.final-cta p {
    font-size: 19px;
    opacity: 0.92;
    max-width: 550px;
    margin: 0 auto 40px;
    line-height: 1.6;
}
.final-cta .cta-btn    { font-size: 17px; padding: 16px 44px; }
.final-cta .cta-subtext { margin-top: 18px; font-size: 14px; opacity: 0.7; }

/* ─── 9. Responsive ─────────────────────────────────────────────────────── */

/* Tablet: show 2 testimonial cards */
@media (max-width: 1024px) {
    .testimonial-slide { flex: 0 0 calc((100% - 30px) / 2); }
    .carousel-prev { left: 0; }
    .carousel-next { right: 0; }
}

/* Mobile: 1 testimonial card full width */
@media (max-width: 640px) {
    .testimonial-slide { flex: 0 0 100%; }
}

@media (max-width: 768px) {
    .zigzag-item,
    .zigzag-item.reverse    { flex-direction: column; gap: 30px; }
    .zigzag-image           { flex: none; width: 100%; }
    .zigzag-image img       { height: 240px; }
    .zigzag-text h3         { font-size: 22px; }
    .steps-grid             { gap: 30px; }
    .team-strip             { gap: 30px; }
    .blog-teaser-grid       { grid-template-columns: 1fr; }
    .newsletter-home-card   { padding: 36px 24px; }
    .newsletter-home-card h2 { font-size: 24px; }
    .newsletter-home-fields { flex-direction: column; }
    .nl-home-input:first-child  { flex: none; }
    .nl-home-input:nth-child(2) { flex: none; }
    .final-cta h2           { font-size: 28px; }
}
