/* KDJ Automation - Industrial Automation Solutions */
/* Clean and simple design, easy to modify */

:root {
    --primary: #0056b3;
    --secondary: #00a8ff;
    --dark: #1a2b4c;
    --light: #f8f9fa;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --success: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
header {
    background-color: rgba(26, 43, 76, 0.95);
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
}

.logo i {
    font-size: 28px;
    margin-right: 10px;
    color: var(--secondary);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
}

.logo-text span {
    color: var(--secondary);
}


.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.7)), url('imgs/hero.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 180px 0 120px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #ddd;
}

.btn {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 14px 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #0097e6;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Services Section */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--dark);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    padding: 30px;
    border-top: 4px solid var(--primary);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark);
}

/* About Section */
.about {
    background-color: #f8f9fa;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 36px;
    color: var(--dark);
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-color: var(--light);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    font-size: 100px;
    color: var(--secondary);
    opacity: 0.7;
}

/* Projects Section - ОНОВЛЕНО */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.project-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    background-color: white;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.project-image {
    height: 200px;
    background: linear-gradient(45deg, #1a2b4c, #0056b3);
    position: relative;
    overflow: hidden;
}

/* Стиль для зображення в проекті */
.project-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Затемнення для фото */
.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.5));
}

.project-location {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 2;
}

.project-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #28a745;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.gallery-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 86, 179, 0.9);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 2;
}

.project-card:hover .gallery-indicator {
    opacity: 1;
    transform: translateY(0);
}

.gallery-indicator i {
    margin-right: 8px;
}

.project-info {
    padding: 20px;
    background-color: white;
}

.project-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark);
}

.project-details {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-feature {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--gray);
}

.project-feature i {
    margin-right: 8px;
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.project-year {
    display: inline-block;
    background-color: var(--light-gray);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
    color: var(--gray);
}

.add-project-instruction {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
    margin-top: 40px;
}

.add-project-instruction h3 {
    color: var(--dark);
    margin-bottom: 10px;
}

.add-project-instruction p {
    color: var(--gray);
    margin-bottom: 10px;
    font-size: 15px;
}

/* Gallery Modal Styles */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow: hidden;
}

.gallery-modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    width: 90%;
    max-width: 1000px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--dark);
    color: white;
}

.gallery-header h2 {
    color: white;
    font-size: 24px;
}

.close-gallery {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.close-gallery:hover {
    color: var(--secondary);
}

.gallery-container {
    position: relative;
    flex: 1;
    min-height: 500px;
    background-color: #000;
}

.gallery-images {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.gallery-image {
    min-width: 100%;
    height: 500px;
    object-fit: contain;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10;
}

.gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.gallery-nav {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.gallery-nav:hover {
    background-color: rgba(0, 86, 179, 0.9);
    transform: scale(1.1);
}

.gallery-description {
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.gallery-description p {
    color: var(--gray);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    background-color: var(--dark);
    color: white;
}

.contact .section-title h2 {
    color: white;
}

.contact .section-title p {
    color: #ccc;
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--secondary);
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: var(--secondary);
}

.contact-form {
    flex: 1;
    background-color: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 8px;
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ddd;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.2);
    background-color: rgba(255,255,255,0.05);
    border-radius: 4px;
    color: white;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icons a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: #0f1a30;
    color: #ccc;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    margin-right: 30px;
    margin-bottom: 30px;
}

.footer-column:last-child {
    margin-right: 0;
}

.footer-column h3 {
    color: white;
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-links i {
    margin-right: 10px;
    color: var(--secondary);
    width: 16px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #999;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content, .contact-content {
        flex-direction: column;
    }
    
    .gallery-modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--dark);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section {
        padding: 70px 0;
    }
    
    .footer-column {
        margin-right: 0;
        flex: 0 0 100%;
    }
    
    .gallery-image {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 150px 0 80px;
    }
    
    .gallery-image {
        height: 300px;
    }
    
    .gallery-navigation {
        padding: 0 10px;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Зміни розмір для всіх лого в шапці */
header .logo img {
    height: 50px;
    width: auto;
}

/* Зміни розмір для лого у футері */
footer img[alt="KDJ Automation Logo"] {
    height: 40px;
    width: auto;
}

/* Стилі для власного лого */
.custom-logo {
    max-height: 50px; 
    width: auto; 
    object-fit: contain;
    margin-right: 20px;
}

/* Для лого у футері */
footer .custom-logo {
    max-height: 40px; 
    margin-bottom: 15px;
}

/* Якщо потрібно конкретний розмір */
.logo img.custom-logo {
    height: 50px; /* Конкретна висота */
    width: auto;
}

.about-image {
    position: relative;
}

.carousel-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s;
}

.carousel-img.active {
    opacity: 1;
}

/* Partners Section - Horizontal Line */
.partners-container {
    overflow: hidden;
    padding: 30px 0;
}

.partners-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: nowrap;
    min-width: 100%;
}

.partner-logo {
    flex: 1;
    text-align: center;
    min-width: 150px;
}

.partner-logo img {
    max-height: 120px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Для вузьких екранів - горизонтальна прокрутка */
@media (max-width: 992px) {
    .partners-line {
        gap: 30px;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: flex-start;
    }
    
    .partners-line::-webkit-scrollbar {
        height: 4px;
    }
    
    .partners-line::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .partners-line::-webkit-scrollbar-thumb {
        background: var(--secondary);
    }
    
    .partner-logo {
        min-width: 120px;
        flex: none;
    }
}

@media (max-width: 576px) {
    .partners-line {
        gap: 20px;
    }
    
    .partner-logo {
        min-width: 100px;
    }
    
    .partner-logo img {
        max-height: 70px;
    }
}