/* Custom styles for PCL Automation website */

/* Hero Section */
.hero-section {
    margin-top: 0;
    padding-top: 80px; /* Account for fixed navigation */
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section p {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Product Carousel */
.product-carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.product-carousel-track {
    display: flex;
    transition: transform 3s ease-in-out;
    animation: slideLeft 30s linear infinite;
}

.product-item {
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: scale(1.05);
}

.product-item img {
    transition: transform 0.3s ease;
}

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

/* Responsive carousel adjustments for 1920x200 aspect ratio */
@media (max-width: 1920px) {
    .carousel-container {
        height: 250px; /* Increased height to show more of the image */
    }
}

@media (max-width: 1440px) {
    .carousel-container {
        height: 200px; /* Proportional scaling */
    }
}

@media (max-width: 1024px) {
    .carousel-container {
        height: 160px; /* Tablet size - increased */
    }

    .carousel-caption {
        padding: 0.75rem;
    }

    .carousel-caption h3 {
        font-size: 1.125rem;
    }

    .carousel-caption p {
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        height: 130px; /* Mobile size - increased */
    }

    .carousel-caption {
        padding: 0.5rem;
    }

    .carousel-caption h3 {
        font-size: 1rem;
    }

    .carousel-caption p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 100px; /* Small mobile - increased */
    }

    .carousel-caption {
        padding: 0.375rem;
    }

    .carousel-caption h3 {
        font-size: 0.875rem;
    }

    .carousel-caption p {
        font-size: 0.625rem;
    }
}

/* Product image hover effects */
.product-image {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
}

.product-image:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Category sections with proper scroll offset */
.category-section {
    scroll-margin-top: 100px;
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.5rem 1rem;
        text-align: center;
    }
    
    .quick-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .quick-nav a {
        width: 100%;
        text-align: center;
    }
}

/* Image loading optimization */
.product-image {
    background-color: #f3f4f6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 3rem;
}

/* Smooth animations for page elements */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

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

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

/* Loading states for images */
.image-loading {
    position: relative;
    overflow: hidden;
}

.image-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive typography */
@media (max-width: 640px) {
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-3xl {
        font-size: 1.75rem;
    }
}

/* Enhanced focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    .print-break {
        page-break-before: always;
    }
}
