/* ============================================
   STUDIO CAPILAR - CUSTOM STYLES
   ============================================ */

/* Reset e Base */
* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Header Scroll Effect */
#header.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

/* Navigation Active Link */
.nav-link {
    position: relative;
}

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

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

/* Service Cards Hover Effect */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Availability Filters */
.availability-filter {
    background: #fff;
    color: #6B7280;
    border: 2px solid #E5E7EB;
}

.availability-filter:hover {
    background: #F9FAFB;
    border-color: #8B4513;
}

.availability-filter.active {
    background: #8B4513;
    color: white;
    border-color: #8B4513;
}

/* Availability Timeline Item */
.availability-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.availability-item:nth-child(1) { animation-delay: 0.1s; }
.availability-item:nth-child(2) { animation-delay: 0.2s; }
.availability-item:nth-child(3) { animation-delay: 0.3s; }
.availability-item:nth-child(4) { animation-delay: 0.4s; }
.availability-item:nth-child(5) { animation-delay: 0.5s; }

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

/* Timeline Connector */
.timeline-connector {
    position: relative;
}

.timeline-connector::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 48px;
    bottom: -48px;
    width: 2px;
    background: linear-gradient(to bottom, #8B4513, #D2B48C);
}

.availability-item:last-child .timeline-connector::before {
    display: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-disponivel {
    background: #DEF7EC;
    color: #03543F;
}

.status-poucos-lugares {
    background: #FEF3C7;
    color: #92400E;
}

.status-esgotado {
    background: #FEE2E2;
    color: #991B1B;
}

/* Form Styles */
input,
select,
textarea {
    color: #1f2937 !important;
    background-color: #ffffff !important;
}

input:focus,
select:focus,
textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #8B4513;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Back to Top Button */
#backToTop {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Success/Error Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease;
}

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

.alert-success {
    background: #DEF7EC;
    color: #03543F;
    border: 1px solid #84E1BC;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.alert i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Skeleton Loading */
.skeleton {
    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; }
}

/* Image Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Mobile Menu Animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobileMenu.show {
    max-height: 500px;
}

/* Smooth Scroll Offset for Fixed Header */
section {
    scroll-margin-top: 80px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A0522D;
}

/* Print Styles */
@media print {
    header,
    footer,
    #backToTop,
    .whatsapp-float {
        display: none !important;
    }
}

/* Accessibility - Focus Visible */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

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

/* Dark Mode Support (opcional) */
@media (prefers-color-scheme: dark) {
    /* Adicionar estilos de dark mode aqui se necessário */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .timeline-connector::before {
        left: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.875rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

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

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

/* Utility Classes */
.blur-backdrop {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.text-gradient {
    background: linear-gradient(135deg, #8B4513 0%, #D2B48C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.shadow-medium {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.shadow-hard {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(139, 69, 19, 0.1);
    border-top-color: #8B4513;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.toast.hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #8B4513, #D2B48C);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Card Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::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;
}

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