/* Trevaqu Nembi - Custom Styles */

/* CSS Custom Properties */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Yarn Colors */
    --yarn-pink: #FFB6C1;
    --yarn-blue: #4682B4;
    --yarn-yellow: #FFD700;
    --yarn-green: #228B22;
    --yarn-purple: #9370DB;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Base Styles */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: #374151;
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: #1f2937;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-display);
}

/* Custom Bootstrap Overrides */
.btn {
    font-weight: 500;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-normal);
    border: none;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Navigation Styles */
.navbar {
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all var(--transition-normal);
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="yarn-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23e2e8f0" opacity="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23yarn-pattern)"/></svg>');
    opacity: 0.3;
}

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

.min-vh-75 {
    min-height: 75vh;
}

.hero-yarn-showcase {
    position: relative;
    display: inline-block;
}

.hero-main-image {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.3s ease;
}

.hero-main-image:hover {
    transform: scale(1.02);
}

.floating-yarn-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

@keyframes floatElement {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-15px) rotate(120deg); 
    }
    66% { 
        transform: translateY(-8px) rotate(240deg); 
    }
}

/* Yarn Display Animation */
.yarn-display {
    position: relative;
    padding: 2rem;
}

.yarn-ball {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    animation: float 6s ease-in-out infinite;
    box-shadow: var(--shadow-lg);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.yarn-ball:nth-child(1) {
    background: var(--yarn-pink);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.yarn-ball:nth-child(2) {
    background: var(--yarn-blue);
    top: 60px;
    right: 20px;
    animation-delay: 1.2s;
}

.yarn-ball:nth-child(3) {
    background: var(--yarn-yellow);
    bottom: 60px;
    right: 60px;
    animation-delay: 2.4s;
}

.yarn-ball:nth-child(4) {
    background: var(--yarn-green);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 3.6s;
}

.yarn-ball:nth-child(5) {
    background: var(--yarn-purple);
    top: 60px;
    left: 20px;
    animation-delay: 4.8s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-image-container {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 2rem;
    text-align: center;
}

.product-colors {
    gap: 0.5rem;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Product Detail Styles */
.yarn-showcase {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.color-wheel {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.color-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-segment:nth-child(1) {
    top: 0;
    left: 50%;
    transform-origin: 0 100%;
    transform: rotate(0deg);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.color-segment:nth-child(2) {
    top: 0;
    right: 0;
    transform-origin: 0 100%;
    transform: rotate(72deg);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.color-segment:nth-child(3) {
    bottom: 0;
    right: 0;
    transform-origin: 0 0;
    transform: rotate(144deg);
    clip-path: polygon(0 100%, 100% 100%, 0 0);
}

.color-segment:nth-child(4) {
    bottom: 0;
    left: 0;
    transform-origin: 100% 0;
    transform: rotate(216deg);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.color-segment:nth-child(5) {
    top: 0;
    left: 0;
    transform-origin: 100% 100%;
    transform: rotate(288deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.color-segment:hover {
    filter: brightness(1.1);
    z-index: 2;
}

.color-name {
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.color-option:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.spec-item:last-child {
    border-bottom: none;
}

/* Blog Styles */
.blog-card, .blog-post-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid #e5e7eb;
}

.blog-card:hover, .blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-title-link:hover {
    color: var(--primary-color) !important;
}

.blog-post-content {
    font-size: 1.125rem;
    line-height: 1.75;
}

.blog-post-content h2 {
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.blog-post-content h3 {
    margin: 1.5rem 0 0.75rem;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.blog-post-content ul, .blog-post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

/* Feature Cards */
.feature-card, .value-card, .category-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid #e5e7eb;
}

.feature-card:hover, .value-card:hover, .category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon, .value-icon, .category-icon {
    transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon,
.value-card:hover .value-icon,
.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* Process Timeline */
.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    width: 80px;
    height: 80px;
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

.timeline-content {
    flex: 1;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin: 0 2rem;
    border: 1px solid #e5e7eb;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 2rem;
    margin-right: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 2rem;
    margin-left: 0;
}

/* Contact Form */
.contact-form .form-control, .contact-form .form-select {
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all var(--transition-normal);
}

.contact-form .form-control:focus, .contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.contact-info-sidebar .contact-card,
.contact-info-sidebar .faq-card,
.contact-info-sidebar .social-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #e5e7eb;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.logo-white {
    filter: brightness(0) invert(1);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Utility Classes */
.text-pink {
    color: #ec4899 !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .yarn-display {
        padding: 1rem;
    }
    
    .yarn-ball {
        width: 60px;
        height: 60px;
    }
    
    .color-wheel {
        width: 150px;
        height: 150px;
    }
    
    .process-timeline::before {
        left: 40px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 100px;
    }
    
    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 2rem;
        margin-right: 0;
    }
    
    .timeline-marker {
        position: absolute;
        left: 0;
    }
}

@media (max-width: 576px) {
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .color-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .navbar, footer, .btn, .social-links {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
    }
    
    .text-primary {
        color: #000 !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Product Image Styles */
.yarn-photo-container {
    transform: translateZ(0);
    will-change: transform;
}

.yarn-photo-container:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.18) !important;
}

.yarn-main-photo {
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.3s ease;
}

.yarn-main-photo[style*="opacity: 1"] {
    opacity: 1;
}

.yarn-overlay {
    backdrop-filter: blur(2px);
}

.color-preview-popup {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yarn-image {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

/* Product Image Enhancements */
.product-image-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yarn-showcase {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

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