/**
 * Cenário Permanente - Custom Styles
 * Versão 2.0 - Otimizado para Produção
 * 
 * NOTA: O aviso do Tailwind CDN é apenas informativo.
 * Para servidores compartilhados sem build process, 
 * o CDN é uma solução válida e amplamente utilizada.
 */

/* ===== Base Styles ===== */
* {
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation Styles ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(229, 231, 235, 1);
}

#navbar.scrolled .nav-link {
    color: #374151;
}

#navbar.scrolled .nav-link:hover {
    color: #ea580c;
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #ffffff;
}

#navbar.scrolled .nav-logo-text {
    color: #111827;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #ffffff;
}

#navbar.scrolled .nav-lang-btn {
    color: #374151;
}

#navbar.scrolled .nav-lang-btn:hover {
    background: #f3f4f6;
}

#navbar:not(.scrolled) .nav-lang-btn {
    color: rgba(255, 255, 255, 0.9);
}

#navbar:not(.scrolled) .nav-lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

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

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===== Button Styles ===== */
.btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.3);
}

/* ===== Card Hover Effects ===== */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ===== Form Styles ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

/* ===== WhatsApp Button ===== */
.whatsapp-pulse {
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===== Portfolio Section ===== */
.portfolio-item {
    cursor: pointer;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.portfolio-item:hover::before {
    opacity: 1;
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 120px;
    font-family: Georgia, serif;
    color: rgba(249, 115, 22, 0.05);
    line-height: 1;
    pointer-events: none;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

/* ===== Selection Color ===== */
::selection {
    background: rgba(249, 115, 22, 0.3);
    color: #111827;
}

::-moz-selection {
    background: rgba(249, 115, 22, 0.3);
    color: #111827;
}

/* ===== Focus Visible ===== */
:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #111827;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.toast.error {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* ===== Lightbox ===== */
#lightbox {
    transition: opacity 0.3s ease;
}

/* ===== Rotate Utility ===== */
.rotate-180 {
    transform: rotate(180deg);
}

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

/* ===== Print Styles ===== */
@media print {
    #navbar,
    .fixed,
    #lightbox {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    section {
        break-inside: avoid;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Responsive Utilities ===== */
@media (max-width: 640px) {
    .mobile-text-center {
        text-align: center;
    }
    
    .mobile-full-width {
        width: 100%;
    }
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== SVG Icon Fixes ===== */
svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Fill current color for filled icons */
.fill-current {
    fill: currentColor;
}

/* ===== Gradient Text ===== */
.text-gradient {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Backdrop Blur Fallback ===== */
@supports not (backdrop-filter: blur(12px)) {
    .backdrop-blur-sm {
        background: rgba(0, 0, 0, 0.8);
    }
    
    #navbar.scrolled {
        background: rgba(255, 255, 255, 0.98);
    }
}
