/* ===========================================
   Alex Firlik Website Master Phase IV Layout
   =========================================== */

/* ---------- Page ---------- */

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #dddddd;
    color: #000;
}

.page {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px;
}

/* ---------- Header ---------- */

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #1f6fd6;
    margin-bottom: 10px;
}

.header .subtitle {
    color: #555;
    font-size: 1em;
    margin-top: -5px;
}

/* ---------- Main Content Box ---------- */

.main-box {
    background-color: #fff;
    border: 2px solid #1f6fd6;
    border-radius: 12px;
    padding: 20px;
}

/* ---------- Intro / Outro ---------- */

.intro-box {
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 0.95em;
}

.intro-box p {
    margin-bottom: 1em;
}

/* ---------- Content Sections ---------- */

.section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

/* Alternate image side automatically */
.section:nth-of-type(even) {
    flex-direction: row-reverse;
}

/* ---------- Text ---------- */

.text {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.6;
}


/* ---------- Last Edited ---------- */

.last-edited {
    margin-top: 25px;
    padding-top: 10px;
    border-top: 0px solid #ccc;

    text-align: right;
    color: #777;
    font-size: 0.75em;
    font-style: italic;
}

/* ---------- Images ---------- */

.image {
    flex: 1;
    text-align: center;
}

.image img {
    max-width: 85%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: auto;
}

.center-image {
    display:block;
    margin:0 auto 20px;
    max-width:75%;
    height:auto;
    border-radius:8px;
}

/* ---------- Photo Gallery ---------- */

.photo-gallery h2 {
    color: #0066cc;
    margin-bottom: 12px;
    text-align: center;
}

.photo-gallery {
    margin: 30px 0 10px;
    text-align: left;
}

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ---------- Photo Cards ---------- */

.photo-item {
    flex: 1 1 calc((100% - 24px) / 3);
    max-width: calc((100% - 24px) / 3);
    box-sizing: border-box;

    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    text-align: center;
    margin: 0;
}

.photo-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.photo-item figcaption {
    padding: 8px;
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
    background: #fafafa;
}

/* ---------- Buttons ---------- */
.nav-button,
.home-button {
    display: block;
    width: 220px;
    margin: 30px auto 10px;
    padding: 8px 16px;

    background-color: #1f6fd6;
    color: white;

    text-align: center;
    text-decoration: none;
    font-weight: bold;

    border-radius: 8px;
    box-shadow: 1px 1px 4px rgba(0,0,0,.2);

    transition: background-color .2s ease;
}

.nav-button-section {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.nav-button-section .nav-button {
    margin: 0;
}

.nav-button:hover,
.home-button:hover {
    background-color: #3a82f6;
}

.link-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
  }

  .link-button {
    padding: 10px 14px;
    background-color: #1f6fd6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    width: 200px;
    font-size: 14px;
  }

  .link-button:hover {
    background-color: #1555a8;
  }

/* ---------- Mobile ---------- */

@media (max-width:700px) {

    .section {
        flex-direction: column !important;
    }

    .image img {
        max-width: 100%;
    }

}