/* Gallery Page Specific Styles */

/* Gallery Header */
.gallery-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    text-align: center;
}

.gallery-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.gallery-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--white);
    font-size: 2rem;
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gallery-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Navigation Tabs */
.gallery-nav {
    background-color: var(--gray-100);
    padding: 2rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.gallery-tab {
    flex: 1;
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer !important;
    transition: var(--transition);
    text-align: center;
    pointer-events: auto !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative !important;
    z-index: 1001 !important;
    touch-action: manipulation;
}

.gallery-tab:hover {
    color: var(--gray-800);
    background-color: var(--gray-50);
}

.gallery-tab.active {
    background-color: var(--gray-200);
    color: var(--gray-800);
    font-weight: 600;
}

/* Gallery Content */
.gallery-content {
    padding: 4rem 0;
    background-color: var(--white);
    min-height: 60vh;
}

.gallery-tab-content {
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    animation: none;
}

.gallery-tab-content.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    animation: fadeInUp 0.5s ease-out;
}

/* Team and Activities Tab */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gallery-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.05);
}

.gallery-card-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    font-size: 1rem;
    opacity: 0.8;
}

.gallery-card-title {
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    text-align: center;
}

/* Products Tab */
.products-showcase {
    margin-top: 2rem;
}

.products-main-section {
    background-color: #f5f3f0;
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    margin-bottom: 2rem;
}

.products-header {
    text-align: center;
    margin-bottom: 3rem;
}

.products-icon {
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
}

.products-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.products-description {
    font-size: 1.125rem;
    color: var(--gray-700);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.products-sectors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.sector-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.sector-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.sector-icon {
    width: 50px;
    height: 50px;
    background-color: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--gray-600);
    font-size: 1.25rem;
}

.sector-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.sector-card p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0;
}

/* Factory and Machines Tab */
.factory-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 2rem;
}

.factory-text-blocks {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.text-block {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.text-block-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.text-block-description {
    font-size: 1rem;
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.legacy-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--gray-50);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.factory-image {
    position: relative;
}

.factory-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    filter: grayscale(20%);
    transition: var(--transition);
}

.factory-image:hover img {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .factory-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .gallery-title {
        font-size: 2.5rem;
    }
    
    .products-sectors {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .gallery-header {
        padding: 6rem 0 3rem;
    }
    
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gallery-tab {
        padding: 0.75rem 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .products-main-section {
        padding: 2rem;
    }
    
    .products-title {
        font-size: 1.5rem;
    }
    
    .text-block-title {
        font-size: 1.5rem;
    }
    
    .legacy-stats {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        padding: 5rem 0 2rem;
    }
    
    .gallery-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .gallery-title {
        font-size: 1.75rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .products-main-section {
        padding: 1.5rem;
    }
    
    .text-block {
        padding: 1.5rem;
    }
}

/* Animation for tab switching - moved to main .gallery-tab-content rule */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for gallery cards */
.gallery-card {
    cursor: pointer;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
    background-color: var(--primary-color);
    color: var(--white);
}

/* Videos Section */
.videos-section {
    margin-top: 2rem;
}

.videos-header {
    text-align: center;
    margin-bottom: 3rem;
}

.videos-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.videos-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.video-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.video-play-button:hover {
    background-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.video-info p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.video-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Design for Videos */
@media (max-width: 768px) {
    .videos-title {
        font-size: 2rem;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .video-play-button {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .videos-title {
        font-size: 1.75rem;
    }
    
    .videos-description {
        font-size: 1rem;
    }
    
    .video-thumbnail {
        height: 160px;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .video-info h3 {
        font-size: 1.125rem;
    }
    
    .video-info p {
        font-size: 0.875rem;
    }
}

/* Loading state */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--gray-500);
}

.gallery-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
