/* Core Reset & Color Variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-sky: #bce3f7;         /* Sky blue from the map background */
    --ocean-blue: #1d70b8;     /* Deep sea blue for text/buttons */
    --sand-warm: #fffbf4;      /* Soft, warm paper color for reading readability */
    --accent-orange: #ff9800;   /* Sunset orange for active highlights */
    --text-dark: #2c3e50;      /* Soft dark gray for high-contrast reading */
}

body {
    background-color: var(--bg-sky);
    background-image: linear-gradient(to bottom, #bce3f7, #e0f2fe);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Header & Back Button Navigation */
.storybook-header {
    background: white;
    padding: 20px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-button {
    text-decoration: none;
    color: var(--ocean-blue);
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.back-button:hover {
    color: var(--accent-orange);
}

.page-title {
    font-family: 'Georgia', serif;
    color: var(--ocean-blue);
    font-size: 1.8rem;
}

/* Layout Framework for Content */
.content-container {
    flex: 1;
    max-width: 1000px;
    width: 90%;
    margin: 40px auto;
    padding: 0 10px;
}

.storybook-card {
    background: var(--sand-warm);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .storybook-card {
        flex-direction: row;
    }
    .card-image-wrapper, .card-text {
        flex: 1;
    }
}

/* Image/Scenery Frame */
.card-image-wrapper {
    background: #e2e8f0;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scenery-fallback {
    font-size: 5rem;
}

/* Text & Typography Styling */
.card-text {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-text h2 {
    color: var(--ocean-blue);
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.card-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Call-to-Action Buttons */
.cta-section {
    margin-top: 10px;
}

.storybook-btn {
    display: inline-block;
    background: var(--ocean-blue);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(29, 112, 184, 0.2);
    transition: background 0.2s ease, transform 0.15s ease;
}

.storybook-btn:hover {
    background: #14538a;
    transform: translateY(-2px);
}

/* ==========================================================================
   ADDED: HIGH-CONTRAST SUBPAGE FOOTER STYLING
   ========================================================================== */
.storybook-footer {
    padding: 30px 10px;
    text-align: center;
    width: 100%;
    margin-top: auto; /* Safely anchors the footer structure to the bottom of the content stack */
}

.storybook-footer p {
    font-size: 1.15rem !important; /* Set slightly larger for high readability over graphics */
    color: #ffffff !important; /* Force explicit clean white text layout */
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.5) !important; /* Deep multi-layer shadow shield */
    font-weight: 500;
}

.storybook-footer p a {
    color: #ffffff !important; /* Keep link text absolute white */
    text-decoration: underline !important;
    font-weight: bold;
}