/* Custom CSS for עץ השיטה Website */

/* Global Styles */
:root {
    --primary-color: #8b6914;
    --secondary-color: #d4a574;
    --accent-color: #654321;
    --light-wood: #f5e6d3;
    --dark-wood: #3e2723;
    --text-dark: #2e1a17;
    --text-light: #666;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 76px; /* Account for fixed navbar */
    background-color: #fafaf8;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #3e2723 0%, #5d4037 100%) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: #f5e6d3 !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    color: #f5e6d3 !important;
}

.navbar-nav .nav-link:hover {
    color: #d4a574 !important;
}

.navbar-nav .nav-link.active {
    color: #ffd54f !important;
}

/* RTL Support */
[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

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

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    z-index: 1;
}

/* Animations - Updated for smoother transitions */
.animate-fade-in {
    animation: fadeIn 0.6s ease;
    opacity: 1;
}

.animate-fade-in-delay {
    animation: fadeIn 0.6s ease 0.3s both;
    opacity: 0.5;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.6s ease 0.6s both;
    opacity: 0.5;
}

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

/* Page Headers */
.page-header {
    margin-top: 0;
    padding-top: 100px;
    padding-bottom: 50px;
    background: linear-gradient(135deg, #8b6914 0%, #d4a574 50%, #654321 100%) !important;
    position: relative;
}

.page-header::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" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23000000" opacity="0.03"/><path d="M0 50L50 0L100 50L50 100Z" fill="%23ffffff" opacity="0.02"/></svg>');
    background-size: 100px 100px;
}

.page-header-wood {
    margin-top: 0;
    padding-top: 100px;
    padding-bottom: 50px;
    background: linear-gradient(135deg, #8b6914 0%, #d4a574 50%, #654321 100%) !important;
    position: relative;
}

.page-header-wood::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" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23000000" opacity="0.03"/><path d="M0 50L50 0L100 50L50 100Z" fill="%23ffffff" opacity="0.02"/></svg>');
    background-size: 100px 100px;
}

/* Ensure text is visible on wood background */
.page-header h1,
.page-header p,
.page-header-wood h1,
.page-header-wood p {
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e8d7c3;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 105, 20, 0.15) !important;
}

/* Add wood texture to feature cards */
.card-body {
    background: linear-gradient(180deg, rgba(245, 230, 211, 0.03) 0%, rgba(212, 165, 116, 0.03) 100%);
}

/* Gallery Styles */
.gallery-card {
    cursor: pointer;
    overflow: hidden;
}

.gallery-card .image-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    height: 250px;
}

.gallery-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 1; /* Ensure images are fully visible by default */
}

.gallery-card:hover .image-container img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    color: white;
    font-size: 2rem;
}

.filter-btn {
    min-width: 100px;
    margin-bottom: 10px;
}

.filter-btn.active {
    background-color: #8b6914;
    color: white;
    border-color: #8b6914;
}

.sub-filter-btn {
    transition: all 0.3s ease;
}

.sub-filter-btn.active {
    background-color: #6c757d;
    color: white;
}

.sub-filter-btn.hidden {
    display: none !important;
}

.gallery-item {
    transition: opacity 0.3s ease;
    opacity: 1; /* Start fully visible */
}

.gallery-item.hide {
    opacity: 0;
    display: none;
}

/* Collection-specific button colors */
.laminate-collection {
    border-color: #8b6914;
}

.laminate-collection.active {
    background-color: #8b6914;
    border-color: #8b6914;
}

.polymer-collection {
    border-color: #5a67d8;
}

.polymer-collection.active {
    background-color: #5a67d8;
    border-color: #5a67d8;
}

.panels-collection {
    border-color: #2d3748;
}

.panels-collection.active {
    background-color: #2d3748;
    border-color: #2d3748;
}

.accessories-collection {
    border-color: #38a169;
}

.accessories-collection.active {
    background-color: #38a169;
    border-color: #38a169;
}

.quickstep-collection {
    border-color: #3182ce;
}

.quickstep-collection.active {
    background-color: #3182ce;
    border-color: #3182ce;
}

.republic-collection {
    border-color: #805ad5;
}

.republic-collection.active {
    background-color: #805ad5;
    border-color: #805ad5;
}

/* Modal Styles */
#imageModal .modal-content {
    background: rgba(0, 0, 0, 0.9);
}

#imageModal img {
    max-height: 80vh;
    width: auto;
    margin: 0 auto;
}

/* About Page */
.team-card img {
    height: 300px;
    object-fit: cover;
}

.value-icon {
    transition: transform 0.3s ease;
}

.value-icon:hover {
    transform: scale(1.1);
}

.achievement-box {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.achievement-box:hover {
    background: #e9ecef;
}

/* Contact Page */
.contact-info-item {
    display: flex;
    align-items: start;
}

.contact-info-item i {
    font-size: 1.5rem;
    margin-top: 5px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2e1a17 0%, #3e2723 100%) !important;
}

footer h5 {
    color: #d4a574 !important;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #d4a574 !important;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: #d4a574 !important;
}

/* Buttons */
.btn {
    padding: 10px 30px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #8b6914 0%, #d4a574 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a57c1e 0%, #c4955f 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 105, 20, 0.3);
}

.btn-outline-primary {
    color: #8b6914;
    border-color: #8b6914;
}

.btn-outline-primary:hover {
    background-color: #8b6914;
    border-color: #8b6914;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #f5e6d3;
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #d4a574;
    padding: 10px 15px;
    background-color: rgba(245, 230, 211, 0.1);
}

.form-control:focus,
.form-select:focus {
    border-color: #8b6914;
    box-shadow: 0 0 0 0.2rem rgba(139, 105, 20, 0.25);
    background-color: white;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    .display-2 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .gallery-card .image-container {
        height: 200px;
    }
    
    .page-header {
        padding-top: 100px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 60vh;
        min-height: 400px;
    }
    
    .display-2 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 8px 20px;
        font-size: 1rem;
    }
}

/* Loading Animation */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Cookie Modal */
#cookieModal .modal-content {
    border-radius: 15px;
}

/* Accordion with wood theme */
.accordion-button:not(.collapsed) {
    background-color: rgba(212, 165, 116, 0.1);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--secondary-color);
}

.accordion-item {
    border-color: var(--secondary-color);
}

/* Override Bootstrap's bg-primary if present */
.bg-primary {
    background: linear-gradient(135deg, #8b6914 0%, #d4a574 50%, #654321 100%) !important;
}
section:nth-child(even) {
    background: linear-gradient(180deg, rgba(245, 230, 211, 0.05) 0%, rgba(212, 165, 116, 0.05) 100%);
    position: relative;
}

section:nth-child(even)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='wood' patternUnits='userSpaceOnUse' width='100' height='100'%3E%3Cpath d='M0,20 Q50,15 100,20' stroke='%23d4a574' stroke-width='0.5' fill='none' opacity='0.1'/%3E%3Cpath d='M0,40 Q50,35 100,40' stroke='%23d4a574' stroke-width='0.5' fill='none' opacity='0.1'/%3E%3Cpath d='M0,60 Q50,55 100,60' stroke='%23d4a574' stroke-width='0.5' fill='none' opacity='0.1'/%3E%3Cpath d='M0,80 Q50,75 100,80' stroke='%23d4a574' stroke-width='0.5' fill='none' opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23wood)'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.3;
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .social-links {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
}