/* Basic styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    padding-top: 80px;
}

/* Container for content alignment */
.container {
    width: 80%;
    margin: 0 auto;
}

/* Header styling */
header {
    background-color: #ffffff;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

/* Logo styling */
.logo {
    position: relative;
    z-index: 1001;
}

.logo a {
    display: block;
    text-decoration: none;
}

.logo img {
    height: 50px;
    position: relative;
    animation: slide-in 1s ease-out, fade-in 1s ease-out;
    transition: transform 0.3s ease;
}

.logo a:hover img {
    transform: scale(1.05);
}

/* Logo animation keyframes */
@keyframes slide-in {
    from {
        transform: translateX(-100px);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Navigation styling */
nav {
    display: flex;
    justify-content: flex-end;
    position: relative;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    position: relative;
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #000000;
    padding: 10px;
    display: inline-block;
    transition: transform 0.3s ease;
}

nav ul li a:hover {
    transform: scale(1.1);
}

/* Products Dropdown Menu Styles */
nav ul li .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    min-width: 250px;
    padding: 5px 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #29304e;
    border-radius: 4px;
    z-index: 1000;
    overflow: hidden;
}

nav ul li:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
    width: 100%;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #000000;
    transition: all 0.3s ease;
    width: calc(100% - 10px);
    box-sizing: border-box;
    margin: 2px 5px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.dropdown-menu li a:hover {
    background-color: rgba(41, 48, 78, 0.1);
    border-color: #29304e;
    z-index: 1;
}

.dropdown-menu li a img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    object-fit: cover;
}

/* Hero section */
.hero {
    background-color: #29304e;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-top: 20px;
}

/* Machines section */
.machines {
    padding: 4rem 0;
}

.machine-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.machine {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
}

.machine:hover {
    transform: translateY(-5px);
}

.machine img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.machine:hover img {
    transform: scale(1.05);
}

/* Description bubble */
.machine .description-bubble {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(41, 48, 78, 0.9);
    color: white;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    overflow: hidden;
}

.machine:hover .description-bubble {
    opacity: 1;
}

.description-bubble h3 {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    padding: 0;
    width: 100%;
}

.description-bubble p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    width: 100%;
    max-height: calc(100% - 40px);
    overflow-y: auto;
}

/* Footer */
footer {
    background-color: #29304e;
    color: white;
    text-align: center;
    padding: 1rem 0;
    position: relative;
}

/* Menu toggle for mobile */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    position: absolute;
    top: 24px;
    right: 32px;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.8);
    z-index: 1100;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    nav ul.active {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        margin-top: 10px;
    }

    .machine-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .description-bubble h3 {
        font-size: 1.1rem;
    }

    .description-bubble p {
        font-size: 0.85rem;
    }
}
