/* Global Variables */
:root {
    --orange: #EF7D12;
    --steelblue: rgb(36, 83, 145);
    --dark: #333;
    --light: #fff;
    --grey: #ddd;
    --shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* new html rule */
html { height: 100%; }

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
    background-color: var(--grey);

    /* new */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* CSS Grid Layout Structure */
.page-wrapper {
    display: grid;
    grid-template-areas:
        "nav"
        "header"
        "content"
        "footer";
    grid-template-columns: 1fr;
    /* New grid-template-rows */
    grid-template-rows: auto auto 1fr auto;
    /* New flex property */
    flex: 1;
    background-color: rgb(132, 213, 240);
}

/* Responsive Navbar using Flexbox */
.main-nav {
    grid-area: nav;
    background-color: var(--orange);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.main-nav li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 20px 40px;
    display: block;
    transition: 0.3s;
}

.main-nav li a:hover {
    color: var(--light);
    background-color: var(--steelblue);
}

/* Header with Responsive Background Image */
header {
    grid-area: header;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
                url('images/wrench-metal-pipe.jpg') no-repeat center center;
    background-size: cover;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--light);
    text-align: center;
}

header h1 {
    font-size: 3rem;
}

header h2 {
    font-size: 1.5rem;
}

/* Main Content Section */
.container {
    grid-area: content;
    background-color: rgb(163, 156, 156);
    width: 75%;
    margin: 0 auto;
    padding: 2rem;
    box-shadow: var(--shadow);
    /* New display and flex-direction properties */
    display: flex;
    flex-direction: column;
}

.container h3 {
    text-align: left;
    background: transparent;
    margin: 1rem 0;
}

.container ul {
    margin-left: 25px;
    margin-bottom: 1.5rem;
}

.container p {
    margin-bottom: 1rem;
}

.boxes {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* New align property */
    align-items: stretch;
    /* New height property */
    height: 100%;

}

.box {
	background: var(--light);
	text-align: center;
	padding: 1.5rem 2rem;
	box-shadow: var(--shadow);
    /* New display, flex-direction and height properties */
    display: flex;
	flex-direction: column;
	height: 100%;
 
}

iframe {
	width: 100%;
	height: 100%;
	flex: 1;
}

/* Founders Section - Horizontal Layout (Desktop) */
.founders {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    margin-top: 2rem;
}

.founder {
    flex: 1;
    text-align: center;
}

.founder img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Footer Styling */
footer {
    grid-area: footer;
    background: var(--dark);
    color: var(--light);
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

#emergency {
    color: red;
    font-weight: bold;
}

.services-list li {
    margin-left:30px;
}

/* Mobile Responsive View */
@media (max-width: 700px) {
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav li a {
        padding: 15px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .container {
        width: 95%;
    }

    header h1 {
        font-size: 2rem;
    }

    /* Founders Section - Vertical Stack (Mobile) */
    .founders {
        flex-direction: column;
        align-items: center;
    }

    .founder {
        width: 100%;
        margin-bottom: 2rem;
    }
}
