/*
 * Stylesheet for Inova Web - Agência Digital
 * All styles extracted from inline CSS for better organization and maintainability
 */

/* Base styles */
body {
    box-sizing: border-box;
}

/* Hero Section Animations */
.logo-hero {
    animation: logoFadeIn 1s ease-out, logoFloat 3s ease-in-out 1s infinite;
    filter: drop-shadow(0 10px 25px rgba(74, 222, 128, 0.4)) 
            drop-shadow(0 0 40px rgba(74, 222, 128, 0.2));
    transition: filter 0.3s ease;
}

.logo-hero:hover {
    filter: drop-shadow(0 15px 35px rgba(74, 222, 128, 0.6)) 
            drop-shadow(0 0 50px rgba(74, 222, 128, 0.3));
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Hero CTA Animation */
.hero-cta {
    animation: slideInUp 1s ease-out 0.3s both;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Online Indicator (Pulsing Dot) */
.online-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7), 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulseOnline 2s infinite;
}

@keyframes pulseOnline {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7), 0 0 8px rgba(16, 185, 129, 0.5);
        opacity: 1;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0), 0 0 12px rgba(16, 185, 129, 0.3);
        opacity: 0.8;
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0), 0 0 8px rgba(16, 185, 129, 0.5);
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero Button Enhancement */
.hero-button {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.hero-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.hero-button:hover::before {
    width: 300px;
    height: 300px;
}

.hero-button:active {
    transform: scale(0.98);
}

/* Hero Title Animation */
.hero-title {
    animation: titleFadeIn 1s ease-out 0.2s both;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 
                 0 0 40px rgba(74, 222, 128, 0.15);
}

.hero-title span {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 3s ease infinite;
}

@keyframes gradientText {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

@keyframes titleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
        letter-spacing: 10px;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: normal;
    }
}

/* Hero Buttons Animation */
.hero-buttons {
    animation: slideInUp 1s ease-out 1.2s both;
}

/* Responsive adjustments for Hero */
@media (max-width: 768px) {
    header.gradient-bg {
        min-height: 100svh;
        padding: 2rem 0;
    }
    
    .logo-hero {
        animation: logoFadeIn 0.8s ease-out, logoFloat 3s ease-in-out 0.8s infinite;
    }
    
    .hero-title {
        line-height: 1.2;
        font-size: 4rem !important;
    }
    
    .typewriter-container {
        min-height: 80px;
        padding: 0 1.5rem;
    }
    
    .typewriter-text {
        font-size: 1.125rem !important;
        line-height: 1.5;
        white-space: normal !important;
        max-width: 100%;
        width: 100% !important;
        text-align: center;
        overflow: visible !important;
        animation: fadeInText 1s ease-out 0.8s both !important;
        border-right: none !important;
    }
    
    .hero-cta {
        padding: 0 1rem;
    }
    
    .hero-button {
        min-width: auto;
        max-width: 90%;
        width: auto;
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    .online-indicator {
        width: 8px;
        height: 8px;
    }
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 3.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .typewriter-container {
        min-height: 85px;
        padding: 0 1.5rem;
    }
    
    .typewriter-text {
        font-size: 0.95rem !important;
        line-height: 1.6;
    }
    
    .subtitle-text {
        font-size: 0.9375rem !important;
        line-height: 1.6;
    }
    
    .hero-buttons button {
        font-size: 0.9375rem !important;
        padding: 0.875rem 2rem !important;
        width: auto;
        min-width: fit-content;
    }
    
    .hero-button {
        font-size: 0.8125rem !important;
        padding: 0.75rem 1.25rem !important;
    }
}

/* Extra visual enhancements */
@media (min-width: 1024px) {
    .hero-button:hover {
        transform: scale(1.05) translateY(-2px);
    }
}

/* Gradient background */
.gradient-bg {
    background: linear-gradient(135deg, #1a1625 0%, #2d4a3e 50%, #41b883 100%);
    position: relative;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(74, 222, 128, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Animation: Fade in elements on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section - Enhanced fade-in for first load */
header .fade-in {
    animation: heroFadeIn 1.2s ease-out 0.5s both;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(65, 184, 131, 0.2);
}

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

.whatsapp-float .whatsapp-btn {
    position: relative;
    background: linear-gradient(135deg, #25d366, #128c7e);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-float .whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.5);
}

.whatsapp-float .whatsapp-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #25d366, #128c7e, #25d366);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 3s linear infinite;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #333;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-badge 2s infinite;
}

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

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

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Portfolio items */
.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px 16px 16px;
    transition: all 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(65, 184, 131, 0.95), rgba(51, 79, 66, 0.95));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

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

.portfolio-item:hover .portfolio-title {
    opacity: 0;
}

/* Typewriter effect */
.typewriter-container {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInUp 1s ease-out 0.6s both;
    padding: 0 1rem;
}

.typewriter-text {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #4ade80;
    border-right: 3px solid #4ade80;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    display: inline-block;
    animation: typewriter 3s steps(54) 1.5s forwards, blink-cursor 0.75s step-end 1.5s 7, removeCursor 0.01s 7s forwards;
    text-shadow: 0 2px 10px rgba(74, 222, 128, 0.3);
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 54ch;
    }
}

@keyframes blink-cursor {
    0%, 50% {
        border-color: #4ade80;
    }
    51%, 100% {
        border-color: transparent;
    }
}

@keyframes removeCursor {
    to {
        border-right-color: transparent;
    }
}

.subtitle-text {
    color: #e0e0e0;
    font-size: 1.1rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: min(90vw, 1000px);
    max-height: 90vh;
    min-width: 320px;
    width: auto;
    overflow: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-gallery {
    position: relative;
    height: clamp(300px, 40vh, 500px);
    overflow: hidden;
    flex-shrink: 0;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.gallery-dot.active {
    background: white;
}

.modal-body {
    padding: 20px 30px 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
}

.modal-tech-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.modal-features-list {
    margin-top: 12px;
    space-y: 8px;
}

.modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
    justify-content: flex-start;
}

/* Responsive styles for modal */
@media (min-width: 768px) {
    .modal-content {
        min-width: 600px;
    }
    
    .modal-body {
        padding: 30px 40px 40px;
    }
    
    .modal-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    
    .modal-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 95vw;
        margin: 20px;
    }
    
    .modal-body {
        padding: 16px 20px 24px;
    }
    
    .modal-gallery {
        height: clamp(250px, 35vh, 350px);
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
    }
    
    .gallery-prev {
        left: 15px;
    }
    
    .gallery-next {
        right: 15px;
    }
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
