/* ========================================
   SISTEMASON - CSS CONSOLIDADO E OTIMIZADO
   ======================================== */

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-simple {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(59, 130, 246, 0.8), 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

@keyframes pulse-glow-badge {
    0%, 100% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.8);
    }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animações de partículas removidas - substituídas por Code Rain */

/* ========================================
   EFEITOS DE PARALLAX
   ======================================== */

.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.parallax-content {
    position: relative;
    z-index: 2;
}

/* ========================================
   ANIMAÇÕES DE ENTRADA ADICIONAIS
   ======================================== */

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Classes de animação */
.animate-fade-in-left {
    animation: fadeInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-top {
    animation: slideInFromTop 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ========================================
   EFEITOS DE GLOW E HOVER
   ======================================== */

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ========================================
   EFEITOS DE TYPING E BLINK
   ======================================== */

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: white;
    }
}

/* ========================================
   EFEITOS DE LOADING E SPIN
   ======================================== */

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

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

/* ========================================
   RESPONSIVIDADE PARA PARALLAX
   ======================================== */

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
        transform: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .parallax-bg {
        transform: none !important;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Variables */
:root {
    --primary-color: #325ca8;
    --secondary-color: #769ce3;
    --accent-color: #113578;
    --dark-color: #79859c;
    --light-color: #f8f9fa;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --text-dark: #080808;
    --text-light: #e7ebf1;
    --bg-dark: #131212;
    --bg-footer: #888b91;
}

/* Reset e Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #19191a 0%, #58595a 50%, #79859c 100%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

button, .btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover, .btn:hover {
    background: #0d2a5c;
    transform: translateY(-2px);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-dark);
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand img {
    max-height: 40px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--text-light);
}

.nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background-color: var(--light-color);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.bg-gradient-to-br {
    background: linear-gradient(135deg, #1b3564 0%, #102e66 50%, #79859c 100%);
}

/* Cards - Sistema Unificado de Animações */
.card,
.bg-white.rounded-lg.shadow-lg,
.hover\:shadow-xl,
.bg-primary-800.rounded-lg.shadow-lg,
.card.mb-4 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card:hover,
.bg-white.rounded-lg.shadow-lg:hover,
.hover\:shadow-xl:hover,
.bg-primary-800.rounded-lg.shadow-lg:hover,
.card.mb-4:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(50, 92, 168, 0.2);
    border-color: var(--primary-color);
}

.bg-primary-800.rounded-lg.shadow-lg:hover {
    border-color: var(--accent-color);
}

/* Services Section */
.services {
    padding: 5rem 0;
}

.services .card-body {
    padding: 2rem;
}

.services .card-title {
    margin: 1rem 0;
}

/* Portfolio Section */
.portfolio {
    padding: 5rem 0;
}

.portfolio .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Pricing Section */
.pricing {
    padding: 5rem 0;
}

.pricing .card-header {
    padding: 1.5rem;
}

.pricing .card-body {
    padding: 2rem;
}

.pricing .display-4 {
    font-size: 2.5rem;
}

.pricing .btn-primary {
    background-color: #e7e9ec;
    border-color: var(--accent-color);
    color: #102040;
    font-weight: bold;
}

.pricing .btn-primary:hover {
    background-color: #0d2a5c;
    border-color: #0d2a5c;
    color: #102040;
}

/* Blog Section */
.blog {
    padding: 5rem 0;
}

.blog .card-img-top {
    height: 200px;
    object-fit: cover;
}

.blog .card-footer {
    background: none;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* CTA Section */
.cta {
    padding: 5rem 0;
    background-color: var(--primary-color);
    color: var(--text-dark);
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta .btn {
    background-color: #000000;
    color: var(--primary-color);
}

.cta .btn:hover {
    background-color: var(--light-color);
}

/* Footer */
.footer {
    background-color: var(--bg-footer);
    color: var(--text-light);
    padding: 5rem 0 2rem;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer a {
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #22c5fd;
}

.footer .social-links a {
    font-size: 1.25rem;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Form Elements */
input, textarea {
    background: rgba(255,255,255,0.15);
    color: var(--text-dark);
    border: none;
    outline: none;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 2px var(--primary-color);
}

input::placeholder, textarea::placeholder {
    color: #313030;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.bg-accent-500 {
    background: var(--accent-color);
}

.bg-accent-600 {
    background: #0d2a5c;
}

.text-accent-400 {
    color: #0e189b;
}

.text-primary-900 {
    color: var(--primary-color);
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-xl {
    border-radius: 1rem;
}

.shadow-xl {
    box-shadow: 0 10px 40px 0 rgba(44, 21, 99, 0.2);
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .services,
    .portfolio,
    .pricing,
    .blog {
        padding: 3rem 0;
    }
    
    /* Reduzir animação em mobile para melhor performance */
    .card:hover,
    .bg-white.rounded-lg.shadow-lg:hover,
    .hover\:shadow-xl:hover,
    .bg-primary-800.rounded-lg.shadow-lg:hover,
    .card.mb-4:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

@media (max-width: 575.98px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .services,
    .portfolio,
    .pricing,
    .blog {
        padding: 2rem 0;
    }
}

/* Performance Optimizations */
.card,
.bg-white.rounded-lg.shadow-lg,
.hover\:shadow-xl,
.bg-primary-800.rounded-lg.shadow-lg,
.card.mb-4 {
    will-change: transform, box-shadow;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .card:hover,
    .bg-white.rounded-lg.shadow-lg:hover,
    .hover\:shadow-xl:hover,
    .bg-primary-800.rounded-lg.shadow-lg:hover,
    .card.mb-4:hover {
        transform: none;
    }
}

/* Focus States for Accessibility */
button:focus,
.btn:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}