/* Reset e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Custom Properties para altura real da viewport */
:root {
    --vh: 1vh;
}

/* Detecta altura real da viewport em dispositivos móveis */
@supports (-webkit-touch-callout: none) {
    :root {
        --vh: 1vh;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* Force hide cursor on all interactive elements */
*, *:hover, *:focus, *:active {
    cursor: none !important;
}

a, button, input, textarea, select, .nav-link, .cta-button, .primary-btn, .secondary-btn, 
.service-card, .hamburger, .logo, .scroll-indicator, [role="button"] {
    cursor: none !important;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #ff6b35;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: all 0.05s ease-out;
    transform: translate(-50%, -50%);
    will-change: transform;
    top: 0;
    left: 0;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 53, 0.2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 107, 53, 0.3);
    will-change: transform;
    top: 0;
    left: 0;
}

.cursor.active {
    transform: translate(-50%, -50%) scale(1.5);
    background: #fff;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.cursor-follower.active {
    transform: translate(-50%, -50%) scale(1.8);
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.6);
}

.cursor.text {
    transform: translate(-50%, -50%) scale(3);
    background: rgba(255, 107, 53, 0.8);
    mix-blend-mode: normal;
}

.cursor-follower.text {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
}

.cursor.drag {
    transform: translate(-50%, -50%) scale(0.8);
    background: #fff;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
}

.cursor-follower.drag {
    transform: translate(-50%, -50%) scale(2.2);
    background: rgba(255, 107, 53, 0.3);
    border-color: rgba(255, 107, 53, 0.8);
}

/* Cursor hover effects for specific elements */
.cursor.cta-hover {
    transform: translate(-50%, -50%) scale(2);
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.7);
}

.cursor-follower.cta-hover {
    transform: translate(-50%, -50%) scale(2.5);
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.7);
    animation: pulse-cursor 1.5s infinite;
}

@keyframes pulse-cursor {
    0% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 1;
    }
}

/* Additional cursor overrides for all possible elements */
div, span, img, svg, video, canvas, iframe, object, embed,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, code,
ul, ol, li, dl, dt, dd, table, thead, tbody, tfoot, th, td,
form, fieldset, legend, label, input, button, select, textarea,
nav, header, footer, main, section, article, aside, address {
    cursor: none !important;
}

/* Hide cursor on mobile */
@media (max-width: 768px) {
    .cursor,
    .cursor-follower {
        display: none !important;
    }
    
    body, *, *:hover, *:focus, *:active {
        cursor: auto !important;
    }
    
    /* Ensure mobile menu elements are clickable */
    .nav-menu, .nav-menu *, .mobile-overlay, .mobile-backdrop, .mobile-close {
        cursor: pointer !important;
        pointer-events: auto !important;
    }
    
    /* Video optimization for mobile */
    .video-background video {
        filter: brightness(0.6) contrast(1.2) !important;
    }
    
    /* Prevent zoom on form inputs */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
        transform: translateZ(0);
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* Fix for iOS Safari bottom bar */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

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

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    transform: translateZ(0);
    will-change: auto;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    object-fit: cover;
    object-position: center;
    will-change: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
    filter: brightness(0.7) contrast(1.1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.75) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: -1;
}

/* Fallback para quando o vídeo não carrega */
.video-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: absolute;
    top: 0;
    left: 0;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1003;
    transition: all 0.3s ease;
    padding: 10px 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.header.scrolled .logo-img {
    height: 50px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    position: static;
    background: none;
    backdrop-filter: none;
    width: auto;
    height: auto;
    text-align: left;
    transition: none;
    padding: 0;
    box-shadow: none;
    z-index: auto;
    justify-content: flex-end;
    flex-direction: row;
    overflow: visible;
    transform: none;
    will-change: auto;
}

/* Desktop navigation styles */
@media (min-width: 769px) {
    .mobile-menu,
    .mobile-overlay,
    .mobile-backdrop {
        display: none !important;
    }

    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        background: none;
        backdrop-filter: none;
        width: auto;
        height: auto;
        padding: 0;
        gap: 30px;
        box-shadow: none;
        z-index: auto;
        justify-content: flex-end;
        align-items: center;
        overflow: visible;
        transform: none;
        will-change: auto;
    }

    .nav-item {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
        display: list-item;
    }

    .nav-link {
        color: #fff;
        font-size: 14px;
        font-weight: 500;
        padding: 0;
        border-bottom: none;
        width: auto;
    }

    .nav-link:hover {
        color: #ff6b35;
        padding-left: 0;
    }
}

/* ==================== ESTIMATE SECTION ==================== */
/* Migrated to Tailwind CSS - keeping only essential custom styles */

/* Video and layout styles migrated to Tailwind */

/* Image and animation styles migrated to Tailwind */

/* Form styles migrated to Tailwind */

/* Responsive styles migrated to Tailwind */

/* Form animations migrated to Tailwind */

/* Default nav-item styles */
.nav-item {
    opacity: 1;
    transform: none;
    transition: none;
    display: list-item;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
    border-bottom: none;
    width: auto;
}

.header.scrolled .nav-link {
    color: #333;
}

.nav-link:hover,
.nav-link.active {
    color: #ff6b35;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6b35;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.cta-button {
    background: #ff6b35;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.cta-button:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}



/* Mobile menu hidden by default */
.mobile-menu,
.mobile-overlay,
.mobile-backdrop {
    display: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: 0.3s;
    border-radius: 2px;
}

.header.scrolled .bar {
    background: #333;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 100px 20px 50px;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    z-index: 2;
}

.hero-content {
    margin-bottom: 80px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 30px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease forwards;
}

.title-line:nth-child(2) {
    animation-delay: 0.3s;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #ff6b35;
    margin-bottom: 40px;
    font-weight: 400;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease 0.6s forwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease 0.9s forwards;
}

.primary-btn {
    background: #ff6b35;
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.primary-btn:hover {
    background: #e55a2b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

.primary-btn i {
    transition: transform 0.3s ease;
}

.primary-btn:hover i {
    transform: translateX(5px);
}

.secondary-btn {
    background: transparent;
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease 1.2s forwards;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #ff6b35;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeInBounce 2s ease 2s forwards;
}

.scroll-arrow {
    color: white;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: #ff6b35;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Animações */
@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInBounce {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

/* Responsividade */
@media (max-width: 768px) {
    /* Hide desktop menu, show mobile elements */
    .nav-menu {
        display: none !important;
    }
    
    .mobile-menu,
    .mobile-overlay,
    .mobile-backdrop {
        display: block;
    }

    .mobile-menu {
        position: fixed;
        right: -100%;
        top: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
        backdrop-filter: blur(15px);
        width: 85%;
        height: 100vh;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        padding: 20px 40px 40px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
        z-index: 1002;
        overflow-y: auto;
        transform: translateZ(0);
        will-change: transform;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu.active {
        right: 0;
    }
    
    /* Mobile menu header */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: calc(100% + 80px);
        margin: -20px -40px 20px -40px;
        padding: 20px 40px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        position: sticky;
        top: -20px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
        backdrop-filter: blur(15px);
        z-index: 1003;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-logo-img {
        height: 40px;
        width: auto;
    }

    .mobile-close {
        background: rgba(255, 107, 53, 0.1);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ff6b35;
        font-size: 18px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-close:hover {
        background: #ff6b35;
        color: white;
        transform: scale(1.1);
    }
    
    /* Mobile menu content */
    .mobile-menu-content {
        display: flex;
        flex-direction: column;
        gap: 0;
        flex: 1;
        margin-bottom: 0;
        padding-bottom: 20px;
    }

    .mobile-nav-link {
        color: #333;
        font-size: 18px;
        font-weight: 600;
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
        position: relative;
        transition: all 0.3s ease;
        text-decoration: none;
        display: block;
        opacity: 0;
        transform: translateX(30px);
    }

    .mobile-menu.active .mobile-nav-link {
        animation: slideInRight 0.4s ease forwards;
    }

    .mobile-menu.active .mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
    .mobile-menu.active .mobile-nav-link:nth-child(2) { animation-delay: 0.15s; }
    .mobile-menu.active .mobile-nav-link:nth-child(3) { animation-delay: 0.2s; }
    .mobile-menu.active .mobile-nav-link:nth-child(4) { animation-delay: 0.25s; }
    .mobile-menu.active .mobile-nav-link:nth-child(5) { animation-delay: 0.3s; }
    .mobile-menu.active .mobile-nav-link:nth-child(6) { animation-delay: 0.35s; }

    .mobile-nav-link:hover {
        color: #ff6b35;
        padding-left: 10px;
    }

    .mobile-nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 1px;
        background: #ff6b35;
        transition: width 0.3s ease;
    }

    .mobile-nav-link:hover::after,
    .mobile-nav-link.active::after {
        width: 100%;
    }
    
    .mobile-nav-link:last-child {
        margin-bottom: 0;
        border-bottom: none;
        padding-bottom: 2px;
    }
    
    /* Mobile CTA */
    .mobile-cta-container {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .mobile-cta {
        background: #ff6b35;
        color: white;
        padding: 15px 25px;
        border-radius: 30px;
        text-decoration: none;
        font-weight: 600;
        text-align: center;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
        width: 100%;
        display: block;
        box-sizing: border-box;
        margin-top: 10px;
    }

    .mobile-cta:hover {
        background: #e55a2b;
        transform: translateY(-2px);
    }



    @keyframes slideInRight {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Mobile menu overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 15%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
        transform: translateZ(0);
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Full screen blur background */
    .mobile-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(3px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
        transform: translateZ(0);
    }

    .mobile-backdrop.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Mobile CTA button in menu */
    .nav-menu .mobile-cta {
        background: #ff6b35;
        color: white;
        padding: 15px 25px;
        border-radius: 30px;
        text-decoration: none;
        font-weight: 600;
        margin-top: 30px;
        margin-bottom: 20px;
        text-align: center;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
        width: 100%;
        display: block;
        box-sizing: border-box;
    }

    .nav-menu .mobile-cta:hover {
        background: #e55a2b;
        transform: translateY(-2px);
        padding-left: 25px;
    }

    .mobile-close:hover {
        background: #ff6b35;
        color: white;
        transform: scale(1.1);
    }

    .cta-button {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .service-card {
        padding: 30px;
    }

    .logo-img {
        height: 45px;
    }

    .header.scrolled .logo-img {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 15px 30px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .container {
        padding: 0 15px;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* Animações de entrada para elementos observáveis */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
} 

/* About Modal Styles */
#about-section {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#about-modal {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

#about-modal::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Animation classes */
.modal-fade-in {
    animation-name: modalFadeIn;
}

.modal-fade-out {
    animation-name: modalFadeOut;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.75);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.75);
    }
}

/* Modal positioning for desktop */
@media (min-width: 769px) {
    #about-modal, #stain-gallery-modal, #projects-modal {
        margin-top: 80px;
    }
}

/* Close button improvements for mobile */
#close-about, #close-stain-gallery, #close-projects {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

#close-about:hover, #close-stain-gallery:hover, #close-projects:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    #about-modal {
        margin: 0.75rem;
        margin-top: 80px;
        max-height: calc(100vh - 100px);
        border-radius: 1rem;
    }
    
    #about-section {
        padding: 0.75rem;
    }
    
    /* Better mobile scrolling */
    #about-modal, #stain-gallery-modal, #projects-modal {
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }
    
    /* Ensure close button stays visible */
    #close-about, #close-stain-gallery, #close-projects {
        min-width: 52px;
        min-height: 52px;
        margin-top: env(safe-area-inset-top, 0);
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    #close-about:hover, #close-stain-gallery:hover, #close-projects:hover {
        background-color: rgba(255, 255, 255, 1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

@media (max-width: 480px) {
    #about-modal {
        margin: 0.5rem;
        margin-top: 70px;
        max-height: calc(100vh - 80px);
        border-radius: 0.75rem;
    }
    
    #about-section {
        padding: 0.5rem;
    }
    
    /* Enhanced close button for very small screens */
    #close-about, #close-stain-gallery, #close-projects {
        min-width: 48px;
        min-height: 48px;
        margin-right: 0.5rem;
        margin-top: 0.5rem;
    }
}

/* ==================== STAIN GALLERY STYLES ==================== */

/* Stain Gallery Modal Responsive */
#stain-gallery-modal {
    max-width: 90rem;
}

/* Stain Cards */
.stain-card {
    position: relative;
    cursor: none !important;
}

.stain-card img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.stain-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

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

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

/* Custom scrollbar for stain gallery modal */
#stain-gallery-modal::-webkit-scrollbar {
    width: 8px;
}

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

#stain-gallery-modal::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 4px;
}

#stain-gallery-modal::-webkit-scrollbar-thumb:hover {
    background: #e55a2b;
}

/* Stain Grid Responsive */
#stain-grid {
    min-height: 200px;
}

/* Mobile optimizations for stain gallery */
@media (max-width: 768px) {
    #stain-gallery-modal {
        margin: 0.75rem;
        margin-top: 80px;
        max-height: calc(100vh - 100px);
        border-radius: 1rem;
    }
    
    #stain-gallery-section {
        padding: 0.75rem;
    }
    
    .stain-card {
        margin-bottom: 1rem;
    }
    
    .stain-card img {
        height: 10rem;
    }
    
    /* Better mobile scrolling */
    #stain-gallery-modal {
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    #stain-gallery-modal {
        margin: 0.5rem;
        margin-top: 70px;
        max-height: calc(100vh - 80px);
        border-radius: 0.75rem;
    }
    
    #stain-gallery-section {
        padding: 0.5rem;
    }
    
    .stain-card img {
        height: 8rem;
    }
    
    /* Single column on very small screens */
    #stain-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Mobile optimizations for projects gallery */
@media (max-width: 768px) {
    #projects-modal {
        margin: 0.75rem;
        margin-top: 80px;
        max-height: calc(100vh - 100px);
        border-radius: 1rem;
    }
    
    #projects-section {
        padding: 0.75rem;
    }
    
    .project-card {
        margin-bottom: 1rem;
    }
    
    /* Better mobile scrolling */
    #projects-modal {
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    #projects-modal {
        margin: 0.5rem;
        margin-top: 70px;
        max-height: calc(100vh - 80px);
        border-radius: 0.75rem;
    }
    
    #projects-section {
        padding: 0.5rem;
    }
}

/* Stain category badges */
.stain-card .absolute span {
    backdrop-filter: blur(4px) saturate(180%);
    background-color: rgba(255, 107, 53, 0.9);
}

/* Enhanced hover effects for stain cards */
.stain-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Search input focus effects */
#stain-search:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.15);
}

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

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

/* No results state styling */
.col-span-full {
    grid-column: 1 / -1;
}

/* Stain gallery specific cursor effects */
.stain-card:hover .cursor {
    background: #8B4513 !important;
}

.stain-card:hover .cursor-follower {
    border-color: rgba(139, 69, 19, 0.6) !important;
}

/* ==================== PROJECTS SECTION STYLES ==================== */

/* Projects modal styling */
#projects-modal {
    /* Modal styling handled by Tailwind classes */
}

/* Project cards */
.project-card {
    transition: all 0.3s ease;
    cursor: none !important;
}

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

/* Video styling without controls */
.project-card video {
    border-radius: inherit;
    object-fit: cover;
}

/* Projects hero section */
.projects-hero {
    position: relative;
    overflow: hidden;
}

/* Custom scrollbar for projects modal */
#projects-modal::-webkit-scrollbar {
    width: 8px;
}

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

#projects-modal::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 4px;
}

#projects-modal::-webkit-scrollbar-thumb:hover {
    background: #e55a2b;
}

/* Projects close button styles moved to main section below */



/* Projects responsive design optimizations */

/* Projects cursor effects */
.project-card:hover .cursor {
    background: #ff6b35 !important;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.project-card:hover .cursor-follower {
    border-color: rgba(255, 107, 53, 0.6) !important;
    background: rgba(255, 107, 53, 0.2) !important;
}

/* Projects video styling */

/* Projects CTA button effects */
.projects-cta {
    position: relative;
    overflow: hidden;
}

.projects-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.projects-cta:hover::before {
    left: 100%;
}



/* Modal close button container sticky positioning */
.sticky {
    position: -webkit-sticky;
    position: sticky;
}

/* Safe area inset support for iOS devices */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        #close-about, #close-stain-gallery, #close-projects {
            margin-top: max(env(safe-area-inset-top, 0), 0.5rem);
        }
    }
}

/* ==================== MOBILE MODAL IMPROVEMENTS ==================== */

/* Ensure modal content is fully scrollable on mobile */
@media (max-width: 768px) {
    /* Add extra padding to modal content for better visibility */
    #about-modal .px-4, 
    #stain-gallery-modal .px-4, 
    #projects-modal .px-4 {
        padding-bottom: 2rem !important;
    }
    
    /* Ensure CTA sections are visible */
    .bg-gradient-to-r {
        margin-bottom: 1rem;
    }
    
    /* Better spacing for buttons */
    .projects-cta, .stain-cta, .about-cta {
        margin-bottom: 0.5rem;
    }
    
    /* Mobile stain button base styles */
    .stain-select-btn {
        min-height: auto !important;
        width: auto !important;
        max-width: fit-content !important;
        display: inline-block !important;
        border-radius: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra padding for very small screens */
    #about-modal .px-4, 
    #stain-gallery-modal .px-4, 
    #projects-modal .px-4 {
        padding-bottom: 3rem !important;
    }
    
    /* Ensure scroll works properly */
    #about-modal, #stain-gallery-modal, #projects-modal {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Small screen button styling */
    .stain-select-btn {
        min-height: auto !important;
        line-height: 1.2 !important;
        width: auto !important;
        max-width: fit-content !important;
        display: inline-block !important;
        border-radius: 0.5rem !important;
        font-weight: 500 !important;
    }
}

/* ==================== STAIN CARD MOBILE OPTIMIZATIONS ==================== */

/* Mobile optimizations keep cards proportional */
@media (max-width: 768px) {
    .stain-card img {
        height: 8rem !important;
    }
    
    /* Better spacing around buttons */
    .stain-card .p-4 {
        padding: 0.75rem !important;
    }
    
    .stain-card h3 {
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .stain-card img {
        height: 6rem !important;
    }
    
    /* Tighter spacing for small screens */
    .stain-card .p-4 {
        padding: 0.5rem !important;
    }
    
    .stain-card h3 {
        margin-bottom: 0.375rem !important;
        font-size: 0.8rem !important;
    }
}

/* ==================== STAIN BUTTON MOBILE REFINEMENTS ==================== */

/* Additional button styling */
@media (max-width: 768px) {
    .stain-card .flex.justify-center {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .stain-card .flex.justify-center {
        margin-top: 0.25rem;
    }
}

/* ==================== STAIN SELECT BUTTON FINAL OVERRIDES ==================== */

/* Base button styling - override Tailwind defaults */
.stain-select-btn {
    min-width: auto !important;
    max-width: fit-content !important;
    width: auto !important;
    white-space: nowrap !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Mobile compact styling */
@media (max-width: 768px) {
    .stain-select-btn {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.75rem !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 480px) {
    .stain-select-btn {
        font-size: 0.6875rem !important;
        padding: 0.25rem 0.5rem !important;
        line-height: 1.2 !important;
    }
}

/* Maximum specificity override for stubborn conflicts */
#stain-gallery-modal .stain-select-btn,
.stain-card .stain-select-btn {
    min-width: auto !important;
    max-width: fit-content !important;
    width: auto !important;
}

@media (max-width: 768px) {
    #stain-gallery-modal .stain-select-btn,
    .stain-card .stain-select-btn {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.75rem !important;
    }
}

@media (max-width: 480px) {
    #stain-gallery-modal .stain-select-btn,
    .stain-card .stain-select-btn {
        font-size: 0.6875rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}