/* main-page.css */

/* Full-width Slider for Specials */
.slider-container {
    position: relative;
    width: 100vw;               /* Full viewport width */
    left: 50%;                  /* Position from center */
    right: 50%;                 /* Position from center */
    margin-left: -50vw;         /* Pull back to full width */
    margin-right: -50vw;        /* Pull back to full width */
    height: 45vh;               /* 45% of viewport height - taller */
    overflow: hidden;
}

/* Automatic Slideshow Styles */
.slideshow {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slideshow-track {
    display: flex;
    width: 600%; /* 100% * number of slides */
    height: 100%;
    transition: transform 0.3s ease-in-out; /* Fast transition */
    position: relative;
}

.slideshow-slide {
    flex: 0 0 16.666%; /* 100% / number of slides */
    width: 16.666%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center top;
    transition: all 0.3s ease-in-out; /* Faster transition */
    transform: scale(1);
}

/* Zoom effect for active slide */
.slideshow-slide.active {
    transform: scale(1.05);
    z-index: 5;
}

.slideshow-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* overlay for text readability */
}

.slide-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 3;
}

.slide-content {
    position: relative;
    max-width: 600px;
    color: white;
    margin-left: auto;
    margin-right: auto;
    padding: 0 50px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    opacity: 0.9;
    transform: translateY(20px);
    transition: all 0.2s ease-in-out 0.05s; /* Even faster transition */
}

/* Enhance active slide content */
.slideshow-slide.active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

/* Make sure content is contained within the page width */
@media (min-width: 1440px) {
    .slide-content {
        margin-left: calc(50% - 700px); /* Half of container width from center */
        margin-right: auto;
    }
}

.special-tag {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: inline-block;
    text-transform: uppercase;
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* Navigation Controls */
.slideshow-nav {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.slideshow-nav label {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-nav label:hover,
.slideshow-nav label.active {
    background-color: white;
    transform: scale(1.2);
}

/* Previous/Next buttons */
.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 86, 179, 0.7);
    border: none;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.slideshow-prev:hover,
.slideshow-next:hover {
    background-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

.slideshow-prev {
    left: 15px;
}

.slideshow-next {
    right: 15px;
}

/* Slideshow track transition will be handled by JavaScript */
.slideshow-track {
    transition: transform 0.3s ease-in-out;
}

/* Manual navigation CSS */
.slideshow-radio {
    display: none;
}

#slide1:checked ~ .slideshow .slideshow-track {
    transform: translateX(0%);
    animation-play-state: running;
}
#slide2:checked ~ .slideshow .slideshow-track {
    transform: translateX(-16.666%);
    animation-play-state: running;
}
#slide3:checked ~ .slideshow .slideshow-track {
    transform: translateX(-33.332%);
    animation-play-state: running;
}
#slide4:checked ~ .slideshow .slideshow-track {
    transform: translateX(-49.998%);
    animation-play-state: running;
}
#slide5:checked ~ .slideshow .slideshow-track {
    transform: translateX(-66.664%);
    animation-play-state: running;
}
#slide6:checked ~ .slideshow .slideshow-track {
    transform: translateX(-83.33%);
    animation-play-state: running;
}

/* Active indicators are now handled by JavaScript */

/* Responsive adjustments */
@media (max-width: 768px) {
    .slider-container {
        height: 30vh; /* Reduced height on tablets */
    }
    
    .slide-content {
        bottom: 40px;
        left: 30px;
        max-width: 80%;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .slider-container {
        height: 25vh; /* Further reduced height on mobile */
    }
    
    .slide-content {
        bottom: 30px;
        left: 20px;
    }
    
    .slideshow-prev,
    .slideshow-next {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .slide-content h2 {
        font-size: 1.3rem;
    }
}

/* General Styles */
:root {
    --primary-color: #0056b3;
    --secondary-color: #00a0e9;
    --accent-color: #ff6b00;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-color: #333333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-outline-light {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Featured Categories */
.featured-categories {
    padding: 3rem 0;
    margin-top: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    background-color: white;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
}

/* Software Solutions */
.software-solutions {
    padding: 5rem 0;
    background-color: #f5f7fa;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.software-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.software-card:hover {
    transform: translateY(-5px);
}

.software-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.software-card h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

.software-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.software-features span {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Featured Products */
.featured-products {
    padding: 5rem 0;
}

.products-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background-color: white;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    bottom: 0;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #eaeaea;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.product-category {
    color: #666;
    font-size: 0.9rem;
}

/* Testimonials */
.testimonials {
    padding: 5rem 0;
    background-color: #f5f7fa;
}

.testimonial-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.testimonial-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    font-style: italic;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.author-info h4 {
    margin-bottom: 5px;
    font-weight: 600;
}

.author-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter {
    padding: 4rem 0;
    background-color: var(--primary-color);
    color: white;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    margin-bottom: 15px;
}

.newsletter-content p {
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 500px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}