/* JoyProxy homepage — varied layouts (tabs, split panels, scroll lists) */

.home-wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.home-section { padding: 88px 0; }
.home-section--alt { background: #f8f9fc; }
.home-section-head { text-align: center; margin-bottom: 40px; }
.home-section-head .section-tag {
    display: inline-block;
    background: rgba(102,126,234,0.1);
    color: #667eea;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.home-section-head .section-title { font-size: clamp(1.75rem, 3vw, 2.35rem); margin-bottom: 12px; }
.home-section-head .section-desc {
    max-width: none;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
    white-space: nowrap;
    text-wrap: nowrap;
}

/* Pill tabs (Decodo / Oxylabs style) */
.pill-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #eef1f6;
    border-radius: 999px;
    margin: 0 auto 36px;
    flex-wrap: wrap;
    justify-content: center;
}
.pill-tabs button {
    border: none;
    background: transparent;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.pill-tabs button.active,
.pill-tabs button[aria-selected="true"] {
    background: #fff;
    color: var(--text);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}
.tab-panel { display: none; animation: homeFade 0.35s ease; }
.tab-panel.active { display: block; }
@keyframes homeFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Products: intro + list rows (not boxes) */
.solutions-layout { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 40px; align-items: start; }
.solutions-intro h3 { font-size: 1.35rem; font-weight: 800; margin: 0 0 12px; color: var(--text); }
.solutions-intro p { margin: 0; font-size: 0.95rem; line-height: 1.7; color: var(--text-secondary); }
.solutions-list { border-top: 1px solid var(--border); }
.home-overview-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.home-overview-link:hover { text-decoration: underline; }
.solution-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px 20px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.solution-row:hover { background: linear-gradient(90deg, rgba(102,126,234,0.04), transparent); }
.solution-row .sr-icon { font-size: 1.75rem; line-height: 1; }
.solution-row .sr-body strong { display: block; font-size: 1.05rem; margin-bottom: 4px; color: var(--text); }
.solution-row .sr-body .sr-price { font-size: 0.82rem; font-weight: 700; color: #667eea; }
.solution-row .sr-body .sr-price--free {
    color: #389e0d;
    background: rgba(82, 196, 26, 0.12);
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-block;
    margin-top: 4px;
}
.solution-row .sr-body .sr-price--new {
    color: #fff;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-block;
    margin-top: 4px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}
.solution-row .sr-body p { margin: 8px 0 0; font-size: 0.88rem; line-height: 1.55; color: var(--text-secondary); max-width: 520px; }
.solution-row .sr-cta {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(102,126,234,0.35);
    background: rgba(102,126,234,0.06);
    transition: all 0.2s;
}
.solution-row:hover .sr-cta { background: #667eea; color: #fff; }
.solutions-footer { text-align: center; margin-top: 28px; font-size: 0.92rem; color: var(--text-secondary); }
.solutions-footer a { color: var(--primary); font-weight: 700; text-decoration: none; margin: 0 6px; }

/* Timeline (how it works) */
.timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0.25;
    z-index: 0;
}
.timeline-step { flex: 1; text-align: center; padding: 0 12px; position: relative; z-index: 1; }
.timeline-step .tl-num {
    width: 44px; height: 44px; margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; font-weight: 800; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(102,126,234,0.35);
}
.timeline-step h3 { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.timeline-step p { font-size: 0.86rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }

/* Use cases: horizontal tabs + split showcase */
.usecase-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}
.usecase-tabs button {
    border: 1px solid var(--border);
    background: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.usecase-tabs button.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: #fff;
}
.usecase-showcase {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    min-height: 360px;
    position: relative;
}
.usecase-panel { display: none; }
.usecase-panel.active { display: grid; grid-template-columns: 1.05fr 0.95fr; animation: homeFade 0.35s ease; }
.usecase-copy {
    padding: 40px 36px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.usecase-copy h3 { font-size: 1.65rem; font-weight: 800; margin: 0 0 14px; }
.usecase-copy p { font-size: 1rem; line-height: 1.7; color: var(--text-secondary); margin: 0 0 20px; }
.usecase-copy a {
    align-self: flex-start;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: auto;
}
.usecase-copy a:hover { text-decoration: underline; }
.usecase-visual {
    padding: 32px 28px;
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: stretch;
}
.uv-card {
    width: 100%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 16px;
    padding: 24px 22px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0;
}
.uv-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.88;
    margin-bottom: 14px;
}
.uv-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.uv-tags span {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.28);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}
.uv-list {
    margin: 0 0 20px;
    padding-left: 18px;
    font-size: 0.88rem;
    line-height: 1.65;
    opacity: 0.96;
    flex: 1;
}
.uv-list li { margin-bottom: 10px; }
.uv-list li:last-child { margin-bottom: 0; }
.uv-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
}
.uv-metric {
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
}
.uv-metric strong { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.uv-metric span { display: block; font-size: 0.74rem; opacity: 0.88; margin-top: 4px; line-height: 1.3; }

/* Global: 5-row country grid (no scroll) */
.country-grid-home {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}
.country-item-home {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 0;
}
.country-item-home img {
    width: 32px;
    height: 22px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.country-item-home span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.country-item-home.country-more-item {
    justify-content: center;
    background: linear-gradient(135deg, rgba(102,126,234,0.06), rgba(118,75,162,0.06));
    font-size: 1.25rem;
}
.country-item-home.country-more-item span { white-space: normal; text-align: center; }
.global-section-footer { text-align: center; margin-top: 32px; }
.global-section-footer a { color: var(--primary); font-weight: 700; text-decoration: none; font-size: 1rem; }
.global-section-footer a:hover { text-decoration: underline; }

/* Platform: accordion left + visual right */
.platform-split {
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    gap: 48px;
    align-items: stretch;
}
.platform-acc { display: flex; flex-direction: column; }
.acc-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.acc-item .acc-link { position: relative; z-index: 1; }
.acc-item:first-child { border-top: 1px solid var(--border); }
.acc-item .acc-title { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.acc-item .acc-chevron { font-size: 0.75rem; color: var(--text-light); transition: transform 0.2s; }
.acc-item.active .acc-chevron { transform: rotate(180deg); }
.acc-item .acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s;
    opacity: 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
}
.acc-item.active .acc-body { max-height: 120px; opacity: 1; padding-top: 10px; }
.acc-item .acc-link { display: inline-block; margin-top: 10px; font-weight: 700; color: #667eea; text-decoration: none; font-size: 0.88rem; }
.platform-visual {
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(102,126,234,0.12) 0%, rgba(118,75,162,0.08) 100%);
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}
.platform-visual .pv-layer { display: none; animation: homeFade 0.3s ease; }
.platform-visual .pv-layer.active { display: block; }
.platform-visual .pv-icon { font-size: 2.5rem; margin-bottom: 16px; }
.platform-visual h4 { font-size: 1.25rem; font-weight: 800; margin: 0 0 10px; color: var(--text); }
.platform-visual p { margin: 0 0 12px; font-size: 0.92rem; line-height: 1.65; color: var(--text-secondary); }
.platform-visual .pv-lead { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.platform-visual .pv-list {
    margin: 0 0 18px;
    padding-left: 18px;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-secondary);
}
.platform-visual .pv-list li { margin-bottom: 8px; }
.platform-visual .pv-list li:last-child { margin-bottom: 0; }
.platform-visual code {
    display: block;
    background: #1e1e2e;
    color: #a6e3a1;
    padding: 16px;
    border-radius: 12px;
    font-size: 0.78rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Features: minimal grid, light dividers */
.features-minimal {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}
.feat-cell {
    padding: 28px 22px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.feat-cell:nth-child(4n) { border-right: none; }
.feat-cell:nth-last-child(-n+4) { border-bottom: none; }
.feat-cell .feat-icon { font-size: 1.75rem; margin-bottom: 10px; display: block; }
.feat-cell h4 { font-size: 0.95rem; font-weight: 700; margin: 0 0 8px; }
.feat-cell p { font-size: 0.82rem; line-height: 1.55; color: var(--text-secondary); margin: 0; }

/* Blog: featured + popular list (no scroll) */
.blog-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    min-height: 0;
}
.blog-featured {
    padding: 36px;
    border-right: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: background 0.2s;
}
.blog-featured:hover { background: #fafbfc; }
.blog-featured .bf-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); margin-bottom: 12px; }
.blog-featured .bf-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.blog-featured .bf-tag { font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: rgba(102,126,234,0.1); color: #667eea; }
.blog-featured h3 { font-size: 1.35rem; font-weight: 800; line-height: 1.4; margin: 0 0 12px; color: var(--text); }
.blog-featured p { font-size: 0.95rem; line-height: 1.75; color: var(--text-secondary); margin: 0 0 auto; flex: 1; max-width: none; }
.blog-featured .bf-read { margin-top: 20px; font-weight: 700; color: #667eea; font-size: 0.9rem; }
.blog-side { display: flex; flex-direction: column; min-height: 0; }
.blog-side-head { padding: 20px 24px 12px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.blog-popular-list {
    flex: 1;
    padding: 0;
    overflow: visible;
}
.blog-popular-item {
    display: block;
    padding: 16px 24px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.blog-popular-item:last-child { border-bottom: none; }
.blog-popular-item:hover { background: rgba(102,126,234,0.04); }
.blog-popular-item .bs-tags { font-size: 0.7rem; font-weight: 700; color: #667eea; margin-bottom: 6px; }
.blog-popular-item h4 { font-size: 0.92rem; font-weight: 700; line-height: 1.4; margin: 0 0 6px; color: var(--text); }
.blog-popular-item time { font-size: 0.78rem; color: var(--text-light); }
.blog-hub-footer { text-align: center; margin-top: 24px; }
.blog-hub-footer a { font-weight: 700; color: var(--primary); text-decoration: none; }

/* Testimonials: 2 rows × 3 columns (no scroll) */
.testimonials-grid-home {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.testimonial-card-home {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    border: 1px solid var(--border);
    height: 100%;
}
.testimonial-card-home .testimonial-rating { color: #ffc107; font-size: 1.1rem; margin-bottom: 12px; }
.testimonial-card-home .testimonial-content { color: var(--text-secondary); line-height: 1.75; font-style: italic; font-size: 0.92rem; }
.testimonial-card-home .testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.testimonial-card-home .author-avatar { width: 44px; height: 44px; background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; flex-shrink: 0; }
.testimonial-card-home .author-info strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.testimonial-card-home .author-info span { font-size: 0.8rem; color: var(--text-light); }

.cta-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 80px 0; text-align: center; }
.cta-section h2 { font-size: 2.5rem; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.cta-section p { font-size: 1.1rem; margin-bottom: 32px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.btn-cta { display: inline-block; padding: 16px 48px; background: white; color: var(--primary); border-radius: 50px; font-weight: 700; font-size: 1.1rem; text-decoration: none; transition: all 0.3s; border: none; cursor: pointer; font-family: inherit; }
.btn-cta:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.btn-cta-outline { display: inline-block; padding: 16px 40px; background: transparent; color: white; border: 2px solid rgba(255,255,255,0.45); border-radius: 50px; font-weight: 700; font-size: 1.05rem; text-decoration: none; transition: all 0.3s; }
.btn-cta-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.home-product-tabs-wrap { text-align: center; }

@media (max-width: 992px) {
    .solutions-layout,
    .usecase-panel.active,
    .platform-split,
    .blog-split { grid-template-columns: 1fr; }
    .country-grid-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .testimonials-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .usecase-visual { min-height: 200px; }
    .blog-featured { border-right: none; border-bottom: 1px solid var(--border); }
    .timeline { flex-direction: column; gap: 28px; }
    .timeline::before { display: none; }
    .features-minimal { grid-template-columns: repeat(2, 1fr); }
    .feat-cell:nth-child(4n) { border-right: 1px solid var(--border); }
    .feat-cell:nth-child(2n) { border-right: none; }
}
@media (max-width: 768px) {
    .home-section-head .section-desc {
        white-space: normal;
        text-wrap: balance;
        max-width: 90%;
    }
    .country-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .testimonials-grid-home { grid-template-columns: 1fr; }
    .features-minimal { grid-template-columns: 1fr; }
    .feat-cell { border-right: none !important; }
    .solution-row { grid-template-columns: auto 1fr; }
    .solution-row .sr-cta { grid-column: 2; justify-self: start; margin-top: 4px; }
}
