/* Custom CSS for MTS Furnitech */

:root {
    --primary-green: #34C759;
    --primary-blue: #007bff;
    --dark-gray: #333333;
    --light-gray: #F7F7F7;
    --success-green: #34C759;
    --warning-yellow: #FFC107;
}

/* Modern Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--dark-gray);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-weight: 700;
    font-size: 2.5rem;
}

h2 {
    font-weight: 600;
    font-size: 2rem;
}

h3 {
    font-weight: 600;
    font-size: 1.5rem;
}

h4 {
    font-weight: 500;
    font-size: 1.25rem;
}

.lead {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.7;
}

.btn {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 8px;
}

.navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.main-content {
    padding-top: 76px; /* Account for fixed navbar */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.7;
}

.hero-description .fw-bold {
    font-weight: 700 !important;
    font-size: 1.4rem;
}

.hero-description .text-success {
    color: var(--primary-green) !important;
}

.hero-description .text-primary {
    color: var(--primary-blue) !important;
}

/* About Us Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.7;
}

.about-content .fw-bold {
    font-weight: 700 !important;
    font-size: 1.4rem;
}

.about-content .text-success {
    color: var(--primary-green) !important;
}

.about-content .text-primary {
    color: var(--primary-blue) !important;
}

.about-content .text-dark {
    color: #343a40 !important;
}

.about-content .text-warning {
    color: #ffc107 !important;
}

/* Service Card Image Optimization */
.service-card {
    transition: transform 0.2s ease;
    cursor: pointer;
}

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

.card-img-container {
    height: 200px;
    overflow: hidden;
    border-radius: 0.375rem 0.375rem 0 0;
}

.card-img-top {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Image preloader */
.card-img-top {
    background: #f8f9fa;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f8f9fa"/><path d="M50 20v60M20 50h60" stroke="%23dee2e6" stroke-width="2"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50px 50px;
}

.hero-description .text-dark {
    color: var(--dark-gray) !important;
}

.hero-description .text-warning {
    color: #ffc107 !important;
}

.hero-description .text-info {
    color: #0dcaf0 !important;
}

.hero-description .text-danger {
    color: #dc3545 !important;
}

/* Client Logos Section */
.client-logos-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 0;
    margin: 0 auto;
    max-width: 800px;
}

.client-logos-track {
    display: inline-flex;
    animation: scroll-logos 30s linear infinite;
    will-change: transform;
}

.client-logo {
    flex: 0 0 auto;
    margin: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.client-logo img {
    height: 50px;
    max-width: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
    opacity: 0.85;
}

.client-logo:hover img {
    transform: scale(1.1);
    opacity: 1;
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.client-logos-container:hover .client-logos-track {
    animation-play-state: paused;
}

/* Additional Typography Styles */
.service-card .card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

.service-card .card-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.hero-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.text-center h2, .text-center h3 {
    font-family: 'Space Grotesk', sans-serif;
}

/* Services Tab Styling */
.nav-tabs .nav-link {
    color: #495057;
    border: 1px solid transparent;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 1.1rem;
}

.nav-tabs .nav-link.active {
    color: var(--primary-green);
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    border-bottom: 2px solid var(--primary-green);
}

.nav-tabs .nav-link:hover {
    color: var(--primary-green);
    border-color: #e9ecef #e9ecef #dee2e6;
}

.tab-content {
    padding: 2rem 0;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #dee2e6;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-img-container {
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 0;
}

.service-card:hover .card-img-container img {
    transform: scale(1.05);
}

/* Loading state for images */
.card-img-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #198754;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 3;
}

.card-img-container.loaded::before {
    display: none;
}

/* Error state for images */
.card-img-container.error::after {
    content: '⚠️ Image failed to load';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    z-index: 3;
}

/* Fallback pattern for missing images */
.card-img-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.1;
    z-index: 1;
}

.card-img-container img {
    position: relative;
    z-index: 2;
}

/* Feature boxes */
.feature-box {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature-box:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
}

.whatsapp-btn:hover {
    background-color: #22c55e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn i {
    font-size: 1.2rem;
}

/* Responsive WhatsApp button */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn span {
        display: none;
    }
    
    .whatsapp-btn {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        justify-content: center;
        padding: 0;
    }
}

/* Custom button styles */
.btn-success {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-outline-success {
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-outline-success:hover {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

/* Text colors */
.text-success {
    color: var(--primary-green) !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.text-dark {
    color: var(--dark-gray) !important;
}

/* Bold text styling */
.fw-bold {
    font-weight: 700 !important;
}

/* Contact form styling */
.contact-form .form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.contact-form .form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* About content styling */
.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content .fw-bold.text-success {
    color: var(--primary-green) !important;
}

.about-content .fw-bold.text-primary {
    color: var(--primary-blue) !important;
}

.about-content .fw-bold.text-dark {
    color: var(--dark-gray) !important;
}

/* Service modal */
.modal-content {
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Navbar brand */
.navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Logo styling */
.logo-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-image {
    border-radius: 8px;
    object-fit: contain;
}

/* Footer */
footer {
    background-color: var(--dark-gray) !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-green) !important;
}

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

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-description .fw-bold {
        font-size: 1.2rem;
    }
    
    .feature-box {
        padding: 1.5rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
}

/* Admin panel specific styles */
.admin-sidebar {
    background-color: #f8f9fa;
    min-height: calc(100vh - 76px);
}

.admin-content {
    padding: 2rem;
}

/* Stats cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info {
    border: none;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-warning .card-body,
.card.bg-info .card-body {
    padding: 1.5rem;
}

/* Table responsiveness */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
}

/* Form styling */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 8px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Card hover effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Button hover effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Image styling */
.img-thumbnail {
    border-radius: 8px;
}

/* Loading animations */
.spinner-border {
    color: var(--primary-green);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

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

/* Scrolling Thank You Section */
.thank-you-scroll-section {
    background: rgba(247, 247, 247, 0.8);
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.scrolling-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.scrolling-text {
    display: inline-block;
    animation: scroll-left 65s linear infinite;
    animation-play-state: running;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    font-family: 'Space Grotesk', sans-serif;
    will-change: transform;
}

.scroll-item {
    display: inline-block;
    padding: 0 4rem;
    white-space: nowrap;
}

/* Different colors for scroll items */
.scroll-item.color-blue {
    color: #007bff;
}

.scroll-item.color-green {
    color: #34C759;
}

.scroll-item.color-black {
    color: #333333;
}

.scroll-item.color-purple {
    color: #6f42c1;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Responsive adjustments for scrolling text */
@media (max-width: 768px) {
    .scrolling-text {
        font-size: 1.4rem;
    }
    
    .scroll-item {
        padding: 0 3rem;
    }
}
