* {
    box-sizing: border-box;
}

main {
    margin: 0;
    position: relative;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.category {
    border: 2px solid #333;
    padding: 20px;
    text-align: center;
}

.category h3 {
    margin-top: 0;
    font-size: 24px;
}

.category p {
    margin-bottom: 0;
    font-size: 16px;
}

.category a {
    text-decoration: none;
    color: #333;
    display: block;
}

.category a:hover {
    background-color: #f9f9f9;
}

.automat-container h1{
    font-size: 40px;
}

.automat-container {
    margin: 30px auto;
    text-align: center;
}

.gallery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.automat-title {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.automat-description {
    font-size: 16px;
    line-height: 1.6;
    max-width: 1200px;
    margin-bottom: 20px;
    padding: 0 20px; 
    box-sizing: border-box;
    text-align: left;
}

.automat-image {
    max-width: 100%;
}

.automat-link,
.enquire-link {
    display: block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    font-size: 18px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin: 0 auto;
    max-width: 200px;
    transition: background-color 0.3s ease;
}

.automat-link:hover,
.enquire-link:hover {
    background-color: #0056b3;
}

.container {
    max-width: 100%; /* Adjusted to allow full-width on all screens */
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.hero-image {
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5)), url("images/BBC.jpeg");
    height: 1000px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.hero-text {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 20px 20px;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

.gallery-grid img:hover {
    opacity: 0.8; /* Change opacity on hover */
}

@media screen and (max-width: 600px) {
    .automat-banner {
        max-height: 300px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .automat-description {
        max-width: 90%; 
        padding: 0 10px;
    }

    .automat-container h1{
        font-size: 25px;
    }
}

@media screen and (min-width: 601px) and (max-width: 984px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .automat-description {
        max-width: 900px;
        margin: 30px auto;
        padding: 0 20px; 
        box-sizing: border-box;
    }
}
