/**
 * Tesila Website Custom Styles
 * Custom CSS to complement Tailwind CSS
 */

/* CSS Variables */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #f3f4f6;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Navigation Styles */
#main-nav {
    transition: var(--transition);
    background: transparent;
}

#main-nav.nav-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

#main-nav.nav-scrolled .nav-link {
    color: var(--text-dark);
}

.nav-link {
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language Toggle */
.lang-toggle {
    padding: 4px 12px;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    opacity: 0.6;
}

.lang-toggle:hover {
    opacity: 0.8;
}

.lang-toggle.active {
    background: var(--primary-color);
    color: white;
    opacity: 1;
}

/* Mobile Menu */
#mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#mobile-menu.active {
    transform: translateX(0);
}

/* Carousel Styles */
.carousel-slide {
    opacity: 0;
    transition: opacity 0.5s ease;
    position: absolute;
    inset: 0;
}

.carousel-slide.active {
    opacity: 1;
    position: relative;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
    cursor: pointer;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Button Styles */
.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-color);
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-white:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Card Styles */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-card .product-image {
    overflow: hidden;
}

.product-card .product-image img {
    transition: var(--transition);
}

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

/* Feature Card */
.feature-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #e5e7eb;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Counter */
.stat-item {
    text-align: center;
    padding: 24px;
}

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

.stat-label {
    font-size: 1rem;
    color: var(--text-gray);
    margin-top: 8px;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 20px;
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item img {
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 64, 175, 0.8);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Product Detail Gallery */
.product-thumbnail {
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.product-thumbnail.active,
.product-thumbnail:hover {
    border-color: var(--primary-color);
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* Category Filter */
.category-filter {
    padding: 8px 20px;
    border-radius: 20px;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: white;
}

.category-filter:hover,
.category-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Footer Styles */
.footer-link {
    color: var(--text-gray);
    transition: var(--transition);
    display: block;
    padding: 4px 0;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: white;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.9), rgba(30, 58, 138, 0.8));
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: var(--secondary-color);
    font-weight: 600;
    color: var(--text-dark);
}

.data-table tr:hover {
    background: #f9fafb;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.875rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 80vh;
    }
    
    .timeline {
        padding-left: 24px;
    }
    
    .timeline::before {
        left: 8px;
    }
    
    .timeline-item::before {
        left: -20px;
        width: 12px;
        height: 12px;
    }
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(30, 64, 175, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Error Messages */
.message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Image Placeholder */
.img-placeholder {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 100;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Print Styles */
@media print {
    #main-nav,
    #mobile-menu,
    .whatsapp-float {
        display: none;
    }
}
