/* General Body & Typography */
:root {
    --primary-color: #FF6F00; /* Deep Orange - Main Theme Color (HMP Orange) */
    --secondary-color: #FF9800; /* Lighter Orange - Accents */
    --accent-color: #004a99; /* Dark Blue - For contrasting text links/secondary buttons */
    --dark-text: #333;
    --light-text: #fff;
    --light-bg: #fff8f0; /* Very light orange/cream background */
    --mid-bg: #ffe0b2; /* Soft light orange for sections */
    --dark-bg: #212121; /* Dark Grey for header/footer (strong contrast) */
    --border-color: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--dark-text);
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

h2 {
    font-size: 2.5em;
    padding-bottom: 15px;
    position: relative;
    margin-bottom: 40px;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--accent-color); /* Blue for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color); /* Orange on hover */
    text-decoration: underline;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
}

.btn:hover {
    background-color: #E65100; /* Slightly darker orange */
    text-decoration: none;
    color: var(--light-text);
}

.btn-small {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}

.btn-small:hover {
    background-color: var(--primary-color);
    text-decoration: none;
    color: var(--light-text);
}

.text-center {
    text-align: center;
}

/* Header */
header {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--light-text);
    font-size: 1.8em;
    font-weight: bold;
    text-decoration: none;
}

.main-nav .nav-links {
    list-style: none;
    display: flex;
}

.main-nav .nav-links li {
    margin-left: 30px;
}

.main-nav .nav-links a {
    color: var(--light-text);
    font-weight: bold;
    transition: color 0.3s ease;
}

.main-nav .nav-links a:hover,
.main-nav .nav-links a.active {
    color: var(--primary-color); /* Orange for active/hover */
    text-decoration: none;
}

.hamburger {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger .bar {
    height: 3px;
    width: 100%;
    background-color: var(--light-text);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Hero Sections */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image1.jpeg') no-repeat center center/cover;
    color: var(--light-text);
    text-align: center;
    padding: 100px 0;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.page-hero-section { /* For sub-pages like services.php */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image1.jpeg') no-repeat center center/cover;
    color: var(--light-text);
    text-align: center;
    padding: 80px 0;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero-section h1, .page-hero-section p {
    color: var(--light-text);
}

/* Specific hero images for each service page */
.service-hero-boundary {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image1.jpeg') no-repeat center center/cover;
}
.service-hero-topographical {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image2.jpeg') no-repeat center center/cover;
}
.service-hero-construction {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image3.jpeg') no-repeat center center/cover;
}
.service-hero-engineering {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image4.jpeg') no-repeat center center/cover;
}
.service-hero-cadastral {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/cadastral.jpg') no-repeat center center/cover;
}
.service-hero-industrial {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image12.jpeg') no-repeat center center/cover;
}
.service-hero-gis {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image7.jpeg') no-repeat center center/cover;
}
.service-hero-land-development {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image1.jpeg') no-repeat center center/cover;
}
.service-hero-consulting {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/image1.jpeg') no-repeat center center/cover;
}


.hero-section h1, .page-hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--light-text);
}

.hero-section p, .page-hero-section p {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Sections (Homepage preview & Services page list) */
.services-section, .services-list-section, .service-detail-section {
    padding: 80px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: var(--light-text);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border-top: 5px solid var(--primary-color); /* Orange top border */
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3em;
    color: var(--primary-color); /* Orange icon */
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--dark-text);
}

.service-item h3 a {
    color: var(--dark-text); /* Ensure heading links are dark */
    text-decoration: none;
}

.service-item h3 a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.service-item p {
    font-size: 0.95em;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

/* Service Detail Page */
.service-detail-section {
    background-color: var(--mid-bg); /* Slightly different background for detail page */
}

.service-detail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start; /* Align top */
    justify-content: center;
    text-align: left; /* Align text within columns */
    margin-top: 40px;
}

.service-detail-text {
    flex: 2;
    min-width: 300px;
}

.service-detail-text h2 {
    text-align: left;
    font-size: 2em;
    margin-bottom: 20px;
}

.service-detail-text h2::after {
    left: 0;
    transform: none;
}

.service-detail-text h3 {
    text-align: left;
    font-size: 1.6em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-detail-text ul, .service-detail-text ol {
    list-style: none;
    margin-bottom: 20px;
    padding-left: 20px;
}

.service-detail-text ul li::before {
    content: "\2022"; /* Bullet point */
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.service-detail-text ol li {
    margin-bottom: 8px;
    counter-increment: list-counter;
}

.service-detail-text ol li::before {
    content: counter(list-counter) ". ";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}


.service-detail-image {
    flex: 1;
    min-width: 280px;
    text-align: center;
}

.service-detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-caption {
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}

.related-services {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.related-services h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
}

.related-services ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 30px;
}

.related-services ul li {
    margin: 0;
}

.related-services ul li a {
    font-size: 1.1em;
    color: var(--dark-text);
    font-weight: bold;
    transition: color 0.3s ease;
}

.related-services ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.related-services ul li a i {
    margin-right: 8px;
    color: var(--primary-color);
}


/* About Us Section */
.about-section {
    padding: 80px 0;
    background-color: #fff2e6; /* Soft orange background */
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text p {
    text-align: justify;
    margin-bottom: 15px;
    font-size: 1.05em;
}

.about-image {
    flex: 1;
    min-width: 280px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.contact-section .contact-intro {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1em;
    color: #555;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
    margin-top: 40px;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--light-text);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact-info h3, .contact-form h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 1.8em;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.05em;
    display: flex;
    align-items: center;
}

.contact-info p i {
    margin-right: 10px;
    color: var(--primary-color); /* Orange icons */
    font-size: 1.2em;
}

.contact-info a {
    color: var(--dark-text);
    text-decoration: none;
}

.contact-info a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-icons {
    margin-top: 30px;
    text-align: center;
}

.social-icons a {
    display: inline-block;
    font-size: 1.8em;
    margin: 0 10px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    color: var(--dark-text);
    background-color: #fcfcfc;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.25);
}

.contact-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: #bbb;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
}

footer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    h2 {
        font-size: 2em;
    }

    .hero-section, .page-hero-section {
        padding: 80px 20px;
        height: auto;
        min-height: 300px;
    }

    .hero-section p, .page-hero-section p {
        font-size: 1.1em;
    }

    .main-nav .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--dark-bg);
        position: absolute;
        top: 80px; /* Adjust based on header height */
        left: 0;
        padding: 20px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav .nav-links.active {
        display: flex;
    }

    .main-nav .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .about-content, .contact-content, .service-detail-content {
        flex-direction: column;
    }

    .about-image, .service-detail-image {
        order: -1; /* Puts image above text on mobile */
        margin-bottom: 30px;
    }

    .contact-info, .contact-form {
        padding: 30px 20px;
    }

    .service-detail-text h2, .service-detail-text h3 {
        text-align: center;
    }
    .service-detail-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .service-detail-text ul, .service-detail-text ol {
        padding-left: 0; /* Remove left padding on small screens if desired */
        text-align: left; /* Keep bullet points aligned left */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }

    .hero-section, .page-hero-section {
        padding: 60px 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .service-item {
        padding: 25px 15px;
    }

    .service-item h3 {
        font-size: 1.3em;
    }

    .contact-info p {
        font-size: 0.95em;
    }
}