* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #e3e3e3;
    color: black;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

header h1 {
    font-size: 2rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: auto;
}

.logo p {
    margin: 0;
    font-size: 1.5rem;
}

.logo p.title {
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
    color: red;
    text-align: center;
}

.logo p.subject {
    margin: 0;
    font-size: 1rem;
    color: #0030fc;
    font-weight: bold;
    text-align: center;
}

@media (max-width: 768px) {

    .logo svg,
    .logo img {
        height: auto;
    }
}

nav {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: #e3e3e3;
    padding: 1rem 0;
    transition: top 0.3s ease-in-out;
    z-index: 999;
    text-align: center;
}

nav.active {
    top: 60px;
}

nav a {
    color: black;
    margin: 0.5rem 1.5rem;
    text-decoration: none;
    font-size: 1rem;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        top: -100%;
    }

    nav.active {
        top: 60px;
    }
}

@media (min-width: 769px) {
    header {
        padding: 0.5rem 3rem;
    }

    nav {
        position: static;
        display: flex;
        padding: 0;
        transition: none;
        width: auto;
    }

    nav a {
        display: inline-block;
        margin: 0 1.5rem;
    }
}

/* Hero Section với Slider */
.hero {
    height: 50vh;
    max-height: 500px;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

@media (max-width: 768px) {
    .hero {
        height: 40vh;
        max-height: 300px;
    }
}

.slider {
    display: flex;
    width: 400%;
    height: 100%;
    animation: slide 15s infinite ease-in-out;
}

.slide {
    width: 25%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    flex-shrink: 0;
}

.slider:hover {
    animation-play-state: paused;
}

.slide-content {
    background: rgba(132, 128, 128, 0.772);
    padding: 2rem;
    border-radius: 5px;
}

.slide-content h1 {
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}

.hero h1 {
    font-size: 2.5rem;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-25%);
    }

    35% {
        transform: translateX(-25%);
    }

    40% {
        transform: translateX(-50%);
    }

    55% {
        transform: translateX(-50%);
    }

    60% {
        transform: translateX(-75%);
    }

    75% {
        transform: translateX(-75%);
    }

    80% {
        transform: translateX(-50%);
    }

    85% {
        transform: translateX(-50%);
    }

    90% {
        transform: translateX(-25%);
    }

    95% {
        transform: translateX(-25%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Products Section */
.products {
    padding: 2rem;
    background: #f8f9fa;
    text-align: center;
}

.products h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: bold;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: white;
    padding: 1rem;
    padding-bottom: 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
}

.product-card p {
    font-size: 0.9rem;
    color: black;
    margin-top: 1rem;
    font-weight: bold;
}

/* Contact Section */
.contact-section {
    padding: 3rem 2rem;
    background: #e6f0fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 1500px;
    margin: 0 auto;
}

.contact-form {
    flex: 1 1 40%;
    min-width: 400px;
    text-align: center;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-map {
    flex: 1 1 40%;
    min-width: 400px;
}

.contact-map iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

input,
textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    padding: 0.8rem;
    background: #5a728f;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Footer */
footer {
    background: #343a40;
    color: white;
    padding: 1rem;
    text-align: center;
}

.footer-info p {
    margin-bottom: 0.5rem;
}

.footer-info a {
    color: rgb(38 118 235);
    text-decoration: none;
}

/* Contact Menu */
.contact-menu {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    align-items: center;
}

.contact-menu a,
.contact-menu button {
    width: 40px;
    height: 40px;
    background: rgb(241, 240, 240) !important;
    border-radius: 50%;
    border: 1px solid black !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    background: #d3d0d926;
}

.contact-menu button {
    opacity: 0;
    transition: opacity 0.3s;
}

.contact-menu a:hover,
.contact-menu button:hover {
    background: #b5bac5;
}

/* Alert Container */
#alert-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    width: 250px;
}

.alert {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav {
        display: none;
        width: 100%;
    }

    nav.active {
        display: block;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .contact-container {
        flex-direction: column;
        align-items: center;
        max-width: none;
        width: auto;
    }

    .contact-form {
        flex: 1;
        min-width: 300px;
    }

    .contact-map {
        flex: 1;
        min-width: 300px;
    }

    #alert-container {
        width: 80%;
        right: 10%;
    }

    .products h2 {
        margin-bottom: 0.5rem;
        font-size: 1.2rem
    }

    .slide-content {
        padding: 2rem;
    }

    .slide-content h1 {
        font-size: clamp(1.2rem, 4vw, 2rem);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}