@charset "utf-8";

/* Base layout */
html {
    box-sizing: border-box;
    background-color: #e4f0f3; /* soft blue-gray */
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    background-color: #fdfdfd;
    color: #222;
    font-family: Verdana, Geneva, sans-serif;
}

/* Header */
header {
    text-align: center;
    padding: 20px;
}

header img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

header h1 {
    margin-top: 15px;
    font-size: 2em;
    color: #24596b;
    text-shadow: 2px 3px 4px rgba(0,0,0,0.2);
}

.tagline {
    margin: 5px 0 0 0;
    color: #4f6f7a;
}

/* Headings */
h2 {
    font-size: 1.5em;
    color: #24596b;
    text-shadow: 1px 2px 3px rgba(0,0,0,0.15);
}

h3 {
    color: #3b6f7f;
}

/* Navigation */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li {
    display: block;
    width: 33.33%;
    float: left;
}

nav a {
    display: block;
    background-color: #3b7f8f;
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color: white;
    transition: background-color 0.5s ease-in 0.2s,
                color 0.5s ease-in 0.2s,
                font-size 1s ease;
}

nav a:hover {
    background-color: #f0b45a;
    color: #ffffff;
    font-size: 1.05em;
}

/* Hamburger icon (mobile) */
#navicon {
    display: none;
}

/* Main */
main {
    padding: 20px;
    margin-top: 70px;
}

/* Intro layout (home) */
.intro-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.intro-text {
    flex: 2;
}

.intro-photo {
    flex: 1;
}

.intro-photo img {
    width: 100%;
    border-radius: 10px;
}

/* Two-column section (services) */
.two-column {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.two-column > div {
    flex: 1;
    min-width: 260px;
}

/* Contact layout */
.contact-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info {
    flex: 1;
    min-width: 260px;
}

.contact-form {
    flex: 2;
    min-width: 260px;
}

/* Gallery */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery img {
    width: 100%;
    border-radius: 6px;
}

/* Video wrapper */
.video-wrapper {
    max-width: 560px;
    margin: 0 auto;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #ffffff;
}

th, td {
    border: 1px solid #999;
    padding: 10px;
    text-align: left;
}

thead {
    background: #d7e8f0;
}

tfoot {
    background: #f3f3f3;
    font-weight: bold;
    text-align: center;
}

/* Forms */
form {
    width: 100%;
}

fieldset {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 15px;
}

legend {
    font-weight: bold;
    color: #24596b;
}

label {
    display: block;
    margin-top: 10px;
}

input, select, textarea {
    width: 100%;
    padding: 6px;
    margin-top: 4px;
    font-family: inherit;
    font-size: 1em;
}

textarea {
    min-height: 80px;
}

/* Radio labels inline */
label.radio {
    display: inline-block;
    width: auto;
    margin-right: 10px;
}

input[type="radio"] {
    width: auto;
    margin-right: 5px;
}

/* Form focus/valid/invalid */
input:focus, select:focus, textarea:focus {
    background-color: #ffffcc;
}

input:valid, select:valid, textarea:valid {
    border: 2px solid green;
}

input:invalid, select:invalid, textarea:invalid {
    border: 2px solid red;
}

/* Buttons */
input[type="submit"],
input[type="reset"] {
    width: 48%;
    margin-top: 10px;
    cursor: pointer;
    background-color: #3b7f8f;
    color: white;
    border: none;
    border-radius: 4px;
}

input[type="submit"]:hover,
input[type="reset"]:hover {
    background-color: #24596b;
}

/* Footer */
footer {
    background-color: #3b7f8f;
    color: #fdfdfd;
    font-size: 0.9em;
    line-height: 2em;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    clear: both;
}

/* Responsive: small screens */
@media only screen and (max-width: 768px) {

    body {
        width: 100%;
        margin: 0;
    }

    nav li {
        float: none;
        width: 100%;
    }

    nav ul {
        display: none;
    }

    #navicon {
        display: block;
        background-color: #3b7f8f;
        color: white;
        padding: 10px;
        font-size: 2em;
        cursor: pointer;
        text-align: center;
    }

    #navicon:hover + ul,
    nav ul:hover {
        display: block;
    }

    .intro-layout,
    .two-column,
    .contact-layout {
        flex-direction: column;
    }

    .gallery img {
        flex: 1 1 100%;
    }

    input[type="submit"],
    input[type="reset"] {
        width: 100%;
    }

    /* Responsive table */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    th {
        background: #d7e8f0;
        font-size: 1.1em;
    }

    td {
        border: none;
        border-bottom: 1px solid #ccc;
        padding-left: 50%;
        position: relative;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
    }
}

/* Medium screens: gallery columns */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .gallery img {
        flex: 1 1 calc(50% - 10px);
    }
}

/* Desktop gallery: 4 columns */
@media only screen and (min-width: 1025px) {
    .gallery img {
        flex: 1 1 calc(25% - 10px);
    }
}
