:root {
    --navy: #0B132B;
    --navy-light: #1C2541;
    --gold: #C5A467;
    --gold-bright: #E5C185;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-light: rgba(255, 255, 255, 0.7);
}

body {
    background: var(--navy);
    background-image: 
        linear-gradient(rgba(197, 164, 103, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 164, 103, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    font-family: 'Inter', sans-serif;
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 40px 0;
    position: relative;
    user-select: none;
}

/* --- STATUS SRE --- */
.status-badge {
    font-size: 0.65rem;
    background: rgba(0, 255, 127, 0.1);
    color: #00ff7f;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 255, 127, 0.2);
    margin-bottom: 15px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00ff7f;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff7f;
    animation: pulse-sre 1.5s infinite;
}

@keyframes pulse-sre {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- CARD FLIP SYSTEM --- */
.project-card-wrapper {
    perspective: 1000px;
    min-height: 420px;
}

.project-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.project-card-wrapper.is-flipped .project-card-inner {
    transform: rotateY(180deg);
}

.project-card-front, .project-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
}

.project-card-back {
    transform: rotateY(180deg);
    background: var(--navy-light);
    border: 2px solid var(--gold);
    padding: 25px;
    z-index: 2;
}

/* --- UI COMPONENTS --- */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.btn-lang {
    background: var(--glass);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
}

.btn-lang:hover {
    background: var(--gold);
    color: var(--navy);
}

.db-flow-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.flow-line {
    stroke: var(--gold);
    stroke-width: 0.8;
    fill: none;
    opacity: 0.2;
    stroke-dasharray: 5;
}

.container {
    position: relative;
    z-index: 10;
}

.core-container {
    text-align: center;
    margin-bottom: 120px; /* GARANTE QUE NÃO COLE NOS CARDS */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 40px rgba(197, 164, 103, 0.3);
    margin-bottom: 20px;
    object-fit: cover;
    background: var(--navy);
}

.core-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    letter-spacing: 2px;
}

.core-subtitle {
    font-size: 0.9rem;
    letter-spacing: 5px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.description-case {
    background: rgba(11, 19, 43, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.core-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    font-weight: 300;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 30px;
    max-width: 1300px;
    margin: 60px auto 0 auto; /* MARGIN TOP REFORÇADA */
}

.project-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.project-card:hover {
    border-color: var(--gold);
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
}

.card-header {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.card-icon {
    font-size: 1.4rem;
    color: var(--gold);
    background: rgba(197, 164, 103, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.card-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    margin: 0;
    color: var(--gold-bright);
}

.card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-body p {
    font-size: 0.88rem;
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn-group-custom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.btn-row {
    display: flex;
    gap: 10px;
}

.btn-row .btn-premium {
    flex: 1;
}

.btn-premium {
    background: var(--gold);
    color: var(--navy) !important;
    padding: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    border: none;
    transition: 0.3s;
    text-decoration: none;
}

.btn-premium:hover {
    background: var(--gold-bright);
    box-shadow: 0 0 20px rgba(197, 164, 103, 0.5);
}

.btn-portfolio { background: transparent; border: 1px solid var(--gold); color: var(--gold) !important; }
.btn-portfolio:hover { background: rgba(197, 164, 103, 0.1); }

.credentials-box {
    margin-top: 15px;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    background: rgba(0,0,0,0.2);
    padding: 8px;
    border-radius: 5px;
    border: 1px dashed var(--glass-border);
    color: var(--gold-bright);
}

.info-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--gold);
    cursor: pointer;
    z-index: 100;
    transition: 0.3s;
}

.info-toggle:hover {
    transform: scale(1.2);
}

/* --- MODAL SYSTEM --- */
#demoModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 19, 43, 0.98);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content-wrapper {
    width: 95%;
    height: 92%;
    background: #fff;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.skeleton-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.skeleton-box {
    width: 200px;
    height: 10px;
    background: var(--navy-light);
    margin: 5px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skeleton-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(197, 164, 103, 0.2), transparent);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    100% { left: 100%; }
}

.modal-footer-custom {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #f8f9fa;
    padding: 10px 20px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #ddd;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: var(--gold);
    color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    transition: 0.3s;
}

.close-modal:hover {
    transform: rotate(90deg);
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 6;
}

.tech-stack-list {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--gold-bright);
    margin-top: 10px;
}

.challenge-box {
    margin-top: 15px;
    border-left: 2px solid var(--gold);
    padding-left: 12px;
}

.challenge-box h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 5px;
}

.challenge-box p {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.4;
}

footer {
    margin-top: 80px;
    text-align: center;
    padding-bottom: 40px;
}

footer a {
    color: var(--gold);
    font-size: 2rem;
    margin: 0 15px;
    transition: 0.3s;
}

footer a:hover {
    color: var(--white);
}

/* --- WIDGET IA --- */
.ai-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.ai-bubble {
    width: 60px;
    height: 60px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--navy);
    cursor: pointer;
    box-shadow: 0 0 20px rgba(197, 164, 103, 0.5);
    transition: 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.ai-bubble:hover {
    transform: scale(1.1) rotate(12deg);
}

/* --- JANELA CHAT IA --- */
.ai-chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: rgba(11, 19, 43, 0.95);
    border: 2px solid var(--gold);
    border-radius: 15px;
    display: none;
    flex-direction: column;
    z-index: 3000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    backdrop-filter: blur(15px);
}

.ai-chat-container.active {
    display: flex;
    animation: slideIn 0.3s ease-out;
}

.ai-chat-header {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.ai-message.bot {
    background: var(--navy-light);
    color: var(--white);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--glass-border);
}

.ai-message.user {
    background: var(--gold);
    color: var(--navy);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    font-weight: 600;
}

.ai-chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.ai-chat-input-area input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    color: white;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.ai-chat-input-area button {
    background: var(--gold);
    border: none;
    border-radius: 5px;
    color: var(--navy);
    padding: 0 15px;
    cursor: pointer;
}

.btn-close-chat {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Estilo EXCLUSIVO para o infográfico de Arquitetura */
.modal-architecture {
    width: 1000px !important;  /* Largura fixa maior que a imagem */
    height: 850px !important; /* Altura fixa maior que a imagem */
    max-width: 95vw !important;
    max-height: 90vh !important;
    background: #1a1d23 !important; /* Fundo escuro combinando com a imagem */
}

/* Garante que o iframe da arquitetura não tenha scroll */
.modal-architecture iframe {
    overflow: hidden !important;
}


/* Estilo para o rótulo INFO piscante */
.info-label-flash {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    color: var(--gold);
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--gold);
    padding: 2px 8px;
    border-radius: 4px;
    animation: flash-gold 1.5s infinite;
    transition: 0.3s;
}

.info-label-flash:hover {
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 0 15px var(--gold);
}

@keyframes flash-gold {
    0% { opacity: 1; box-shadow: 0 0 5px var(--gold); }
    50% { opacity: 0.4; box-shadow: 0 0 0px var(--gold); }
    100% { opacity: 1; box-shadow: 0 0 5px var(--gold); }
}



.db-flow-svg {
    position: absolute;
    top: 150px; /* Começa na altura da sua foto */
    left: 0;
    width: 100%;
    height: 600px; /* Altura suficiente para chegar nos cards */
    pointer-events: none;
    z-index: 1; /* Fica atrás dos cards mas visível */
}

.flow-line {
    stroke: var(--gold);
    stroke-width: 0.1; /* Estava 0.8, agora está bem mais fino */
    fill: none;
    opacity: 0.3;      /* Aumentei levemente a opacidade para compensar a finura */
    stroke-dasharray: 1; /* Diminuí o tracejado para ficar mais pontilhado */
}
