/**
 * Custom CSS for Behzad Trans Industrial Theme
 * Additional styles beyond the main style.css
 */

/* Enhanced Header Styles */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    text-decoration: none;
    background: linear-gradient(135deg, #2563eb, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Styles */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: #374151;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-menu > li > a:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
}

/* Dropdown Menu */
.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 8px;
    padding: 8px 0;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 8px;
}

.dropdown-menu a:hover {
    background-color: #f3f4f6;
    color: #2563eb;
    transform: translateX(4px);
}

/* CTA Button in Navigation */
.nav-cta {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: white !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.3s ease !important;
}

.nav-cta:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #374151;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 300px;
        height: calc(100vh - 80px);
        background: white;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        padding: 2rem 0;
        overflow-y: auto;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 0 1rem;
    }
    
    .nav-menu > li {
        width: 100%;
    }
    
    .nav-menu > li > a {
        display: block;
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid #f3f4f6;
        border-radius: 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f9fafb;
        margin: 0;
        padding: 0;
        border-radius: 0;
    }
    
    .dropdown-menu a {
        padding: 0.75rem 2rem;
        margin: 0;
        border-radius: 0;
    }
    
    .nav-cta {
        margin: 1rem !important;
        text-align: center !important;
        display: block !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-menu > li > a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Header Scroll Effect */
.site-header {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Enhanced Product Cards */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-content {
    position: relative;
    z-index: 2;
}

/* Feature Items Hover Effects */
.feature-item {
    position: relative;
    overflow: hidden;
}

.feature-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.feature-item:hover::after {
    left: 100%;
}

/* Hero Section Enhancements */
.hero-section {
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent 0%, var(--white) 100%);
    z-index: 1;
}

/* Contact Form Enhancements */
.contact-form {
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    background: rgba(255, 255, 255, 1);
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

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

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-slide-up {
    animation: slideInUp 0.6s ease forwards;
}

.animate-slide-down {
    animation: slideInDown 0.6s ease forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease forwards;
}

.animate-fade-scale {
    animation: fadeInScale 0.6s ease forwards;
}

/* Stagger Animation Delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

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

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .contact-section,
    .cta-button {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .section {
        padding: 1rem 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #000080;
        --secondary-blue: #0066cc;
        --accent-green: #008000;
        --text-dark: #000000;
        --text-light: #333333;
        --white: #ffffff;
        --light-gray: #f0f0f0;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-gray: #2a2a2a;
        --text-dark: #ffffff;
        --text-light: #cccccc;
        --dark-gray: #0f0f0f;
        --medium-gray: #888888;
    }
    
    .site-header {
        background: var(--dark-gray);
    }
    
    .product-card,
    .feature-item,
    .about-text {
        background: var(--light-gray);
        color: var(--text-dark);
    }
}

/* Focus Styles for Accessibility */
.cta-button:focus,
.form-control:focus,
.main-nav a:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
    padding: 8px 16px;
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* Enhanced Responsive Design */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    .section {
        padding: var(--spacing-lg) 0;
    }
}

/* Loading States for Images */
img {
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

img[data-src].loaded,
img:not([data-src]) {
    opacity: 1;
}

/* Enhanced Button Styles */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.online {
    background: var(--accent-green);
}

.status-indicator.offline {
    background: var(--warning-orange);
}

.status-indicator.error {
    background: #dc2626;
}

/* Custom Form Elements */
.custom-select {
    position: relative;
    display: inline-block;
}

.custom-select::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-light);
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Utility Classes for JavaScript */
.js-hidden {
    display: none !important;
}

.js-visible {
    display: block !important;
}

.js-fade-in {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.js-fade-in.visible {
    opacity: 1;
}

.js-slide-up {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.js-slide-up.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Blog Section Styles */
.blog-section {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.blog-section .section-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-image {
    height: 220px;
    overflow: hidden;
}

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

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

.blog-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #64748b;
    align-items: center;
}

.blog-category {
    background: linear-gradient(45deg, #10b981, #3b82f6);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

.blog-title {
    margin-bottom: 15px;
    flex: 1;
}

.blog-title a {
    color: #1a365d;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
}

.blog-title a:hover {
    color: #2563eb;
}

.blog-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.read-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    margin-top: auto;
}

.read-more:hover {
    color: #1d4ed8;
}

.blog-cta {
    text-align: center;
}

.cta-button.secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button.secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Icons for blog meta */
.icon-calendar::before {
    content: "📅";
    margin-left: 5px;
}

.icon-arrow-left::before {
    content: "←";
}

/* Mobile Responsive for Blog */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-section {
        padding: 60px 0;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}