/**
 * Estilos da página aplicativo.php
 * Design moderno e responsivo para apresentação do PWA
 */

/* ===== VARIÁVEIS CSS ===== */
:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s ease;
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
.app-hero {
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.app-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-icon {
    font-size: 16px;
}

.badge-text {
    font-size: 14px;
    font-weight: 500;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title .highlight {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 18px;
}

.feature-text {
    font-size: 14px;
    font-weight: 500;
}

/* ===== BOTÃO DE INSTALAÇÃO ===== */
.btn-install-app {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-install-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-install-app:hover::before {
    left: 100%;
}

.btn-install-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.4);
}

.btn-install-app:active {
    transform: translateY(0);
}

.btn-install-app.btn-large {
    padding: 20px 40px;
    font-size: 20px;
}

.btn-icon {
    font-size: 24px;
}

.install-status {
    margin-top: 16px;
    text-align: center;
}

.status-text {
    font-size: 14px;
    opacity: 0.8;
}

/* ===== MOCKUP DO TELEFONE ===== */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.app-preview {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.app-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.app-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

.app-content {
    flex: 1;
}

.preview-section {
    margin-bottom: 24px;
}

.preview-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark-color);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.product-item {
    height: 60px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    border-radius: 8px;
}

.contact-preview {
    display: flex;
    justify-content: center;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: var(--white);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
}

.whatsapp-icon {
    font-size: 16px;
}

/* ===== SEÇÕES GERAIS ===== */
.app-features,
.app-screenshots,
.app-cta,
.installation-guide {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark-color);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CARDS DE FEATURES ===== */
.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border: 1px solid #f0f0f0;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card .feature-icon {
    font-size: 3rem;
    margin-bottom: 24px;
    display: block;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--dark-color);
}

.feature-description {
    color: var(--secondary-color);
    line-height: 1.6;
}

/* ===== SCREENSHOTS ===== */
.screenshots-carousel {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}

.screenshot-item {
    flex: 0 0 300px;
    scroll-snap-align: center;
}

.screenshot-mockup {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition);
}

.screenshot-mockup:hover {
    transform: scale(1.05);
}

.screenshot-content {
    padding: 30px;
}

.screenshot-header {
    text-align: center;
    margin-bottom: 24px;
}

.screenshot-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.screenshot-header p {
    color: var(--secondary-color);
    font-size: 14px;
}

.screenshot-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-element {
    height: 40px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
}

.preview-element:nth-child(2) {
    height: 60px;
}

.preview-element:nth-child(3) {
    height: 80px;
}

/* ===== CTA SECTION ===== */
.app-cta {
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-description {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.cta-info {
    margin-top: 16px;
}

.cta-info p {
    font-size: 16px;
    opacity: 0.9;
}

/* ===== GUIA DE INSTALAÇÃO ===== */
.guide-step {
    text-align: center;
    padding: 30px 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-md);
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark-color);
}

.step-content p {
    color: var(--secondary-color);
    line-height: 1.6;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
        margin-top: 40px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .screenshots-carousel {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .app-hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .feature-item {
        width: 100%;
        justify-content: center;
    }
    
    .btn-install-app {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .phone-mockup {
        width: 180px;
        height: 360px;
    }
    
    .app-features,
    .app-screenshots,
    .app-cta,
    .installation-guide {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .screenshots-carousel {
        flex-direction: column;
        align-items: center;
    }
    
    .screenshot-item {
        flex: none;
        width: 100%;
        max-width: 300px;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .btn-install-app {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn-icon {
        font-size: 20px;
    }
    
    .phone-mockup {
        width: 160px;
        height: 320px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .feature-card {
        padding: 24px 16px;
    }
    
    .feature-card .feature-icon {
        font-size: 2.5rem;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-visual {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.feature-card {
    animation: fadeInUp 0.6s ease-out;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.btn-install-app:hover {
    animation: pulse 0.6s ease-in-out;
}

/* ===== ESTADOS DE CARREGAMENTO ===== */
.btn-install-app.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-install-app.loading .btn-text::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== MODO ESCURO ===== */
@media (prefers-color-scheme: dark) {
    .feature-card {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .feature-title {
        color: #e2e8f0;
    }
    
    .feature-description {
        color: #a0aec0;
    }
    
    .screenshot-mockup {
        background: #2d3748;
    }
    
    .screenshot-header h4 {
        color: #e2e8f0;
    }
    
    .screenshot-header p {
        color: #a0aec0;
    }
    
    .step-content h3 {
        color: #e2e8f0;
    }
    
    .step-content p {
        color: #a0aec0;
    }
}

/* ===== IMPRESSÃO ===== */
@media print {
    .app-hero,
    .app-cta {
        background: none !important;
        color: #000 !important;
    }
    
    .btn-install-app {
        display: none;
    }
}
