/**
 * AdSense & Monetization Styles
 * Estilos otimizados para maximizar visibilidade e CTR
 */

/* ===========================================
   AD CONTAINERS - Base Styles
   =========================================== */

.ad-container {
    margin: 1.5rem 0;
    text-align: center;
    clear: both;
    overflow: hidden;
}

.ad-container ins {
    background: transparent;
}

/* Label "Publicidade" discreto */
.ad-label {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

/* ===========================================
   IN-ARTICLE ADS
   =========================================== */

.ad-in-article {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1rem;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}

/* ===========================================
   IN-FEED ADS (entre cards de listagem)
   =========================================== */

.ad-in-feed {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 2px dashed #e2e8f0;
}

.ad-in-feed::before {
    content: "Publicidade";
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* ===========================================
   STICKY SIDEBAR AD
   =========================================== */

.ad-sticky {
    position: sticky;
    top: 100px;
    margin-bottom: 2rem;
}

.ad-sticky-inner {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

/* ===========================================
   REVEAL INFO SYSTEM (Phone/Address)
   =========================================== */

.reveal-container {
    position: relative;
    margin: 1rem 0;
}

/* Info mascarada */
.info-masked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.info-masked:hover {
    border-color: #7dd3fc;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.info-masked .info-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-masked .info-text {
    flex: 1;
    margin-left: 1rem;
}

.info-masked .info-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.info-masked .info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0c4a6e;
    font-family: monospace;
    letter-spacing: 1px;
}

.btn-reveal {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-reveal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-reveal i {
    font-size: 1rem;
}

/* Info revelada */
.info-revealed {
    display: none;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #6ee7b7;
    border-radius: 12px;
    padding: 1.25rem;
    animation: revealPulse 0.5s ease;
}

.info-revealed.show {
    display: block;
}

.info-revealed .info-full {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-revealed .info-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.info-revealed .info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #065f46;
    font-family: 'Inter', sans-serif;
}

.info-revealed .info-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.info-revealed .btn-action {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-action.btn-call {
    background: #10b981;
    color: white;
}

.btn-action.btn-call:hover {
    background: #059669;
}

.btn-action.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-action.btn-whatsapp:hover {
    background: #1da851;
}

.btn-action.btn-copy {
    background: #6366f1;
    color: white;
}

.btn-action.btn-copy:hover {
    background: #4f46e5;
}

@keyframes revealPulse {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   AD + REVEAL COMBO (Strategic Placement)
   =========================================== */

.reveal-ad-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
}

.reveal-ad-section .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reveal-ad-section .section-title i {
    color: var(--primary-color);
}

/* ===========================================
   LOADING STATE
   =========================================== */

.reveal-loading {
    display: none;
    text-align: center;
    padding: 1.5rem;
}

.reveal-loading.show {
    display: block;
}

.reveal-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.reveal-loading p {
    color: #64748b;
    font-size: 0.9rem;
}

/* ===========================================
   MULTIPLEX ADS (Content Recommendations)
   =========================================== */

.ad-multiplex {
    margin: 3rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 16px;
}

.ad-multiplex::before {
    content: "Conteúdo Patrocinado";
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */

@media (max-width: 768px) {
    .info-masked {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .info-masked .info-text {
        margin-left: 0;
    }

    .btn-reveal {
        width: 100%;
        justify-content: center;
    }

    .info-revealed .info-actions {
        flex-direction: column;
    }

    .ad-sticky {
        position: relative;
        top: 0;
    }
}

/* ===========================================
   HIGH VISIBILITY AD ZONES
   =========================================== */

/* Zona de destaque para ad */
.ad-highlight-zone {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 16px;
    padding: 1rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.ad-highlight-zone::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* ===========================================
   INTERSTITIAL TRANSITION (Page Navigation)
   =========================================== */

.page-transition-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.page-transition-overlay.show {
    display: flex;
}

.page-transition-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.page-transition-content h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.page-transition-content .countdown {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.page-transition-content .skip-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
}

.page-transition-content .skip-btn:hover {
    background: #cbd5e1;
}

/* ===========================================
   HEADER LEADERBOARD AD
   =========================================== */

.header-ad-container {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 0.75rem 0;
    border-bottom: 1px solid #cbd5e1;
}

.ad-header-leaderboard {
    margin: 0;
}

.ad-header-leaderboard .ad-container {
    margin: 0;
}

/* ===========================================
   PRE-FOOTER AD ZONE
   =========================================== */

.pre-footer-ad {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 2rem 0;
    margin-top: 2rem;
}

.pre-footer-ad .ad-container {
    margin: 0;
}

.ad-pre-footer::before {
    content: "Publicidade";
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

/* ===========================================
   MOBILE STICKY FOOTER AD
   =========================================== */

.mobile-sticky-ad {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9990;
    padding: 0.5rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}

.mobile-sticky-ad-content {
    max-width: 728px;
    margin: 0 auto;
}

.mobile-sticky-ad .ad-container {
    margin: 0;
}

.mobile-sticky-close {
    position: absolute;
    top: -10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1e293b;
    color: white;
    border: 2px solid white;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.mobile-sticky-close:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Show mobile sticky only on mobile */
@media (max-width: 768px) {
    .mobile-sticky-ad {
        display: block;
    }

    /* Add padding to body so content isn't hidden behind sticky ad */
    body {
        padding-bottom: 90px;
    }
}

/* ===========================================
   AD CARD IN LISTINGS (blend with content)
   =========================================== */

.listing-card.ad-card {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 2px dashed #facc15;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.listing-card.ad-card .ad-in-feed {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* ===========================================
   NATIVE-LOOKING AD STYLING
   =========================================== */

/* Make ads blend more naturally with content */
.ad-native-blend {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}

.ad-native-blend::before {
    content: "Patrocinado";
    display: inline-block;
    font-size: 0.65rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* ===========================================
   ATTENTION-GRABBING PULSE
   =========================================== */

.ad-attention-pulse {
    animation: attentionPulse 2s ease-in-out infinite;
}

@keyframes attentionPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

/* ===========================================
   REVEAL ADDRESS SPECIFIC STYLES
   =========================================== */

.reveal-container.address-reveal .info-masked {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

.reveal-container.address-reveal .info-masked .info-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.reveal-container.address-reveal .info-masked .info-value {
    color: #92400e;
}

.reveal-container.address-reveal .info-revealed {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.reveal-container.address-reveal .info-revealed .info-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.reveal-container.address-reveal .info-revealed .info-value {
    color: #78350f;
    font-size: 1.1rem;
}

.btn-action.btn-directions {
    background: #3b82f6;
    color: white;
}

.btn-action.btn-directions:hover {
    background: #2563eb;
}

/* ===========================================
   SCROLL-TRIGGERED AD VISIBILITY
   =========================================== */

.ad-scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.ad-scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}