/* Base styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    margin-top: 10%;
}

/* Container and service boxes */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding-bottom: 3%;
    max-width: 70%;
    margin: auto;
}

.service-box {
    position: relative;
    width: 300px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.service-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-box:hover img {
    transform: scale(1.05);
}

.service-box .label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    font-size: 18px;
    transition: font-size 0.3s ease, font-weight 0.3s ease;
}

.service-box:hover .label {
    font-size: 22px;
    font-weight: bold;
}

/* Introductory section */
.intro-section {
    text-align: center;
    margin: 40px auto;
    padding: 20px 60px;
    max-width: 70%;
    color: #333;
}

.intro-section h1 {
    font-size: 32px;
    color: #3d4a73; /* Similar color to the title in the image */
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.intro-section h1:before, .intro-section h1:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #599b45; /* Similar color to the lines in the image */
    top: 100%;
    margin-top: 5px;
}

.intro-section h1:before {
    left: 0;
}

.intro-section h1:after {
    right: 0;
}

.intro-section p {
    font-size: 18px;
    line-height: 1.6;
    margin-top: 20px;
}

/* Popup and overlay styles */
body.overlay-active {
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease-in-out;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Popup content box */
.popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 40%;  /* Increased max-width for better visibility */
    width: 90%;
    text-align: center;
    position: fixed; /* Fixed positioning for proper centering */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
}

/* Close button */
.popup-content .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

/* Popup text */
.popup-content p {
    font-size: 1.6rem; /* Larger font size for better readability */
    margin-top: 10px;
    line-height: 1.6;
}

/* Media queries for responsive design */

/* For extra small devices (phones, 360px and below) */
@media (max-width: 320px) {
    .intro-section {
        margin-top: 25%;
    }
    .popup-content {
        font-size: 0.1rem;
        max-width: 60%;  /* Increased max-width for better visibility */
        width: 100%;
    }
}

/* For extra small devices (phones, 360px and below) */
@media (max-width: 380px) {
    .intro-section {
        margin-top: 25%;
    }
    .popup-content {
        font-size: 0.5rem;
    }
}


/* For extra small devices (phones, 360px and below) */
@media (max-width: 500px) {
    .intro-section {
        margin-top: 25%;
    }
    .popup-content {
        font-size: 1.5rem;
    }
}

/* For phones smaller than iPhone 4 (320px and below) */
@media (max-width: 320px) {
    .intro-section {
        margin-top: 30%; /* Adjust the margin if necessary */
    }
    .popup-content {
        max-width: 90%; /* Further reduce the max-width */
        font-size: 0.5rem; /* Adjust font size for readability */
    }

    .popup-content p {
        font-size: 1rem;
    }
}









/* For landscape orientation on small devices (phones, 480px and below) */
@media (max-width: 700px) and (orientation: landscape) {
    .popup-content {
        max-width: 80%;  /* Reduce max width for landscape */
        font-size: 1.4rem;  /* Slightly smaller text for landscape */
    }

    .popup-content p {
        font-size: 1.2rem;  /* Adjust text size for readability */
    }
}

/* For landscape orientation on small devices (phones, 480px and below) */
@media (max-width: 500px) and (orientation: landscape) {
    .popup-content {
        max-width: 80%;  /* Reduce max width for landscape */
        font-size: 1.4rem;  /* Slightly smaller text for landscape */
    }

    .popup-content p {
        font-size: 1.2rem;  /* Adjust text size for readability */
    }
}

/* For extra small devices (phones, 360px and below) */
@media (max-width: 380px) and (orientation: landscape) {
    .popup-content {
        max-width: 85%;  /* Further reduce for extra small screens */
        font-size: 1.2rem;
    }

    .popup-content p {
        font-size: 1rem;
    }
}

/* For landscape view on phones smaller than iPhone 4 */
@media (max-width: 320px) and (orientation: landscape) {
    .popup-content {
        max-width: 85%; /* Reduce width further for landscape */
        font-size: 1rem; /* Smaller text size for landscape */
    }

    .popup-content p {
        font-size: 0.9rem;
    }
}