
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4F0EE;
}

/* Header Styling */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f4F0EE;
    border-bottom: 2px solid #000000;
    flex-wrap: wrap;
    padding: 10px;
    
}

.main-div {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

header a {
    text-decoration: none;
    color: black;
}

.logo {
    height: 50px;
    width: 50px;
    margin: 0 10px 0 20px;
}

.company_name {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 5px;
}

nav {
    display: flex;
    align-items: center;
    flex: 1;
    text-align: right;
    justify-content: right;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    flex-wrap: wrap; /* Allow wrapping of menu items on smaller screens */
}

nav ul li {
    margin: 0;
}

nav ul li a, nav ul li button {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 16px;
    padding: 8px;
}

nav ul li a:hover {
    color: red;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: right;
    padding: 10px 20px;
    background-color: #f4F0EE;
}

.menu-btn {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    background-color: #f8f8f8;
}

.nav-items {
    display: flex;
    gap: 20px;
}

/* Location Section */
.location {
    padding: 20px;
    text-align: center;
    background-color: #f4F0EE; /* Matches the website theme */
    border-top: 2px solid #DA242C;
    border-bottom: 2px solid #DA242C;
}

.location-text {
    font-size: 32px;
    color: #DA242C;
    margin-bottom: 20px;
    font-weight: bold;
}

.map-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px; /* Limits the map's maximum width */
    margin: 0 auto; /* Centers the map container */
    border: 2px solid #DA242C; /* Adds a theme-colored border */
    border-radius: 10px; /* Rounded corners */
    overflow: hidden; /* Ensures the iframe fits within the rounded corners */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow for emphasis */
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none; /* Removes internal iframe border */
}

.location-address {
    font-size: 18px;
    color: #333;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    background-color: #f9f9f9;
    padding: 10px 20px;
    border-radius: 5px;
    width: fit-content; /* Shrinks to fit the text */
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for the text box */
    border: 1px solid #DA242C; /* Matches the border style of the map */
}



@media (max-width: 768px) {
    nav ul {
        display: none; /* Hide the menu by default */
        flex-direction: column;
        position: absolute;
        top: 60px; /* adjust as needed */
        left: 0;
        background-color: #f8f8f8;
        width: 100%;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    .menu-btn {
        display: block;
    }

    .nav-items.active {
        display: flex;
    }

    nav ul.active {
        display: flex; /* Show the menu when active */
    }

    .logo {
        height: 30px;
        width: 30px;
        margin: 0 10px 0 20px;
    }
    
    .company_name {
        font-size: 15px;
        font-weight: bold;
        text-align: center;
        padding: 5px;
    }

    .div-2 {
        display: flex;
    }
}

.sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100%;
    background-color: #f4F0EE;
    color: black;
    padding-top: 20px;
    z-index: 1000;
    border: #646464 solid;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    padding: 10px 20px;
    text-align: left;
    color: black;
}

.sidebar ul li a {
    color: black;
    text-decoration: none;
}

.sidebar ul li a:hover {
    color: red;
}

@media (max-width: 768px) {
    .nav-items {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px; /* adjust as needed */
        left: 0;
        background-color: #f4F0EE;
        width: 100%;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    .menu-btn {
        display: block;
    }
}

.nav-items.active {
    display: flex;
}

.sidebar.active {
    display: block;
}

.hero {
    background-image: url('cover.jpg');
    height: 600px;
    margin: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative; /* Necessary for absolute positioning of the text box */
}

.hero-text {
    background-color: #DA242C;
    font-family: Arial, sans-serif;
    width: 27rem;
    padding: 20px;
    border: 3px solid #646464;
    position: absolute;
    right: 150px;
    top: 200px;
    border-radius: 20px;
}

.hero h1 {
    font-size: 28px;
    color: white;
}

.hero p {
    font-size: 16px;
}

.about-text {
    font-size: 19px;
    text-align: justify;
    padding: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    transition: max-height 0.3s ease;
}

.product-grid,
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.product-container img {
    width: 100%;
    height: auto;
    padding: 10px;
}

.products a {
    text-decoration: none;
}

.services a {
text-decoration: none;
}

.overview,
.products,
.services,
.contact-info {
    padding: 20px;
    text-align: center;
}

.contact-info a {
    color: red;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.about, .product-text, .service-text, .contact-text {
    font-size: 32px;
    color: #DA242C;
    
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #f8f8f8;
    border-top: 2px solid #e0e0e0;
}

.hover-div {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    border: 1px solid #000000;
    border-radius: 10px;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
}

.hover-div:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.hover-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: rgba(220, 173, 173, 0.8);
    color: black;
    text-align: center;
    padding: 20px;
}

.hover-div:hover .hover-content {
    opacity: 1;
}

.hover-text {
    margin: 10px;
    font-size: 16px;
}

.hover-button {
    margin: 5px;
    padding: 10px 20px;
    border: none;
    background-color: #DA242C;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 5px;
}

.grid-bottom {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 18px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .logo {
        height: 50px;
        width: 50px;
    }

    .hero {
        height: 300px;
    }

    .hero-text {
        width: 90%;
        padding: 15px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .product-grid,
    .service-grid {
        padding: 20px;
        grid-template-columns: 1fr;
        align-items: center;
    }

    .about-text {
        padding: 10px;
        font-size: 18px;
        white-space: normal; /* Allow wrapping */
        max-height: none;    /* Remove height limit */
        overflow: visible;   /* Ensure the content shows fully */
    }

    .read-more {
        display: none; /* Hide read more button on larger screens */
    }

    .hover-div {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 40px;
        width: 40px;
    }

    .hero-text {
        width: 100%;
        padding: 10px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .hero p {
        font-size: 12px;
    }

    .about, .product-text, .service-text, .contact-text {
        font-size: 28px;
    }

    .hover-div {
        height: 300px;
        width: 310px;
    }

    .about-text {
        padding: 10px;
        font-size: 18px;
        white-space: normal; /* Allow line wrapping */
        max-height: 4em; /* Show approximately 2 lines of text */
        overflow: hidden;
    }


    .about-text.expanded {
        max-height: none; /* Show full content */
    }

    .read-more {
        display: inline-block;
        background-color: #DA242C; /* Matches the red in your theme */
        color: white; /* White text */
        border: 1px solid #646464; /* Add border to match theme */
        cursor: pointer;
        padding: 8px 16px; /* Add padding to make it look like a button */
        text-decoration: none;
        border-radius: 5px; /* Rounded corners */
        font-size: 1em;
        margin-top: 10px;
        transition: background-color 0.3s ease;
    }
    
    .read-more:hover {
        background-color: #B22222; /* Darken the button on hover */
    }
}

@media screen and (max-width: 768px) {
    .hero-text {
        width: auto;
        right: 20px;
        left: 20px;
        top: auto;
        bottom: 20px;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .hero-text {
        right: 10px;
        left: 10px;
        bottom: 10px;
        font-size: 16px; 
    }
}

/* Show full about text on larger screens */
@media (min-width: 769px) {
    .about-text {
        white-space: normal; /* Allow wrapping */
        max-height: none;    /* Remove height limit */
        overflow: visible;   /* Ensure the content shows fully */
    }

    .read-more {
        display: none; /* Hide read more button on larger screens */
    }
}
