/* ==========================================
   RBS Rolamentos - Custom CSS
   ========================================== */

/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* Header Styles */
#header {
    background: linear-gradient(135deg, #2C3E50 0%, #34495e 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#header.scrolled {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Hero Section Parallax */
#hero {
    position: relative;
}

#hero img {
    will-change: transform;
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid rgba(200, 16, 46, 0.1);
    border-top: 3px solid #C8102E;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hover Effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Card Shadows */
.card-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* Button Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Background Pattern */
.bg-pattern {
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.05) 10px,
            rgba(255, 255, 255, 0.05) 20px
        );
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Smooth Scroll Snap */
section {
    scroll-margin-top: 80px;
}

/* Mobile Menu Animation */
#mobileMenu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.active {
    transform: translateX(0);
}

/* WhatsApp Button Pulse */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.animate-pulse-custom {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Back to Top Button */
#backToTop {
    transition: opacity 0.3s, transform 0.3s;
}

#backToTop.show {
    display: flex !important;
    opacity: 1;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #C8102E 0%, #E91E63 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image Lazy Loading Placeholder */
img[loading="lazy"] {
    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;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #C8102E;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a00d24;
}

/* Underline Animation */
.underline-animate {
    position: relative;
    text-decoration: none;
}

.underline-animate::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #5BC0DE;
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* Form Styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #C8102E;
    border-color: #C8102E;
}

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #C8102E;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header,
    footer,
    #whatsapp-float,
    #backToTop {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 640px) {
    #header {
        padding: 0.5rem 0;
    }
    
    #hero {
        min-height: 100vh;
    }
}

/* Animation Delays for Sequential Elements */
[data-aos] {
    transition-property: transform, opacity;
}

/* Performance Optimizations */
img,
video {
    max-width: 100%;
    height: auto;
}

/* Reduce Motion for Accessibility */
@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;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Commented out - can be enabled if needed
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    */
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Success Message */
.success-message {
    background-color: #10B981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Error Message */
.error-message {
    background-color: #EF4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Image Zoom on Hover */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background-color: #C8102E;
    color: white;
}

.badge-secondary {
    background-color: #6C757D;
    color: white;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #2C3E50;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Utilities */
.text-balance {
    text-wrap: balance;
}

.transition-gpu {
    transform: translateZ(0);
    will-change: transform;
}

/* End of Custom CSS */

