/* Universal Box-Sizing for consistent sizing */
html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/* General Body Styles */
body {
    font-family: 'Open Sans', sans-serif; /* Default font for body text */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333; /* Dark grey for text */
    background-color: #f4f4f4; /* Light grey background */
    scroll-behavior: smooth; /* Smooth scrolling for potential anchor links */
    overflow-x: hidden; /* Crucial: Prevent horizontal scrolling due to overflow */
}

/* Container for consistent content width */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px; /* Default padding for larger screens */
    /* box-sizing: border-box; - Inherited from universal rule now */
}

/* Section Padding for spacing */
.section-padding {
    padding: 80px 0; /* Increased padding for more space */
}

/* Headings */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 3.5em; /* Slightly larger */
    color: #FFF; /* White for hero section */
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4); /* Adds subtle shadow to hero text */
}

h2 {
    font-size: 2.8em; /* Slightly larger */
    color: #D4AF37; /* Gold/Yellow for section titles, inspired by logo */
    margin-bottom: 50px; /* More space below heading */
    position: relative;
    padding-bottom: 10px;
    letter-spacing: 0.05em; /* Slightly increased letter spacing */
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px; /* Wider underline */
    height: 5px; /* Thicker underline */
    background-color: #D4AF37; /* Gold/Yellow underline */
    border-radius: 2px;
}

h3 {
    font-size: 1.9em; /* Slightly larger */
    margin-bottom: 20px;
    color: #C00; /* Red for subheadings, inspired by logo */
}

/* Hero Section */
.hero-section {
    /* Replace with a relevant image if you have one. Otherwise, it will use the red fallback. */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://via.placeholder.com/1920x700/555555/FFFFFF?text=ELETTROSISTEMI+Background') no-repeat center center/cover;
    background-color: #C00; /* Fallback red from logo */
    color: #FFF;
    text-align: center;
    padding: 120px 20px; /* More padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 600px; /* Minimum height for a strong hero */
}

.hero-logo {
    max-width: 300px; /* Larger logo */
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 15px rgba(0,0,0,0.6)); /* More pronounced shadow */
}

.hero-section p {
    font-size: 1.3em; /* Larger text */
    font-weight: 400;
    max-width: 900px;
    margin: 0 auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* About Section */
.about-section {
    background-color: #FFF;
}

.about-content {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 50px; /* More space between columns */
    justify-content: center;
    align-items: flex-start;
}

.about-text {
    flex: 2; /* Takes more space */
    min-width: 300px; /* Minimum width before wrapping */
    max-width: 700px;
    text-align: justify;
    font-size: 1.05em; /* Slightly larger text */
}

.company-data {
    flex: 1; /* Takes remaining space */
    min-width: 300px; /* Minimum width before wrapping */
    background-color: #f9f9f9;
    padding: 30px; /* More padding */
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 6px 12px rgba(0,0,0,0.1); /* Stronger shadow */
    text-align: left;
}

.company-data h3 {
    text-align: left;
    margin-top: 0;
    color: #333;
    font-size: 1.6em; /* Slightly larger */
}

.company-data ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.company-data ul li {
    margin-bottom: 12px; /* More space between list items */
    font-size: 1em; /* Standard text size */
}

.company-data ul li strong {
    color: #555;
}

.company-data a {
    color: #C00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.company-data a:hover {
    color: #D4AF37; /* Gold on hover */
    text-decoration: underline;
}

.qr-code {
    max-width: 180px; /* Larger QR code */
    height: auto;
    display: block;
    margin: 25px auto 0;
    border: 2px solid #ddd; /* Slightly thicker border */
    border-radius: 6px;
}

/* Products Section */
.products-section {
    background-color: #f9f9f9;
}

.product-description {
    text-align: center;
    margin-bottom: 50px; /* More space below description */
    font-size: 1.15em; /* Larger text */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.product-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px; /* More space between images */
}

.product-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 6px 15px rgba(0,0,0,0.2); /* Stronger shadow */
    transition: transform 0.4s ease-in-out;
    flex: 1 1 48%; /* Allows two images per row, with a bit more spacing. Adjust if you have varying aspect ratios. */
    min-width: 320px; /* Prevents images from getting too small on smaller screens */
    /* box-sizing: border-box; - Inherited from universal rule now */
}

.product-gallery img:hover {
    transform: translateY(-8px) scale(1.02); /* More pronounced hover effect */
}

/* Games Section */
.games-section {
    background-color: #FFF;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid for more images */
    gap: 30px; /* More space between images */
    justify-content: center;
}

.games-grid img {
    width: 100%;
    height: auto;
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 5px 15px rgba(0,0,0,0.18); /* Stronger shadow */
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease;
    /* box-sizing: border-box; - Inherited from universal rule now */
}

.games-grid img:hover {
    transform: scale(1.03); /* More pronounced hover effect */
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Suppliers Section */
.suppliers-section {
    background-color: #f4f4f4; /* Light grey background */
    padding: 80px 0;
    /* Optional: Add a subtle background pattern or image related to partnerships */
    /* background: url('images/suppliers_background.png') no-repeat center center/cover; */
}

.supplier-intro {
    text-align: center;
    font-size: 1.15em; /* Larger text */
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.supplier-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px; /* More space between items */
    margin-top: 40px;
}

.supplier-item {
    background-color: #FFF;
    padding: 35px; /* More padding */
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 6px 15px rgba(0,0,0,0.15); /* Stronger shadow */
    text-align: center;
    flex: 1 1 320px; /* Allows flexibility while maintaining a good minimum width */
    max-width: 380px; /* Prevents items from becoming too wide */
    /* box-sizing: border-box; - Inherited from universal rule now */
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.supplier-item:hover {
    transform: translateY(-8px) scale(1.01); /* More pronounced hover effect */
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.supplier-item i {
    font-size: 3.5em; /* Larger icons */
    color: #D4AF37; /* Gold/Yellow icon color */
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.supplier-item h3 {
    font-size: 1.8em;
    margin-top: 0;
    color: #C00;
}

.supplier-item p {
    font-size: 1em;
    color: #555;
    margin-bottom: 10px;
}

.supplier-item.software-house p {
    text-align: center; /* Center for consistency in the flex item */
}

.supplier-item.software-house a {
    color: #C00;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.supplier-item.software-house a:hover {
    color: #D4AF37;
    text-decoration: underline;
}

/* Contact Section */
.contact-section {
    background-color: #FFF;
    padding: 80px 0;
}

/* Specific styling for the introductory text in the contact section */
.contact-intro-text { /* Added this class in previous step's HTML, so targeting it here */
    text-align: center;
    margin-bottom: 20px; /* Space below the text */
    font-size: 1.15em; /* Consistent with other intro paragraphs */
    max-width: 800px; /* Keep text readable */
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    text-align: center; /* This centers the contact details */
    font-size: 1.15em;
    margin-top: 40px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.contact-info a {
    color: #C00;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #D4AF37;
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #333; /* Dark background */
    color: #AAA; /* Lighter text */
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9em;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8em;
    }
    h2 {
        font-size: 2.2em;
    }
    .hero-section {
        min-height: 450px;
        padding: 80px 20px;
    }
    .hero-logo {
        max-width: 200px;
    }
    .hero-section p {
        font-size: 1.2em;
    }
    .about-content {
        flex-direction: column;
        align-items: center;
        gap: 30px; /* Reduce gap on smaller screens */
    }
    .about-text, .company-data {
        max-width: 90%; /* Allow content to take more width relative to container */
        min-width: unset; /* Remove minimum width to allow full flexibility */
        width: 100%; /* Ensure they take full available width within parent */
    }
    .product-gallery img {
        flex: 1 1 100%; /* Stack images on smaller screens */
        min-width: unset; /* Allow full flexibility */
        max-width: 350px; /* Set a reasonable max-width for stacked images */
    }
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust grid for smaller screens */
    }
    .supplier-item {
        flex: 1 1 90%; /* Stack supplier items on smaller screens, allow some padding */
        max-width: 500px; /* Limit width even when stacked */
        min-width: unset; /* Remove min-width for full flexibility */
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2em;
    }
    h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .section-padding {
        padding: 50px 0;
    }
    .hero-section {
        min-height: 400px;
        padding: 60px 20px;
    }
    .hero-logo {
        max-width: 180px;
    }
    .hero-section p {
        font-size: 1.1em;
    }
    .about-text, .product-description, .supplier-intro, .contact-intro-text {
        font-size: 1em; /* Further reduce font size for readability */
        padding: 0 10px; /* Add inner padding to these specific texts to prevent edge sticking */
    }
    .company-data {
        padding: 25px;
    }
    .container {
        padding: 0 15px; /* Reduce container padding further on smaller screens */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.6em;
    }
    h3 {
        font-size: 1.4em;
    }
    .hero-section {
        padding: 40px 15px;
        min-height: 350px;
    }
    .hero-logo {
        max-width: 150px;
    }
    .container {
        padding: 0 10px; /* Even smaller padding for very narrow screens */
    }
    .section-padding {
        padding: 40px 0;
    }
    .supplier-item {
        padding: 25px;
    }
    .contact-info p, .contact-info a {
        font-size: 1em;
    }
}