/* style.css - Todos os estilos do site */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #eef2f5;
    color: #1e3a3f;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

/* Imagem de fundo fixa em todo body */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://sistemaz.net/images/imagem_gratuita_2.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -2;
}

/* Gradiente em TODO body */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #eef4ea 0%, rgba(221, 235, 218, 0.85) 40%, rgba(210, 228, 205, 0.5) 75%, rgba(200, 220, 195, 0.1) 100%);
    z-index: -1;
    pointer-events: none;
}

/* SweetAlert2 Custom Styles */
.swal2-popup-custom {
    border-radius: 28px !important;
    padding: 1.5rem !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-title-custom {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.swal2-confirm-custom {
    padding: 10px 24px !important;
    border-radius: 40px !important;
    font-weight: 600 !important;
}

.swal2-cancel-custom {
    padding: 10px 24px !important;
    border-radius: 40px !important;
    font-weight: 600 !important;
}


/* Topbar translúcida com efeito de scroll */
.topbar {
    background: rgba(10, 31, 28, 0.85);
    backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(44, 122, 94, 0.3);
    transition: all 0.3s ease;
}

.topbar.scrolled {
    padding: 0.5rem 2rem;
    background: rgba(10, 31, 28, 0.95);
    backdrop-filter: blur(16px);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 46px;
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(111, 207, 151, 0.5));
    transition: all 0.3s ease;
}

.logo-img:hover {
    filter: drop-shadow(0 0 12px rgba(111, 207, 151, 0.8));
    transform: scale(1.02);
}

.topbar.scrolled .logo-img {
    height: 38px;
}

.company-name {
    font-weight: 700;
    font-size: 1.25rem;
    color: #c8f0e0;
    letter-spacing: -0.3px;
    transition: font-size 0.3s ease;
}

.topbar.scrolled .company-name {
    font-size: 1.1rem;
}

/* Menu Desktop */
.desktop-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.desktop-menu a {
    color: #c8f0e0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    white-space: nowrap;
}

.desktop-menu a:hover {
    color: #6fcf97;
}

.btn-login {
    background: #2c7a5e;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    color: white !important;
    font-weight: 600 !important;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-login:hover {
    background: #3fa37f;
    transform: translateY(-2px);
}

/* Menu Mobile */
.mobile-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    display: none;
    z-index: 1002;
}

.mobile-menu-btn span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #c8f0e0;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.25s ease-in-out;
}

.mobile-menu-btn span:nth-child(1) { top: 0px; }
.mobile-menu-btn span:nth-child(2) { top: 10px; }
.mobile-menu-btn span:nth-child(3) { top: 20px; }

.mobile-menu-btn.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.mobile-menu-btn.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #0f2c28;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    z-index: 1001;
    overflow-y: auto;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
}

.side-nav.open {
    transform: translateX(0);
}

.side-nav .nav-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #2c7a5e;
    background: #0f2c28;
}

.side-nav .nav-header h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #6fcf97;
}

.side-nav .nav-header p {
    font-size: 0.8rem;
    color: #b8e0cc;
    margin-top: 0.3rem;
}

.side-nav ul {
    list-style: none;
    padding: 1rem;
}

.side-nav li {
    margin: 0.5rem 0;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: #c8f0e0;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.side-nav a i {
    width: 24px;
    color: #5fcf97;
}

.side-nav a:hover {
    background: #1f4d45;
}

.side-nav .btn-login-mobile {
    background: #2c7a5e;
    margin-top: 1rem;
    justify-content: center;
}

.side-nav .btn-login-mobile:hover {
    background: #3fa37f;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.menu-overlay.active {
    display: block;
}

/* SLIDESHOW HERO */
.hero-slideshow {
    width: 100%;
    height: 390px;
    position: relative;
    overflow: hidden;
    background: rgba(15, 44, 40, 0.45);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    display: flex;
    opacity: 1;
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(1.02); }
    to { opacity: 1; transform: scale(1); }
}

.hero-slide-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    color: white;
}

.hero-slide-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff, #6fcf97);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-slide-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
    max-width: 700px;
}

.hero-slide-content .btn-slide {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background: #2c7a5e;
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.3s;
}

.hero-slide-content .btn-slide:hover {
    background: #3fa37f;
    transform: translateY(-3px);
}

.hero-slide-nav {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.hero-dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.hero-dot.active, .hero-dot:hover {
    background-color: #6fcf97;
    transform: scale(1.2);
}

.hero-prev, .hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    font-size: 1.2rem;
}

.hero-prev { left: 20px; }
.hero-next { right: 20px; }

.hero-prev:hover, .hero-next:hover {
    background: #2c7a5e;
    transform: translateY(-50%) scale(1.05);
}

@media (max-width: 768px) {
    .hero-slideshow { height: 420px; }
    .hero-slide-content h1 { font-size: 1.6rem; }
    .hero-slide-content p { font-size: 0.95rem; }
    .hero-prev, .hero-next { width: 35px; height: 35px; font-size: 0.9rem; }
    .hero-prev { left: 10px; }
    .hero-next { right: 10px; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2rem 0 2rem;
    border-left: 5px solid #2c7a5e;
    padding-left: 1rem;
    color: #1f5e4d;
}

.projetos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.projeto-card {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(2px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(44, 122, 94, 0.25);
    transition: transform 0.2s;
}

.projeto-card:hover {
    transform: translateY(-5px);
}

.projeto-desc {
    padding: 1.2rem 1.2rem 0.5rem 1.2rem;
}

.projeto-desc h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1c6b55;
}

.projeto-desc p {
    margin-top: 0.3rem;
    color: #3e6d5d;
    font-size: 0.85rem;
}

.mockup-showcase {
    display: flex;
    justify-content: center;
    padding: 1rem 1.2rem 1.8rem;
}

.overlay-container {
    position: relative;
    display: inline-block;
}

.desktop-img {
    display: block;
    width: 260px;
    max-width: 100%;
    border-radius: 14px;
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.2);
    border: 1px solid #d0e2d8;
}

.mobile-overlay {
    position: absolute;
    bottom: -18px;
    right: -22px;
    width: 100px;
    z-index: 10;
}

.mobile-overlay img {
    width: 100%;
    border-radius: 14px;
    border: 2px solid white;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1000px) {
    .desktop-img { width: 220px; }
    .mobile-overlay { width: 85px; bottom: -15px; right: -15px; }
}

@media (max-width: 768px) {
    .desktop-menu { display: none; }
    .mobile-menu-btn { display: block; }
    .projetos-grid { flex-direction: column; align-items: center; }
    .container { padding: 1rem; }
    .topbar { padding: 0.8rem 1rem; }
}

.softwares-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    margin: 2rem 0;
}

.software-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid #d4e8df;
}

.software-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f6e58;
}

.software-card p {
    margin: 0.8rem 0;
    color: #3e6d5d;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1f6e58;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
    font-size: 0.85rem;
}

.btn-download:hover {
    background: #0f4e3e;
    transform: translateY(-2px);
}

.badge {
    font-size: 0.7rem;
    background: #e0f0ea;
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
    margin-left: 0.5rem;
    color: #1f6e58;
}

footer {
    background: rgba(10, 31, 28, 0.9);
    backdrop-filter: blur(4px);
    text-align: center;
    padding: 1.8rem;
    border-top: 1px solid #2c7a5e;
    color: #b8e0cc;
    margin-top: 2rem;
}

.projetos-detalhe {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
    display: none;
    justify-content: center;
    align-items: center;
}

.detalhe-content {
    background: white;
    max-width: 550px;
    width: 90%;
    padding: 2rem;
    border-radius: 28px;
    position: relative;
}

.close-detalhe {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.6rem;
    cursor: pointer;
    background: none;
    border: none;
}

.btn-projeto-info {
    background: none;
    border: none;
    color: #1f6e58;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    text-decoration: underline;
    font-size: 0.8rem;
}

/* MODAIS - Estilos */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.login-modal.active {
    display: flex;
}

.login-modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 28px;
    padding: 2rem;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #64748b;
}

.login-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s;
}

.login-tab.active {
    color: #1f6e58;
    border-bottom: 2px solid #1f6e58;
    margin-bottom: -2px;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.login-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.95rem;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
}

.login-form button {
    width: 100%;
    padding: 0.8rem;
    background: #1f6e58;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.login-form button:hover {
    background: #0f4e3e;
    transform: translateY(-2px);
}

.camera-area {
    text-align: center;
    margin: 1rem 0;
}

#webcam {
    width: 100%;
    max-width: 200px;
    border-radius: 50%;
    margin: 0 auto;
    border: 3px solid #1f6e58;
}

.cam-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.cam-controls button {
    width: auto;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    margin: 0;
}

.webcam-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    font-size: 2rem;
    color: #64748b;
}

.webcam-placeholder span {
    font-size: 0.7rem;
    margin-top: 0.5rem;
}

/* Botões do modal de logout */
#cancelarLogout:hover {
    background: #e2e8f0 !important;
    transform: translateY(-2px);
}

#confirmarLogout:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    transform: translateY(-2px);
}

/* ========== BOTÃO FLUTUANTE PWA ========== */
.pwa-install-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1f5e4d 0%, #2c7a5e 100%);
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(31, 94, 77, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(31, 94, 77, 0.6);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 4px 15px rgba(31, 94, 77, 0.4);
        transform: scale(1);
    }
}

.pwa-install-button:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #2c7a5e 0%, #3fa37f 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.pwa-install-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.pwa-install-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.pwa-install-title {
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
}

.pwa-install-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}

.pwa-install-button.hidden {
    display: none;
}

@media (max-width: 768px) {
    .pwa-install-button {
        padding: 8px 16px;
        bottom: 15px;
        right: 15px;
    }
    
    .pwa-install-icon {
        font-size: 1.2rem;
    }
    
    .pwa-install-title {
        font-size: 0.8rem;
    }
    
    .pwa-install-subtitle {
        font-size: 0.65rem;
    }
}