/**
 * Hero Carousel & Ad Components Styles
 * Estilos para o carrossel de anúncios da Home e componentes relacionados
 */

/* ================================================
   HOME HERO + TOOLS GRID LAYOUT
   ================================================ */
.home-hero-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 0;
    /* Margin bottom zero para conectar com video grid */
    padding: 0 16px;
    position: relative;
    z-index: 2;
    /* Fica acima do gradiente de conexão */
}

.home-hero-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    align-items: stretch;
}

.home-hero-main {
    min-width: 0;
}

/* Hero com borda neon roxa e glow pulsante */
.home-hero-main .hero-carousel-section {
    margin-bottom: 0;
    width: 100%;
    border: 2px solid rgba(179, 136, 255, 0.5);
    box-shadow:
        0 0 15px rgba(179, 136, 255, 0.2),
        0 8px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.home-hero-main .hero-carousel-section:hover {
    border-color: var(--neon-purple);
    box-shadow:
        0 0 25px rgba(179, 136, 255, 0.4),
        0 12px 50px rgba(0, 0, 0, 0.7);
}

/* Grid de Ferramentas 2x3 */
.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ================================================
   UI/UX 2026: KEYFRAMES
   ================================================ */
@keyframes glow-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 5px currentColor);
    }

    50% {
        filter: drop-shadow(0 0 15px currentColor);
    }
}

/* Estilo Liquid Glass 2026 */
.home-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 20px;

    /* Liquid Glass Effect */
    background: linear-gradient(135deg,
            rgba(30, 25, 45, 0.85) 0%,
            rgba(18, 14, 28, 0.95) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.home-tool-card:hover {
    background: linear-gradient(135deg,
            rgba(40, 32, 55, 0.9) 0%,
            rgba(25, 20, 35, 0.98) 100%);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px var(--card-glow-color, rgba(255, 255, 255, 0.1)),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Tactile Feedback - Squishy Button 2026 */
.home-tool-card:active {
    transform: scale(0.95) translateY(2px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.1s ease;
}

/* Efeito de brilho interno no hover */
.home-tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-tool-card:hover::after {
    opacity: 1;
}

.home-tool-card svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 5px currentColor);
    /* Glow nativo do ícone */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.home-tool-card:hover svg {
    transform: scale(1.15) rotate(5deg);
    animation: glow-pulse 1.5s ease-in-out infinite;
}

.home-tool-card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Cores Nano Banana (Reference Match) */

/* 1. Arsenal - Vermelho Neon */
.home-tool-card:nth-child(1) {
    --card-glow-color: rgba(255, 77, 77, 0.6);
}

.home-tool-card:nth-child(1) svg {
    color: #ff4d4d;
}

/* 2. Calc - Ciano Neon */
.home-tool-card:nth-child(2) {
    --card-glow-color: rgba(0, 224, 255, 0.6);
}

.home-tool-card:nth-child(2) svg {
    color: #00e0ff;
}

/* 3. Projects - Roxo Índigo */
.home-tool-card:nth-child(3) {
    --card-glow-color: rgba(108, 92, 231, 0.6);
}

.home-tool-card:nth-child(3) svg {
    color: #6c5ce7;
}

/* 4. Guides - Amarelo Ouro */
.home-tool-card:nth-child(4) {
    --card-glow-color: rgba(255, 211, 42, 0.6);
}

.home-tool-card:nth-child(4) svg {
    color: #ffd32a;
}

/* 5. Inventory - Verde Neon */
.home-tool-card:nth-child(5) {
    --card-glow-color: rgba(11, 232, 129, 0.6);
}

.home-tool-card:nth-child(5) svg {
    color: #0be881;
}

/* 6. FAQ - Rosa Neon */
.home-tool-card:nth-child(6) {
    --card-glow-color: rgba(255, 107, 129, 0.6);
}

.home-tool-card:nth-child(6) svg {
    color: #ff6b81;
}

/* Tablet: grid abaixo, 3 colunas */
@media (max-width: 968px) {
    .home-hero-grid {
        grid-template-columns: 1fr;
    }

    .home-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: 2 colunas */
@media (max-width: 480px) {
    .home-hero-section {
        padding: 0 8px;
    }

    .home-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .home-tool-card {
        padding: 16px 12px;
    }
}

/* ================================================
   HERO CAROUSEL
   Mesmas dimensões do .highlight-section original
   ================================================ */

.hero-carousel-section {
    position: relative;
    margin: 0 auto 32px auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    width: calc(100% - 16px);
    max-width: none;
    border-radius: 24px;
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 21 / 9;
    background: #000;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .hero-carousel {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 968px) {
    .hero-carousel {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 640px) {
    .hero-carousel-section {
        margin-bottom: 24px;
    }

    .hero-carousel {
        aspect-ratio: 16 / 11;
    }
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    text-decoration: none;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.carousel-slide picture {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Ken Burns Effect - Zoom lento cinematográfico */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08);
    }
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}

/* Ken Burns ativo apenas no slide visível */
.carousel-slide.active .carousel-image {
    animation: kenBurns 10s ease-out forwards;
}

/* Hover adiciona zoom extra sutil */
.carousel-slide:hover .carousel-image {
    transform: scale(1.02);
    animation-play-state: paused;
    /* Pausa Ken Burns no hover */
}

/* Caption (opcional, se habilitado) */
.carousel-slide-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide-inner picture {
    width: 100%;
    height: 100%;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1.5rem 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.carousel-caption--highlight {
    padding: 2rem;
}

.carousel-badge {
    display: inline-block;
    width: fit-content;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary-color, #6366f1);
    color: white;
}

.carousel-badge--ad {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
}

.carousel-badge--short {
    background: #ef4444;
}

.carousel-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-channel,
.carousel-views {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.carousel-views {
    font-size: 0.85rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.85);
}

.carousel-icon {
    width: 14px;
    height: 14px;
    opacity: 0.8;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .carousel-caption {
        padding: 1rem 1rem 1.5rem;
    }

    .carousel-title {
        font-size: 1rem;
    }

    .carousel-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Botões de navegação */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:focus-visible {
    outline: 2px solid var(--primary-color, #6366f1);
    outline-offset: 2px;
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 36px;
        height: 36px;
    }

    .carousel-prev {
        left: 0.5rem;
    }

    .carousel-next {
        right: 0.5rem;
    }
}

/* Indicadores (dots) */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.indicator-dot.active {
    background: var(--primary-color, #6366f1);
    transform: scale(1.2);
}

.indicator-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Play overlay sempre visível */
.carousel-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    /* Mais sutil */
    opacity: 1;
    transition: background 0.3s ease;
}

.carousel-slide:hover .carousel-play-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.carousel-play-overlay svg {
    width: 64px;
    height: 64px;

    /* Premium Glass Button */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    padding: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-slide:hover .carousel-play-overlay svg {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ================================================
   BANNER AD (Horizontal) - Modern Container
   ================================================ */

.banner-ad-section {
    width: 100%;
    max-width: 1200px;
    margin: 1rem auto;
    box-sizing: border-box;
}

.banner-ad-link {
    display: block;
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner-ad-link:hover {
    transform: scale(1.005);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.banner-ad-link:hover .banner-ad-image {
    transform: scale(1.02);
}

.banner-ad-image {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    display: block;
    aspect-ratio: 6 / 1;
    transition: transform 0.4s ease;
}

/* Video Banner (YouTube Embed) */
.banner-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 400px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.banner-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .banner-video-wrapper {
        border-radius: 12px;
        max-height: 280px;
    }
}

/* ================================================
   NATIVE AD CARD (Shorts Feed)
   ================================================ */

.short-native-ad {
    position: relative;
}

.short-native-ad .ad-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffd700;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 5;
    backdrop-filter: blur(4px);
}

.short-native-ad .short-thumbnail {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-secondary, #1a1a1a), var(--bg-secondary, #1a1a1a)) padding-box,
        linear-gradient(135deg, #ffd700, #ff6b6b) border-box;
    border-radius: var(--border-radius, 8px);
}

.short-native-ad:hover .short-thumbnail {
    border-color: #ffd700;
}

/* ================================================
   ADMIN STATS (Mini Cards)
   ================================================ */

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary, #252525);
    border-radius: var(--border-radius, 8px);
    min-width: 80px;
}

.stat-mini .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-mini .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin-top: 4px;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.status-badge.status-active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-badge.status-inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */

@media (max-width: 480px) {
    .hero-carousel-section {
        margin: 0 0 1.5rem;
        border-radius: 0;
    }

    .banner-ad-section {
        padding: 0;
        margin: 1rem 0;
    }

    .banner-ad-link {
        border-radius: 0;
    }

    .carousel-caption {
        font-size: 0.9rem;
        padding: 1rem;
    }
}

/* ================================================
   SHORTS HORIZONTAL GRID (Home Page)
   ================================================ */

.shorts-home-section .section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.shorts-home-section .section-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    color: var(--text-secondary, #e4dcf7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.shorts-home-section .section-link:hover {
    background: var(--neon-pink, #ff66cc);
    border-color: var(--neon-pink, #ff66cc);
    color: white;
    box-shadow: 0 0 20px rgba(255, 102, 204, 0.4);
    transform: translateY(-2px);
    text-decoration: none;
}

.shorts-horizontal-grid {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-tertiary, #444) transparent;
    -webkit-overflow-scrolling: touch;
}

.shorts-horizontal-grid::-webkit-scrollbar {
    height: 6px;
}

.shorts-horizontal-grid::-webkit-scrollbar-track {
    background: transparent;
}

.shorts-horizontal-grid::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary, #444);
    border-radius: 3px;
}

.short-home-card {
    flex: 0 0 auto;
    width: 140px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.short-home-card:hover {
    transform: scale(1.03);
}

.short-home-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary, #1a1a2e);
}

.short-home-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.short-home-thumb .short-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.short-home-card:hover .short-play-icon {
    opacity: 1;
}

.short-home-thumb .short-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.short-home-thumb .ad-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(255, 193, 7, 0.9);
    color: black;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.short-home-title {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Native Ad styling in Home shorts grid */
.short-home-card.short-native-ad .short-home-thumb {
    border: 2px solid rgba(255, 193, 7, 0.4);
}

@media (max-width: 768px) {
    .short-home-card {
        width: 120px;
    }

    .shorts-home-section .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .shorts-home-section .section-link {
        margin-left: 0;
    }
}