/* Custom CSS for CodeMarket */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #ffffff;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #ffffff;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #0d6efd 0%, #036ad8 100%);
    --gradient-hero: linear-gradient(90deg, #357ff7, #a859f1);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-image img {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    /* background: var(--gradient-primary); */
    background: #7dc2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    
}

.feature-icon i {
    font-size: 2rem;
    /* color: white; */
    color: #015ae0;
}

/* Category Cards */
.category-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    color: inherit;
    text-decoration: none;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.category-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Product Cards */
.product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

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

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.price-current {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price-original {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 1rem;
}

/* Statistics Counter */
.counter {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

/* Team Cards */
.team-card {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.team-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin: 0 auto;
}

/* Process Steps */
.process-step {
    position: relative;
    padding: 20px;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Technology Tags */
.tech-tag {
    display: inline-block;
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    margin: 2px;
    font-weight: 500;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.service-icon i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Portfolio Items */
.portfolio-item {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.portfolio-image {
    height: 200px;
    overflow: hidden;
}

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

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

/* Contact Info Cards */
.contact-info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.contact-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* FAQ Styles */
.faq-category-card {
    cursor: pointer;
}

.faq-category-card:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Article Cards */
.article-card {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

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

.article-card:hover .article-image img {
    transform: scale(1.05);
}

/* Rating Stars */
.stars {
    color: #ffc107;
}

.star {
    font-size: 1rem;
    margin-right: 2px;
}

/* Product Gallery */
/* chỉnh ảnh sản phẩm */
.main-image {
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
 }
.main-image img {
    width: 100%;
    height: 100%; /*bình thường 400px*/
    object-fit: contain;
}
/* -----Chỉnh ảnh phụ ----- */

.thumb-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
}

.thumb-wrapper {
    overflow: hidden;
    width: 100%;
}

.thumb-track {
    display: flex;
    gap: 10px;
    transition: transform 0.3s ease;
}

.thumbnail-img {
    width: 100px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnail-img.active {
    border-color: #007bff;
}

.thumb-btn {
    background: #ffffff;
    border: 1px solid #ccc;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thumb-btn:hover {
    background: #f0f0f0;
}
/* ---------------------------------- */

.thumbnail-images img:hover,
.thumbnail-images img.active {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

/* Filter Buttons */
.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Sub-category Filters */
.sub-category-filters {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sub-filter-btn {
    font-size: 0.875rem;
    padding: 6px 12px;
    margin: 2px;
}

/* nút trong lọc ngôn ngữ khi đã được chọn */
.sub-filter-btn.active {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Dropdown Menu Enhancements */
.dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 10px 30px #00000026;
    border: none;
}

.dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    padding: 4px 16px;  /*4 là trên duoi, 16 là trái phải*/
    border-radius: 6px;
    margin: 2px 5px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #bcd4f7;
    color: var(--primary-color);
    /* transform: translateX(3px); */
}

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

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

/* Social Links */
.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: inherit;

}

/* .social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}  */

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .feature-icon i {
        font-size: 1.5rem;
    }

    .step-icon i {
        font-size: 2rem;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.border-radius-custom {
    border-radius: 12px;
}

/* Newsletter Form */
.newsletter-form .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.newsletter-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
/* Carousel Navigation Arrows */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(13, 110, 253, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-icon i {
    font-size: 1.2rem;
    color: white;
}

/* Hide default carousel icons */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    display: none;
}

/* Responsive carousel controls */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        left: 10px;
        right: 10px;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }
}