* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #142336;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 80px;
    width: 80px;
    filter: hue-rotate(15deg) saturate(0.8);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #4f46e5;
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.page-hero {
    text-align: center;
    padding: 3rem 0;
    color: white;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

.section {
    background: white;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #4f46e5;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.back-link {
    display: inline-block;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #3730a3;
}

.machines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.machine-card {
    background: linear-gradient(135deg, #f0f9ff, #e0e7ff);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.2);
    border-color: #4f46e5;
}

.machine-title {
    color: #4f46e5;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.machine-id {
    background: #4f46e5;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1rem;
}

.machine-description {
    margin: 1rem 0;
    color: #4b5563;
    line-height: 1.6;
}

.price-tag {
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: bold;
    text-align: center;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-image {
    width: 100%;
    height: 160px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.05);
    border-color: #4f46e5;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    background: #000;
}

.video-thumbnail:hover {
    transform: scale(1.05);
    border-color: #ef4444;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.video-thumbnail::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 20px solid rgba(255, 255, 255, 0.9);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    z-index: 2;
    pointer-events: none;
}

.video-thumbnail::after {
    content: "Video";
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.8rem;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    z-index: 2;
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.details-section {
    margin-top: 1.5rem;
}

.details-toggle {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.3s ease;
}

.details-toggle:hover {
    background: #3730a3;
}

.details-toggle.active {
    background: #059669;
}

.details-content {
    display: none;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.details-content.active {
    display: block;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th,
.details-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.details-table th {
    width: 35%; /* Adjust as needed */
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.details-table td {
    width: 65%; /* Adjust as needed */
}

.details-table tr:hover {
    background: #f9fafb;
}

.features-list {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.features-list h4 {
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.features-list ul {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Modal styles for image popup */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 85%;
    max-height: 80%;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-container {
    width: 100%;
    height: 65vh;
    overflow: auto;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    position: relative;
    cursor: grab;
}

.image-container:active {
    cursor: grabbing;
}

.modal-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.modal-image.zoomed {
    cursor: zoom-out;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #666;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #4f46e5;
    background-color: #f1f5f9;
}

.modal-title {
    color: #4f46e5;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

.zoom-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

.zoom-btn {
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.zoom-btn:hover {
    background: #3730a3;
}

.zoom-info {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* Navigation arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(79, 70, 229, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.nav-arrow:hover {
    background: rgba(79, 70, 229, 1);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow:disabled {
    background: rgba(107, 114, 128, 0.5);
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.nav-arrow.prev {
    left: 15px;
}

.nav-arrow.next {
    right: 15px;
}

/* Video Modal styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease;
    overflow: hidden;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.video-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #666;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

.video-close:hover {
    color: #ef4444;
    background-color: #f1f5f9;
}

.video-title {
    color: #4f46e5;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

footer {
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .machines-grid {
        grid-template-columns: 1fr;
    }

    .section {
        margin: 1rem 0;
        padding: 1.5rem;
    }

    .machine-card {
        padding: 1rem;
    }

    .details-toggle {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}