/* =========================
   BASE PAGE STYLE
========================= */

body {
    font-family: Georgia, serif;
    background: #f4f1ec;
    margin: 0;
    color: #2b2b2b;
    text-align: center;
    animation: fadeIn 0.8s ease-in;
}

/* fade */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   HEADER
========================= */

header {
    background: #ffffff;
    padding: 25px;
    border-bottom: 2px solid #7a0c0c;
}

h1 {
    color: #5c0a0a;
    margin: 0;
}

/* =========================
   CONTENT
========================= */

.content {
    max-width: 700px;
    margin: 30px auto;
    padding: 10px 20px;
    text-align: left;
    line-height: 1.8;
    font-size: 16px;
}

/* =========================
   MAIN IMAGE
========================= */

.main-img {
    width: 260px;
    max-width: 85%;
    height: auto;
    display: block;
    margin: 25px auto;
    border-radius: 10px;
    border: 2px solid #7a0c0c;
}

/* =========================
   NAVIGATION (CLEAN SYSTEM)
========================= */

.primary-nav,
.secondary-nav,
.top-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.top-nav a,
.primary-nav a,
.secondary-nav a {
    background: #5c0a0a;
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.top-nav a:hover,
.primary-nav a:hover,
.secondary-nav a:hover {
    background: #7a0c0c;
}

/* =========================
   FORM ELEMENTS
========================= */

input,
textarea {
    width: 90%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
}

button {
    padding: 10px 16px;
    background: #5c0a0a;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background: #7a0c0c;
}

/* =========================
 CORNER IMAGES (RESTORED + FIXED)
========================= */

.corner {
position: absolute;
top: 30px;
width: 55px;
height: auto;
opacity: 0.7;
z-index: 10;
pointer-events: none;
}

.left {
left: 10px;
}

.right {
right: 10px;
}

/* =========================
   PHOTO GALLERY (FEED STYLE)
========================= */

.gallery {
    max-width: 900px;
    margin: auto;
    padding: 20px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* CARD */
.img-box {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e6ddd6;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);

    /* 🔥 FIX: allow content growth */
    height: auto;
}

/* IMAGE */
.img-box img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    display: block;
    background: #f4f1ec;
}

/* =========================
   🔥 FIXED CAPTION (IMPORTANT)
   THIS FIXES YOUR OVERFLOW ISSUE
========================= */

.img-box p {
    margin: 8px 12px;
    font-size: 12px;
    line-height: 1.4;

    /* prevents text spilling outside box */
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

/* OPTIONAL: if you later use structured captions */
.caption {
    padding: 12px 14px;
    text-align: left;
}

.caption h3 {
    margin: 0;
    font-size: 16px;
    color: #5c0a0a;
}

.caption .date {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.caption p {
    margin: 8px 0 0 0;
    font-size: 14px;
    line-height: 1.5;
}

/* =========================
   MEMORY WALL (TEXT ONLY)
========================= */

.message-card {
    background: #ffffff;
    border: 1px solid #e6ddd6;
    border-radius: 10px;
    padding: 15px;
    margin: 15px auto;
    max-width: 600px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);

    height: auto;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.message-card .meta {
    font-size: 14px;
    color: #5c0a0a;
    margin-bottom: 8px;
    word-break: break-word;
}

.message-card .text {
    font-size: 15px;
    line-height: 1.6;

    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

/* =========================
   BUTTONS
========================= */

.buttons {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.buttons a {
    display: inline-block;
    width: 200px;
    padding: 10px;
    background: #5c0a0a;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.buttons a:hover {
    background: #7a0c0c;
}

/* =========================
 MOBILE (FINAL CLEAN)
========================= */

@media (max-width: 600px) {

body {
  font-size: 16px;
}

/* header */
header {
  padding-top: 20px;
}

/* orchids (corner images) */
.corner {
  width: 35px;
  top: -5px; /* adjust slightly if needed */
}

/* content */
.content {
  padding: 15px;
  margin: 20px auto;
}

/* main image */
.main-img {
  width: 90%;
  max-width: 300px;
}

/* nav layout */
.top-nav,
.primary-nav,
.secondary-nav {
  flex-direction: column;
  align-items: center;
}

/* buttons */
.top-nav a,
.primary-nav a,
.secondary-nav a {
  width: 90%;
  max-width: 300px;
  text-align: center;
  font-size: 16px;
  padding: 12px;
}

/* gallery */
.gallery {
  grid-template-columns: 1fr;
}

/* gallery images */
.img-box img {
  height: auto;
}

}