/* Custom Styles for ALAV Tech - Bootstrap Edition */

/* Font Family */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* Custom Bootstrap Colors */
:root {
    --bs-primary: #0d6efd;
    --bs-primary-rgb: 13, 110, 253;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #495057;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--bs-primary);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(13, 110, 253, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section .badge {
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Featured card (Rateio) */
.card.border-primary {
    position: relative;
}

.card.border-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #6610f2 100%);
    border-radius: 0.375rem 0.375rem 0 0;
}

/* Buttons */
.btn {
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #0b5ed7 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #0b5ed7 0%, var(--bs-primary) 100%);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* Statistics */
.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
}

footer img {
    transition: opacity 0.3s ease;
}

footer img:hover {
    opacity: 0.8;
}

/* Social Links */
footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--bs-primary) !important;
    transform: translateY(-2px);
}

/* Forms */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem 1rem 0 0;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
}

/* Images */
img {
    transition: all 0.3s ease;
}

.card img:hover {
    transform: scale(1.02);
}

/* Custom spacing */
.py-5 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Section padding adjustments */
section {
    scroll-margin-top: 80px;
}

/* Dark section improvements */
.bg-dark {
    background: linear-gradient(135deg, #212529 0%, #495057 100%) !important;
}

/* Loading state for forms */
.btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Active menu item highlight */
.navbar-nav .nav-link.active {
    color: #2196F3 !important;
    font-weight: 600;
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #2196F3, #1976D2);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #2196F3 !important;
    transform: translateY(-1px);
}

/* Mobile menu active state */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link.active {
        background: rgba(33, 150, 243, 0.1);
        border-radius: 6px;
        padding-left: 20px !important;
    }
    
    .navbar-nav .nav-link.active::after {
        display: none;
    }
    
    .navbar-nav .nav-link.active::before {
        content: '';
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 20px;
        background: #2196F3;
        border-radius: 2px;
    }
}

/* Footer link hover effects */
footer a.text-light:hover {
    color: #ffffff !important;
    opacity: 1 !important;
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 50px !important;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-section .badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    footer img {
        height: 50px !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        text-align: center;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .navbar, .btn, footer {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states */
.btn:focus, 
.form-control:focus, 
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Screenshot Gallery */
.screenshot-thumb {
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    height: 60px;
    object-fit: cover;
}

.screenshot-thumb:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#screenshotCarousel {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

#screenshotCarousel .carousel-item img {
    max-height: 600px;
    object-fit: contain;
    background-color: #f8f9fa;
}

.carousel-caption {
    backdrop-filter: blur(5px);
}

/* Responsive adjustments for screenshots */
@media (max-width: 768px) {
    #screenshotCarousel .carousel-item img {
        max-height: 300px;
    }
    
    .screenshot-thumb {
        height: 40px;
    }
}