/**
 * HOME MODERNA - Estilos Adicionais
 * Arquivo CSS complementar para o template HOME MODERNA
 * Pode ser enfileirado separadamente para melhor performance
 */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   HERO SECTION (sem fundo próprio — herda o fundo da página)
   Variáveis do Customizer mantidas para uso futuro ou extensões
   ========================================== */

.home-hero {
    --hero-bg-start: #1a363a;
    --hero-bg-end: #2a5c5e;
    margin-bottom: 40px;
    padding: clamp(2rem, 5vw, 3.75rem) 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 30;
    overflow: visible;
    isolation: auto;
    color: #fff;
    background: none transparent;
}

.home-hero::before,
.home-hero::after {
    content: none;
    display: none;
}

.hero-content-wrapper,
.hero-text {
    position: relative;
    z-index: auto;
    text-align: left;
}

.hero-search-container {
    margin-top: 0;
    max-width: 700px;
    animation: fadeInUp 0.65s ease both;
}

.hero-search-form {
    position: relative;
    z-index: 5;
}

.hero-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 60px;
    padding: 8px 8px 8px 20px;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

@supports not (backdrop-filter: blur(1px)) {
    .hero-search-wrapper {
        background: rgba(35, 55, 58, 0.85);
    }
}

.hero-search-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.hero-search-wrapper:hover,
.hero-search-wrapper:focus-within {
    border-color: rgba(156, 0, 106, 0.35);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(156, 0, 106, 0.15);
    background: rgba(255, 255, 255, 0.14);
}

.hero-search-wrapper:hover::before,
.hero-search-wrapper:focus-within::before {
    opacity: 1;
}

.hero-search-icon {
    color: rgba(255, 255, 255, 0.65);
    font-size: 24px;
    margin-right: 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.hero-search-wrapper:focus-within .hero-search-icon {
    color: #c2187a;
    transform: rotate(90deg);
}

.hero-search-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    padding: 18px 0;
    font-size: 1.1em;
    color: #fff;
    font-weight: 500;
}

.hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

.hero-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.hero-search-input::-webkit-search-cancel-button::before {
    content: "×";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
}

.hero-search-btn {
    background: linear-gradient(135deg, #9c006a 0%, #5c003a 100%);
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 22px rgba(156, 0, 106, 0.32);
    position: relative;
    overflow: hidden;
}

.hero-search-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-search-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 28px rgba(156, 0, 106, 0.38);
}

.hero-search-btn:hover::before {
    opacity: 1;
}

.hero-search-btn:active {
    transform: scale(0.98);
}

.hero-search-btn i {
    font-size: 22px;
    transition: transform 0.3s ease;
}

.hero-search-btn:hover i {
    transform: translateX(4px);
}

.hero-search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    animation: slideDown 0.3s ease;
}

.hero-search-suggestions.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-suggestion-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background: rgba(156, 0, 106, 0.18);
}

.search-suggestion-icon {
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
}

.search-suggestion-text {
    flex: 1;
    color: #fff;
    font-size: 1em;
}

.hero-search-shortcuts {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.35rem;
    padding-left: 4px;
}

.search-shortcut-tag {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 8px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 0.875em;
    font-weight: 500;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.search-shortcut-tag .material-icons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    font-style: normal;
    opacity: 0.85;
}

.search-shortcut-tag:hover {
    background: rgba(156, 0, 106, 0.22);
    border-color: rgba(156, 0, 106, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.hero-cta-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    animation: fadeInUp 0.8s ease;
}

.hero-cta-content {
    flex: 1;
    max-width: 600px;
}

.hero-cta-icon {
    font-size: 4em;
    margin-bottom: 20px;
    line-height: 1;
    animation: fadeInUp 0.65s ease 0.08s both;
}

.hero-cta-title {
    color: #fff;
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: none;
}

.hero-cta-subtitle {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hero-cta-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    font-weight: 500;
}

.hero-cta-features li i {
    color: #4ade80;
    font-size: 20px;
}

.hero-cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-cta-btn i {
    font-size: 24px;
}

.hero-cta-btn.primary {
    background: linear-gradient(135deg, #9c006a 0%, #5c003a 100%);
    color: #fff;
}

.hero-cta-btn.primary:hover {
    background: linear-gradient(135deg, #b30078 0%, #6d0044 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(156, 0, 106, 0.4);
}

.hero-cta-btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.hero-cta-note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
    margin: 0;
}

.hero-cta-note i {
    font-size: 18px;
    color: #4ade80;
}

.hero-cta-visual {
    flex-shrink: 0;
    position: relative;
}

.hero-cta-circle {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
    position: relative;
}

.hero-cta-circle::before {
    content: "";
    position: absolute;
    inset: -20px;
    background: linear-gradient(135deg, #9c006a 0%, #2a5c5e 100%);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(30px);
    z-index: -1;
}

.hero-cta-circle i {
    font-size: 100px;
    color: rgba(255, 255, 255, 0.9);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 2.5rem 0;
    }

    .hero-search-container {
        max-width: 100%;
    }

    .hero-search-wrapper {
        padding: 6px 6px 6px 15px;
    }

    .hero-search-input {
        font-size: 1em;
        padding: 14px 0;
    }

    .hero-search-btn {
        padding: 12px 20px;
    }

    .hero-search-btn span {
        display: none;
    }

    .hero-search-shortcuts {
        justify-content: center;
    }

    .hero-cta-container {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .hero-cta-content {
        max-width: 100%;
    }

    .hero-cta-subtitle {
        font-size: 1.1em;
    }

    .hero-cta-features {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-cta-icon {
        animation: none;
    }

    .hero-cta-circle {
        width: 180px;
        height: 180px;
        animation: none;
    }

    .hero-cta-circle i {
        font-size: 70px;
        animation: none;
    }

    .hero-cta-buttons {
        flex-direction: column;
    }

    .hero-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .home-hero {
        padding: 1.85rem 0;
    }

    .hero-cta-icon {
        font-size: 3em;
    }

    .hero-cta-circle {
        width: 150px;
        height: 150px;
    }

    .hero-cta-circle i {
        font-size: 60px;
    }

    .hero-cta-circle::before {
        display: none;
    }

    .hero-cta-btn {
        padding: 14px 24px;
        font-size: 1em;
    }

    .hero-cta-features li {
        font-size: 0.95em;
    }
}

/* ==========================================
   SECTION HEADERS
   ========================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
    position: relative;
    padding-bottom: 5px;
}

.section-header h2:before {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #00FF8C 0%, #4A90E2 100%);
    border-radius: 2px;
}

/* ==========================================
   BADGES
   ========================================== */

.section-badge {
    background: linear-gradient(135deg, #00FF8C 0%, #4A90E2 100%);
    color: #121212;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 255, 140, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.section-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 140, 0.5);
}

/* ==========================================
   WIDGET SECTIONS
   ========================================== */

.widget-section {
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.widget-section:nth-child(1) { animation-delay: 0.1s; }
.widget-section:nth-child(2) { animation-delay: 0.2s; }
.widget-section:nth-child(3) { animation-delay: 0.3s; }

/* ==========================================
   FEATURED SECTIONS
   ========================================== */

.featured-section {
    background: linear-gradient(135deg, #5C003A 0%, #9C006A 100%);
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.featured-section::after {
    content: "✨";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2em;
    opacity: 0.3;
}

/* ==========================================
   STATS SECTION
   ========================================== */

.stats-section {
    background: #121212;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    margin: 40px 0;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #333;
}

.stats-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stats-section h3 {
    margin-bottom: 15px;
    color: #FFFFFF;
    font-weight: 700;
}

/* ==========================================
   AD SECTIONS
   ========================================== */

.ad-section {
    margin: 50px 0;
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.ad-section::before,
.ad-section::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00FF8C, transparent);
}

.ad-section::before { top: 0; }
.ad-section::after { bottom: 0; }

/* ==========================================
   DIVIDERS
   ========================================== */

.divider-wave {
    height: 50px;
    background: linear-gradient(135deg, #00FF8C 0%, #4A90E2 100%);
    margin: 40px 0;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 100%);
    opacity: 0.8;
}

.divider-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #00FF8C, #4A90E2, transparent);
    margin: 40px 0;
}

/* ==========================================
   CONTENT GRID
   ========================================== */

.content-grid {
    display: grid;
    gap: 30px;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   VIDEO AD
   ========================================== */

.video-ad {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.video-ad:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-ad video {
    width: 100%;
    border-radius: 10px;
    display: block;
}

/* ==========================================
   ITEMS GRID (Override theme defaults)
   ========================================== */

.item-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.item-grid > * {
    padding: 10px;
}

.item {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   LOADING STATES
   ========================================== */

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 10px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   SCROLL TO TOP BUTTON
   ========================================== */

.scroll-to-top {
    position: fixed;
    bottom: 50px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00FF8C 0%, #4A90E2 100%);
    color: #121212;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 140, 0.4);
    z-index: 9999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 255, 140, 0.6);
}

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

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header h2 {
        font-size: 1.6em;
    }

    .section-badge {
        font-size: 0.8em;
        padding: 6px 15px;
    }

    .widget-section {
        margin-bottom: 40px;
    }

    .featured-section {
        padding: 25px;
    }

    .featured-section::after {
        font-size: 1.5em;
    }

    .stats-section {
        padding: 20px;
    }

    .ad-section {
        margin: 30px 0;
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.3em;
    }

    .widget-section {
        margin-bottom: 30px;
    }
}

/* ==========================================
   DARK MODE (Optional)
   ========================================== */

@media (prefers-color-scheme: dark) {
    .dark-mode-enabled .widget-section {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .dark-mode-enabled .section-header h2 {
        color: #ffffff;
    }

    .dark-mode-enabled .stats-section {
        background: #2a2a2a;
        color: #ffffff;
    }

    .dark-mode-enabled .featured-section {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .home-hero,
    .ad-section,
    .video-ad,
    .scroll-to-top,
    .divider-wave {
        display: none;
    }

    .widget-section {
        page-break-inside: avoid;
        margin-bottom: 30px;
    }

    .section-header {
        border-bottom: 2px solid #000;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .section-badge,
    .scroll-to-top {
        border: 2px solid currentColor;
    }

    .divider-wave {
        opacity: 1;
    }
}

/* ==========================================
   HOME MODERNA — refinamento desktop (conteúdo abaixo do hero)
   ========================================== */

@media (min-width: 992px) {
    body.template-home-moderna .widget-section {
        position: relative;
        border-radius: 18px !important;
        padding: 28px 32px !important;
        margin-bottom: 36px !important;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.07) inset,
            0 22px 48px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(0, 0, 0, 0.35);
        overflow: hidden;
    }

    body.template-home-moderna .section-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px 20px;
        text-align: left;
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.template-home-moderna .section-header h2 {
        font-size: clamp(1.35rem, 2vw, 1.65rem);
        font-weight: 700;
        letter-spacing: -0.02em;
        line-height: 1.25;
        margin: 0;
    }

    body.template-home-moderna .widget-section.featured-section {
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.1) inset,
            0 24px 56px rgba(92, 0, 58, 0.35),
            0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    body.template-home-moderna .home-hero .hero-search-container {
        max-width: min(720px, 100%);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

