/* static/css/style.css */

/* Define custom properties for consistent color scheme and easy theme switching */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a1a;
    --dark-text: #f0f0f0;
}

/* Base styles for the body, including font and color settings */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode styles for the body */
body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* Navbar styles */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    transition: all 0.3s ease;
}

/* Dark mode styles for the navbar */
.dark-mode .navbar {
    background-color: rgba(26, 26, 26, 0.95) !important;
}

/* Navbar link styles */
.navbar-light .navbar-nav .nav-link {
    color: rgba(0,0,0,.7);
}

/* Dark mode styles for navbar links */
.dark-mode .navbar-light .navbar-nav .nav-link {
    color: rgba(255,255,255,.8);
}

.dark-mode .navbar-light .navbar-nav .nav-link:hover,
.dark-mode .navbar-light .navbar-nav .nav-link:focus {
    color: rgba(255,255,255,1);
}

.dark-mode .navbar-light .navbar-nav .active > .nav-link,
.dark-mode .navbar-light .navbar-nav .nav-link.active {
    color: var(--accent-color);
}

/* Navbar brand (logo) styles */
.navbar-brand img {
    transition: transform 0.3s ease;
    max-height: 80px;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Navigation link styles */
.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Dark mode styles for navigation links */
.dark-mode .nav-link {
    color: var(--dark-text);
}

.dark-mode .nav-link:hover {
    color: var(--accent-color);
}

/* Dark mode toggle button styles */
#darkModeToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-bg);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode #darkModeToggle {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* Hero section styles */
.hero-section {
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

/* Hero overlay for better text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay */
}

/* Hero content styles */
.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-top: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Statistics section styles */
.statistics-section {
    background-color: var(--light-bg);
    padding: 5rem 0;
}

.dark-mode .statistics-section {
    background-color: var(--dark-bg);
}

/* Individual statistic item styles */
.stat-item {
    padding: 2rem;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.dark-mode .stat-item {
    background-color: #2a2a2a;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dark-mode .stat-number {
    color: var(--accent-color);
}

/* Design card styles */
.design-card {
    transition: all 0.3s ease-in-out;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dark-mode .design-card {
    background-color: #2a2a2a;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

.design-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Design card image styles */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.design-card:hover .card-img-top {
    transform: scale(1.1);
}

/* Design card overlay styles */
.card-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.design-card:hover .card-img-overlay {
    opacity: 1;
}

.card-title {
    color: white;
    font-weight: 600;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Features section styles */
.features-section {
    background-color: var(--secondary-color);
    color: white;
    padding: 5rem 0;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    background-color: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.feature-card i {
    color: var(--accent-color);
}

/* Testimonials section styles */
.testimonials-section {
    background-color: var(--light-bg);
    padding: 5rem 0;
}

.dark-mode .testimonials-section {
    background-color: var(--dark-bg);
}

.testimonial-item {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0 15px;
}

.dark-mode .testimonial-item {
    background-color: #2a2a2a;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

.testimonial-item p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.dark-mode .testimonial-item p {
    color: var(--dark-text);
}

.testimonial-item h5 {
    font-weight: 600;
    color: var(--primary-color);
}

.dark-mode .testimonial-item h5 {
    color: var(--accent-color);
}

/* Button styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Dark mode button styles */
.dark-mode .btn-outline-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.dark-mode .btn-outline-primary:hover {
    background-color: var(--accent-color);
    color: var(--dark-bg);
}

/* Gradient button styles */
.btn-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Footer styles */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.dark-mode footer {
    background-color: #0a0a0a;
}

/* Lazy loading styles for images */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy.loaded {
    opacity: 1;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .stat-item {
        margin-bottom: 1rem;
    }

    .feature-card {
        margin-bottom: 1rem;
    }
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Improved focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.dark-mode a:focus, .dark-mode button:focus, .dark-mode input:focus, .dark-mode textarea:focus {
    outline-color: var(--accent-color);
}

/* Additional styles for better dark mode readability */
.dark-mode .card-body {
    background-color: #2a2a2a;
    color: var(--dark-text);
}

.dark-mode .card-text {
    color: var(--dark-text);
}

/* Dark mode styles for navbar toggler */
.dark-mode .navbar-toggler-icon { 
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.dark-mode .navbar-light .navbar-toggler {
    color: rgba(255,255,255,.5);
    border-color: rgba(255,255,255,.1);
}

/* Slick carousel customization */
.slick-prev:before, .slick-next:before {
    color: var(--primary-color);
}

.dark-mode .slick-prev:before, .dark-mode .slick-next:before {
    color: var(--accent-color);
}

.slick-dots li button:before {
    color: var(--primary-color);
}

.dark-mode .slick-dots li button:before {
    color: var(--accent-color);
}

/* Carousel control styles */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 20px;
    background-size: 20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Custom arrow styles for carousels */
.custom-carousel-arrow {
    font-size: 2rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
}

.custom-carousel-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Responsive adjustments for design detail page */
@media (max-width: 767px) {
    .hero-section.hero-small {
        height: 40vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .design-card {
        margin-bottom: 2rem;
    }

    .sticky-top {
        position: static;
    }
}

/* Improve spacing on mobile */
@media (max-width: 767px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    h2, h3 {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Ensure the sticky card doesn't overlap footer on larger screens */
@media (min-width: 768px) {
    .sticky-top {
        top: 20px;
        z-index: 1020;
    }
}