/* MKB Plastik - Güneş Paneli & Elektrik Sistemleri CSS */

/* Tailwind ile uyumlu custom styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #1CAE67;
    --primary-dark: #159E5B;
    --primary-light: #4FDDAA;
    --green-eco: #22c55e;
    --green-eco-dark: #16a34a;
    --solar-yellow: #fbbf24;
    --electric-blue: #3b82f6;
}

/* Base overrides */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Custom Tailwind Extensions */
.text-gradient {
    background: linear-gradient(135deg, #1CAE67, #4FDDAA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-blur {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Ürün ve Kategori Box Tasarımları - Optimized */
.product-card, .category-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.product-card:hover, .category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Resim Container - Fixed sizing */
.product-image, .category-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
}

.product-image img, .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img, 
.category-card:hover .category-image img {
    transform: scale(1.1);
}

/* Fallback için placeholder */
.no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Home Page Mobile Fixes */
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
    }
    
    .hero-content {
        text-align: center;
        padding: 0 1rem;
    }
    
    /* Grid Responsive Fixes */
    .products-grid, .categories-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    
    /* Service Cards */
    .services-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Container padding fixes */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Button fixes */
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-actions > * {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Text scaling */
    .module-title {
        font-size: 2rem !important;
    }
    
    .section-title {
        font-size: 1.75rem !important;
    }
    
    /* Padding adjustments */
    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-32 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    /* Card content */
    .product-content, .category-content {
        padding: 1rem;
    }
    
    /* Navigation mobile fixes */
    .mobile-menu {
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
    }
}

@media (max-width: 640px) {
    /* Extra small screens */
    .hero-title {
        font-size: 2rem !important;
    }
    
    .text-5xl, .text-6xl {
        font-size: 2.5rem !important;
    }
    
    .text-4xl {
        font-size: 2rem !important;
    }
    
    .text-3xl {
        font-size: 1.75rem !important;
    }
    
    /* Button size fixes */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Grid single column */
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* Spacing fixes */
    .space-x-4 > * + * {
        margin-left: 0 !important;
    }
    
    .space-y-2 > * + * {
        margin-top: 0.5rem !important;
    }
}

/* Navbar Mobile Menu Fixes */
@media (max-width: 1024px) {
    .mobile-menu-button span {
        transition: all 0.3s ease;
        transform-origin: center;
    }
    
    .mobile-menu-open .mobile-menu-button span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-open .mobile-menu-button span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-open .mobile-menu-button span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Mobile menu container */
    .mobile-menu-content {
        background: white;
        border-radius: 0 0 1rem 1rem;
        box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    }
    
    /* Mobile menu items */
    .mobile-menu-item {
        border-bottom: 1px solid #f3f4f6;
    }
    
    .mobile-menu-item:last-child {
        border-bottom: none;
    }
}

/* Performance optimizations */
.product-card, .category-card, .service-card {
    will-change: transform;
}

.product-image img, .category-image img {
    will-change: transform;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.focus\:ring-primary:focus {
    --tw-ring-color: #1CAE67;
}

.focus\:border-primary:focus {
    --tw-border-opacity: 1;
    border-color: #1CAE67;
}

/* Loading states */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #1CAE67;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print\:block {
        display: block !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .glass-effect {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid #000;
    }
    
    .navbar-blur {
        background: rgba(255, 255, 255, 1);
        border-bottom: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .product-card:hover,
    .category-card:hover {
        transform: none;
    }
}
