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

:root {
    /* Cores - Light Theme (Padrão) */
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    
    /* Brand: Kiwi/Lime accent */
    --brand: 89 57% 46%;
    --brand-glow: 89 57% 54%;
    
    --primary: var(--brand);
    --primary-foreground: 210 40% 98%;
    
    --secondary: 210 20% 96%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    
    --muted: 210 20% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    
    --accent: 210 20% 96%;
    --accent-foreground: 222.2 47.4% 11.2%;
    
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    
    --radius: 0.75rem;
    
    /* Enhanced tokens */
    --gradient-primary: linear-gradient(135deg, hsl(var(--brand)), hsl(var(--brand-glow)) 60%);
    --shadow-elegant: 0 10px 30px -10px hsl(var(--brand) / 0.25);
    --overlay-40: 0 0% 0% / 0.4;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme (Aplicado via JavaScript) */
[data-theme="dark"] {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 212.7 26.8% 83.9%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    transition: var(--transition-smooth);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* Typography */
.font-display {
    font-family: 'Poppins', sans-serif;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow-elegant);
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    color: #000;
    background-color: hsl(var(--secondary) / 0.8);
    transform: translateY(-1px);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--background) / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-content {
    display: flex;
    height: 4rem;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    min-height: 2rem;
}

.logo-image {
    height: 2rem;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    flex-shrink: 0; /* Evita que o logo seja comprimido */
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    white-space: nowrap; /* Evita quebra de linha */
}

/* Para o footer, o logo pode ser menor */
.footer-logo .logo-image {
    height: 2.5rem;
    max-width: 360px;
}

.nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

.nav-link {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: hsl(var(--foreground));
}

.nav-link.active {
    color: hsl(var(--foreground));
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    color: hsl(var(--muted-foreground));
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition-smooth);
    margin: 0 1rem;
}

.theme-toggle:hover {
    background-color: hsl(var(--muted));
    color: hsl(var(--foreground));
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    transition: var(--transition-smooth);
}

/* Light theme - mostra sol, esconde lua */
.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

/* Dark theme - mostra lua, esconde sol */
[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

/* Mobile theme toggle */
.mobile-theme-toggle {
    margin: 0 auto 1rem;
    width: 3rem;
    height: 3rem;
}

.header-cta {
    display: none;
}

@media (min-width: 768px) {
    .header-cta {
        display: block;
    }
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background-color: hsl(var(--foreground));
    transition: var(--transition-smooth);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background-color: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 30;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mobile-nav-link {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-nav-link:hover {
    color: hsl(var(--foreground));
}

.mobile-cta {
    text-align: center;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
}

@media (min-width: 768px) {
    .hero {
        min-height: 80vh;
    }
}

.hero-fallback {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.hero-fallback.hidden {
    opacity: 0;
}

.hero-video {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero-video.loaded {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: hsl(var(--overlay-40));
    z-index: 5;
}

.hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
    min-height: 70vh;
    padding: 2rem 0;
    z-index: 10;
}

@media (min-width: 768px) {
    .hero-content {
        min-height: 80vh;
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: hsl(var(--primary-foreground));
    animation: fadeIn 0.4s ease-out, scaleIn 0.25s ease-out;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-description {
    max-width: 42rem;
    font-size: 1rem;
    color: hsl(var(--primary-foreground) / 0.9);
    animation: fadeIn 0.4s ease-out;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.125rem;
    }
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Sections */
.section-header {
    margin: 0 auto 2.5rem;
    max-width: 48rem;
    text-align: center;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 3rem;
    }
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-description {
    margin-top: 0.75rem;
    color: hsl(var(--muted-foreground));
}

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

@media (min-width: 768px) {
    .services {
        padding: 6rem 0;
    }
}

.services-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-elegant);
}

.service-card:hover {
    transform: scale(1.01);
}

.service-icon {
    color: hsl(var(--primary));
    margin-bottom: 1rem;
}

.service-title {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.service-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Portfolio Highlights */
.portfolio-highlights {
    padding-bottom: 5rem;
}

.portfolio-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    text-decoration: none;
    color: inherit;
}

.portfolio-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.3s;
}

.portfolio-item:hover img {
    transform: scale(1.03);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.portfolio-overlay span {
    color: white;
    font-weight: 500;
}

/* Testimonials */
.testimonials {
    padding: 4rem 0;
    background-color: hsl(var(--muted));
}

.testimonials-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-elegant);
}

.testimonial-image {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    color: hsl(var(--muted-foreground));
}

.testimonial-author {
    font-weight: 500;
    color: hsl(var(--foreground));
}

/* Page Headers */
.page-header {
    padding: 3rem 0;
    background-color: hsl(var(--muted));
}

@media (min-width: 768px) {
    .page-header {
        padding: 5rem 0;
    }
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 3rem;
    }
}

.page-description {
    color: hsl(var(--muted-foreground));
}

/* Portfolio Page */
.portfolio-page {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .portfolio-page {
        padding: 5rem 0;
    }
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    color: hsl(var(--muted-foreground));
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.875rem;
}

.filter-btn:hover {
    background-color: hsl(var(--muted));
}

.filter-btn.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.portfolio-items {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .portfolio-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-items .portfolio-item {
    display: none;
}

.portfolio-items .portfolio-item.show {
    display: block;
}

/* Services Page */
.services-page {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .services-page {
        padding: 5rem 0;
    }
}

.services-detailed-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .services-detailed-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-detailed-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-elegant);
}

.service-detailed-header {
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-detailed-icon {
    color: hsl(var(--primary));
}

.service-detailed-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.service-detailed-content {
    padding: 1.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.service-detailed-content p {
    margin-bottom: 1rem;
}

.service-detailed-content ul {
    list-style: disc;
    padding-left: 1.25rem;
}

.service-detailed-content li {
    margin-bottom: 0.25rem;
}

.services-cta {
    text-align: center;
}

/* About Page */
.about-page {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .about-page {
        padding: 5rem 0;
    }
}

.about-content {
    max-width: 48rem;
    margin: 0 auto;
}

.about-text {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* Contact Page */
.contact-page {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .contact-page {
        padding: 5rem 0;
    }
}

.contact-form {
    min-width: 360px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}
@media screen and (max-width: 768px) {
    .contact-form {
        min-width: 100%;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input,
.form-textarea {
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    transition: var(--transition-smooth);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* 404 Page */
.not-found {
    padding: 8rem 0;
    text-align: center;
}

.not-found-content {
    max-width: 32rem;
    margin: 0 auto;
}

.not-found-title {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 700;
    color: hsl(var(--primary));
    margin-bottom: 1rem;
}

.not-found-description {
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    border-top: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
}

.footer-cta {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.footer-cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .footer-cta-content {
        flex-direction: row;
    }
}

.footer-cta-text {
    font-size: 1.125rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .footer-cta-text {
        font-size: 1.25rem;
    }
}

.footer-main {
    padding: 2.5rem 0;
}

.footer-content {
    display: grid;
    justify-content: space-between;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 3fr 1fr auto;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.footer-nav-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav-link {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-nav-link:hover {
    color: hsl(var(--foreground));
}

.footer-social {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .footer-social {
        justify-content: flex-end;
    }
}

.social-link {
    color: hsl(var(--muted-foreground));
    transition: color 0.2s;
}

.social-link:hover {
    color: hsl(var(--foreground));
}

.footer-bottom {
    border-top: 1px solid hsl(var(--border));
    padding: 1rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.footer-credits {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.innsystem-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: hsl(var(--muted-foreground));
    transition: var(--transition-smooth);
}

.innsystem-link:hover {
    color: hsl(var(--foreground));
}

.innsystem-logo {
    height: 1rem;
    width: auto;
    transition: var(--transition-smooth);
}

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 50;
}

.floating-whatsapp a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow-elegant);
    transition: var(--transition-smooth);
}

.floating-whatsapp a:hover {
    transform: scale(1.1);
    background-color: hsl(var(--primary) / 0.9);
}

/* Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0.98);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

@media (min-width: 768px) {
    .md\:hidden {
        display: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .footer-nav {
        grid-template-columns: 1fr;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Logo responsivo */
    .logo-image {
        height: 1.5rem;
        max-width: 80px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .footer-logo .logo-image {
        height: 1.75rem;
        max-width: 120px;
    }
    
    /* Theme toggle responsivo */
    .theme-toggle {
        margin: 0 0.5rem;
        width: 2rem;
        height: 2rem;
    }
    
    .mobile-theme-toggle {
        margin: 0 auto 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    /* Footer responsivo */
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer-credits {
        justify-content: center;
    }
}
