/* projetos.css */

.projetos-hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #071b49 0%, #0d2f75 50%, #114ea3 100%);
    position: relative;
    overflow: hidden;
    color: #fff;
}

.projetos-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(38, 133, 190, 0.4) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid-projetos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.badge-projetos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(38, 133, 190, 0.2);
    border: 1px solid rgba(38, 133, 190, 0.4);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #a3def5;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.projetos-hero h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 24px;
}

.projetos-hero h1 span {
    color: #a3def5;
    white-space: normal;
}

.projetos-hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-features-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero-mockups {
    position: relative;
    width: 100%;
    height: 500px;
    perspective: 1000px;
}

.mockup-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateY(-10deg) rotateX(5deg);
    width: 90%;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(38, 133, 190, 0.4);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: float-main 8s ease-in-out infinite alternate;
}

.mockup-mobile {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 140px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 3;
    border: 4px solid #111;
    animation: float-mobile 6s ease-in-out infinite alternate;
}

.mockup-float-1,
.mockup-float-2 {
    position: absolute;
    background: rgba(13, 47, 117, 0.8);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mockup-float-1 {
    top: 15%;
    right: 0;
    animation: float-badge 7s ease-in-out infinite;
}

.mockup-float-2 {
    bottom: 20%;
    right: 10px;
    animation: float-badge 9s ease-in-out infinite alternate;
}

@keyframes float-main {
    0% {
        transform: translate(-50%, -50%) rotateY(-10deg) rotateX(5deg) translateY(0);
    }

    100% {
        transform: translate(-50%, -50%) rotateY(-10deg) rotateX(5deg) translateY(-20px);
    }
}

@keyframes float-mobile {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-15px);
    }
}

@keyframes float-badge {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-10px);
    }
}


/* Filtros */
.projetos-conteudo-wrapper {
    position: relative;
    z-index: 10;
}

.sticky-filters {
    position: sticky;
    top: 60px;
    /* Header height */
    z-index: 90;
    /* Below header, above cards */
    padding: 20px 0;
    /* Reduced padding when sticky for better real estate */
    box-shadow: 0 10px 30px rgba(4, 16, 46, 0.9);
    /* Subtle shadow for separation */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filtros-section {
    padding: 40px 0;
    background: #04102e;
}

.filtros-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filtros-pills {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    width: 100%;
}

.filtros-pills::-webkit-scrollbar {
    display: none;
}

.filtro-pill {
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filtro-pill:hover,
.filtro-pill.active {
    background: #2685be;
    border-color: #2685be;
    box-shadow: 0 0 15px rgba(38, 133, 190, 0.4);
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 8px 16px;
    width: 300px;
    color: rgba(255, 255, 255, 0.7);
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    padding-left: 10px;
    font-family: inherit;
    background: transparent;
    color: #fff;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Destaque */
.destaque-section {
    padding: 60px 0 20px;
    background: #04102e;
}

.destaque-card {
    background: #071b49;
    border-radius: 24px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.destaque-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(38, 133, 190, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.destaque-img-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.destaque-img-wrap img {
    width: 100%;
    display: block;
}

.destaque-info h4 {
    color: #a3def5;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.destaque-info h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.destaque-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.tech-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.destaque-metrics {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    flex-wrap: wrap;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-val {
    font-size: 1.4rem;
    font-weight: 700;
}

.metric-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.destaque-actions {
    display: flex;
    gap: 16px;
}

/* Grid de Projetos */
.projetos-grid-section {
    padding: 40px 0 120px;
    background: #04102e;
}

.section-title-light {
    color: #fff;
    margin-bottom: 40px;
}

.projetos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.projeto-card {
    background: #071b49;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.projeto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(38, 133, 190, 0.3);
    border-color: rgba(38, 133, 190, 0.5);
}

.projeto-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #04102e;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.projeto-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.9;
}

.projeto-card:hover .projeto-img img {
    transform: scale(1.05);
    opacity: 1;
}

.projeto-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.projeto-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.projeto-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: #2685be;
    box-shadow: 0 4px 10px rgba(38, 133, 190, 0.4);
}

.projeto-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.projeto-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.projeto-techs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.p-tech {
    background: rgba(255, 255, 255, 0.1);
    color: #a3def5;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.projeto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-open .status-dot {
    background: #16a34a;
    box-shadow: 0 0 8px #16a34a;
}

.status-private .status-dot {
    background: #ea580c;
    box-shadow: 0 0 8px #ea580c;
}

.projeto-links {
    display: flex;
    gap: 10px;
}

/* Tecnologias Section */
.tech-section {
    padding: 100px 0;
    background: #071b49;
    color: #fff;
    text-align: center;
    position: relative;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
}

.tech-item {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.tech-item:hover {
    color: #fff;
    transform: translateY(-10px);
    text-shadow: 0 0 20px rgba(38, 133, 190, 0.6);
}

/* CTA */
.cta-projetos {
    padding: 100px 0;
    background: #04102e;
}

.cta-projetos-card {
    background: linear-gradient(135deg, #114ea3 0%, #2685be 100%);
    border-radius: 24px;
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(38, 133, 190, 0.3);
}

.cta-projetos-card h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 16px;
}

.cta-projetos-card p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-benefits {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.cta-benefits span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.cta-projetos-photo img {
    width: 100%;
    border-radius: 16px;
}

.cta-projetos-icon {
    font-size: 6rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
        transform: scale(1.05);
    }
}

@media (max-width: 1024px) {
    .projetos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .destaque-card {
        grid-template-columns: 1fr;
    }

    .cta-projetos-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-benefits span {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .projetos-hero {
        padding: 120px 0 60px;
    }

    .projetos-hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .projetos-hero p {
        font-size: 1rem;
        margin-inline: auto;
    }

    .hero-grid-projetos {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-features-row {
        justify-content: center;
    }

    .projetos-grid {
        grid-template-columns: 1fr;
    }

    .filtros-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        width: 100%;
    }

    .hero-mockups {
        height: 350px;
    }
}

/* ===== App Store Modal ===== */
.app-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 16, 46, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.app-modal-content {
    background: #04102e;
    width: 100%;
    max-width: 860px;
    height: 90vh;
    border-radius: 24px 24px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 768px) {
    .app-modal-overlay {
        align-items: center;
    }

    .app-modal-content {
        height: 85vh;
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateY(30px) scale(0.95);
    }

    .app-modal-overlay.is-open .app-modal-content {
        transform: translateY(0) scale(1);
    }
}

.app-modal-overlay.is-open .app-modal-content {
    transform: translateY(0);
}

.app-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.app-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.app-modal-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 30px;
}

.app-modal-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.app-modal-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.app-modal-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.app-modal-header {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 30px;
}

.app-modal-logo {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    background: #2685be;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.projeto-logo img,
.app-modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.app-modal-header-info {
    flex-grow: 1;
}

.app-modal-header-info h2 {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.2;
}

.app-modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 20px;
}

.app-modal-actions {
    display: flex;
    gap: 12px;
}

.app-modal-actions .btn-blue {
    padding: 10px 24px;
    font-size: 0.95rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #fff;
}

.app-modal-actions .btn-outline {
    padding: 10px 24px;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
    background-color: green;
}

.app-modal-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.app-modal-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

.app-modal-gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}

.app-modal-gallery::-webkit-scrollbar {
    height: 6px;
}

.app-modal-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.app-modal-gallery::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.app-modal-gallery img {
    height: 320px;
    border-radius: 16px;
    object-fit: cover;
    scroll-snap-align: start;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-modal-gallery img:hover {
    transform: scale(1.02);
}

.app-modal-body h3 {
    font-size: 1.3rem;
    color: #fff;
    margin: 30px 0 16px;
}

.app-modal-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.7;
}

.app-modal-desc p {
    margin-bottom: 16px;
}

.app-modal-desc ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.app-modal-desc li {
    margin-bottom: 8px;
}

.app-modal-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.app-modal-tech-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #a3def5;
}

.app-modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.app-modal-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 16px;
    min-width: 0;
}

.app-modal-stat-val {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.app-modal-stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    word-break: break-word;
    overflow-wrap: break-word;
}

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

    .app-modal-gallery img {
        height: 240px;
    }

    .app-modal-scroll-area {
        padding: 30px 16px;
    }

    .app-modal-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }

    .app-modal-stat-card {
        padding: 15px 12px;
    }

    .app-modal-stat-val {
        font-size: 1.35rem;
    }

    .app-modal-stat-label {
        font-size: 0.75rem;
    }
}

/* ===== Lightbox / Image Zoom Modal ===== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 16, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000; /* Higher than .app-modal-overlay (9999) */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(38, 133, 190, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.is-open .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10010;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}