/* ================================================================
   HOME.CSS — Homepage-specific design enhancements
   ================================================================ */

/* ── Platform stats bar ──────────────────────────────────────────── */
.home-stats-bar {
    background: #fff;
    border-bottom: 1px solid rgba(196, 154, 108, 0.2);
    box-shadow: 0 4px 24px rgba(27, 94, 32, 0.07);
    padding: 1.75rem 0;
    position: relative;
    z-index: 1;
}

.home-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.home-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 3rem;
    text-align: center;
    gap: 0.25rem;
}

.home-stat-num {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--dark-green);
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
    display: inline-block;
}

.home-stat-suffix {
    font-size: 0.55em;
    font-weight: 600;
    color: var(--soft-gold);
    vertical-align: super;
    margin-left: 1px;
}

.home-stat-label {
    font-size: 0.72rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 500;
}

.home-stat-icon {
    font-size: 1rem;
    color: var(--soft-gold);
    margin-bottom: 0.2rem;
}

.home-stat-divider {
    width: 1px;
    height: 2.8rem;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(196, 154, 108, 0.4),
        transparent
    );
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .home-stats-row   { gap: 0.5rem; }
    .home-stat        { padding: 0.5rem 1.5rem; }
    .home-stat-divider { display: none; }
}

/* ── Skeleton shimmer ────────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -700px 0; }
    100% { background-position:  700px 0; }
}

.home-skel-img,
.home-skel-line {
    background: linear-gradient(
        90deg,
        #eeeeee 25%,
        #e0e0e0 37%,
        #eeeeee 63%
    );
    background-size: 700px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 6px;
}

/* Tour skeletons inside carousel track */
.home-skeleton-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    flex: 0 0 clamp(260px, 30vw, 320px);
    min-width: 0;
}

.home-skel-img {
    height: 200px;
    border-radius: 0;
    background-size: 700px 100%;
}

.home-skel-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.home-skel-line {
    height: 12px;
}

.home-skel-title  { height: 18px; width: 78%; }
.home-skel-stars  { height: 11px; width: 45%; }
.home-skel-desc   { height: 11px; width: 62%; }
.home-skel-price  { height: 14px; width: 35%; margin-top: 0.2rem; }

/* Testimonial skeleton */
.home-skel-testimonial {
    border-radius: 12px;
    height: 200px;
    flex: 0 0 360px;
    min-width: 260px;
    border-radius: 12px;
}

/* ── Home tour cards ─────────────────────────────────────────────── */
.home-tour-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--dark-gray);
    cursor: pointer;
}

.home-tour-card:hover,
.home-tour-card:focus {
    color: var(--dark-gray);
    text-decoration: none;
}

/* Stronger card image with bottom gradient */
.home-tour-card .card-image {
    overflow: hidden;
    position: relative;
    transition: background-image 0.3s ease;
}

.home-tour-card .card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.06) 48%,
        transparent 68%
    );
    pointer-events: none;
    z-index: 1;
}

/* Difficulty badge on card image */
.home-diff-badge {
    position: absolute;
    bottom: 0.65rem;
    left: 0.65rem;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.home-diff-facil        { background: rgba(46, 125, 50, 0.92);  color: #fff; }
.home-diff-moderado     { background: rgba(196, 154, 108, 0.92); color: #fff; }
.home-diff-dificil      { background: rgba(211, 47, 47, 0.92);   color: #fff; }
.home-diff-muito_dificil { background: rgba(123, 31, 162, 0.92); color: #fff; }

/* Category badge repositioned for card */
.home-tour-card .card-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    right: auto;
    z-index: 2;
    font-size: 0.68rem;
    border-radius: 4px;
}

.home-tour-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-green);
    line-height: 1.35;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stars within card */
.home-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 0.75rem;
}

.home-stars .fas.fa-star { color: var(--soft-gold); }
.home-stars .far.fa-star { color: #ddd; }

/* Empty state for carousel when API fails */
.home-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.6;
    width: 100%;
    font-style: italic;
    color: var(--dark-gray);
}

/* ── Testimonials: tour attribution line ─────────────────────────── */
.testimonial-tour {
    font-size: 0.78rem;
    color: var(--soft-gold);
    margin-bottom: 0.45rem;
    font-weight: 500;
}

.testimonial-tour i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

/* Rating stars in testimonials */
.testimonial-rating i.fas { color: var(--soft-gold); }
.testimonial-rating i.far { color: #ddd; }

/* ── Testimonials: grid layout (replaces old carousel) ───────────── */
.home-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Skeleton card inside grid */
.home-skel-testimonial {
    border-radius: 12px;
    height: 200px;
    background: linear-gradient(
        90deg,
        #eeeeee 25%,
        #e0e0e0 37%,
        #eeeeee 63%
    );
    background-size: 700px 100%;
    animation: shimmer 1.5s infinite linear;
}

/* ── Categories: live count chip ─────────────────────────────────── */
.category-count {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--moss-green);
    background: rgba(46, 125, 50, 0.08);
    border-radius: 20px;
    padding: 0.15rem 0.55rem;
    margin-top: 0.4rem;
}

/* ── Latest blog: section hidden by default ──────────────────────── */
.latest-blog-section[hidden] { display: none !important; }

/* ── CTA: text alignment ─────────────────────────────────────────── */
.section-cta {
    margin-top: 2rem;
    text-align: center;
}

/* ── Responsive tweaks ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .home-stat            { padding: 0 1.25rem; }
    .home-testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .home-skeleton-card { flex: 0 0 240px; }
}
