/* Custom Styles for Formations - Interior Design & Construction */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

/* Navbar scrolled state */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Active navigation link */
.nav-link.active {
    color: #495057 !important;
    font-weight: 600;
}

/* Hero section gradient overlay */
.hero-overlay {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(233, 236, 239, 0.8) 100%);
}

/* Custom button hover effects */
.btn-primary-custom {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 37, 41, 0.2);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 37, 41, 0.3);
}

.btn-outline-custom {
    border: 2px solid #212529;
    color: #212529;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: #212529;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 37, 41, 0.2);
}

/* Service cards hover effects */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(108, 117, 125, 0.1);
}

/* Portfolio filter active state */
.portfolio-filter.active {
    background-color: #212529 !important;
    color: white !important;
}

/* Portfolio item animations */
.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.02);
}

.portfolio-item .portfolio-overlay {
    background: linear-gradient(45deg, rgba(33, 37, 41, 0.9) 0%, rgba(52, 58, 64, 0.8) 100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Form styling enhancements */
.form-control-custom {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-control-custom:focus {
    border-color: #495057;
    box-shadow: 0 0 0 3px rgba(73, 80, 87, 0.1);
    background-color: white;
    outline: none;
}

/* Contact form styling */
#contact-form input,
#contact-form select,
#contact-form textarea {
    font-family: 'Inter', sans-serif;
}

/* Social media icons hover effects */
.social-icon {
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(108, 117, 125, 0.1);
    color: #495057;
}

.social-icon:hover {
    background-color: #495057;
    color: white;
    transform: translateY(-2px);
}

/* Section padding consistency */
.section-padding {
    padding: 80px 0;
}

/* Text gradient effects */
.text-gradient {
    background: linear-gradient(135deg, #212529 0%, #495057 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Loading animation for images */
.image-placeholder {
    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;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .service-card,
    .portfolio-item {
        margin-bottom: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    .btn-lg-mobile {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.focus-visible:focus {
    outline: 2px solid #495057;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card,
    .service-card,
    .portfolio-item {
        border: 2px solid #212529;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
}

/* Custom utility classes */
.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.border-radius-custom {
    border-radius: 12px;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success and error states */
.success-message {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.error-message {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
}