/* ============================================================
   Triangle of Days — Main Stylesheet
   ============================================================ */

/* ---- Reset / Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background-color: #f4f4f4;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- Side Menu -------------------------------------------- */
.side-menu {
    position: fixed;
    top: 25%;
    left: 0;
    width: 180px;
    background-color: #2c3e50;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    z-index: 100;
}
.menu-button {
    display: block;
    width: 90%;
    margin: 10px 0;
    padding: 10px 15px;
    text-align: center;
    font-size: 15px;
    color: #ecf0f1;
    text-decoration: none;
    background-color: #34495e;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.menu-button:hover {
    background-color: #1abc9c;
    color: #fff;
    transform: scale(1.08);
}

/* ---- Main Container --------------------------------------- */
.container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    padding-top: 80px;
    padding-bottom: 60px;
    margin: auto;
}
.text {
    position: absolute;
    top: 16px;
    left: 10px;
    font-size: 1.1rem;
    color: #333;
    font-weight: bold;
}
.quote {
    position: absolute;
    top: 16px;
    right: 10px;
    font-size: 0.9rem;
    color: #555;
    font-style: italic;
    text-align: right;
    max-width: 30%;
    line-height: 1.4;
}

/* ---- Triangle -------------------------------------------- */
.triangle {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}
.row {
    display: flex;
    justify-content: center;
}

/* ---- Bricks ---------------------------------------------- */
.brick {
    width: 20px;
    height: 20px;
    margin: 1px;
    background-color: #9e9e9e;
    border-radius: 3px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

/* Past days = yellow, clickable */
.brick.yellow-brick {
    background-color: #ffd600;
    cursor: pointer;
}
.brick.yellow-brick:hover {
    transform: scale(1.4) rotate(8deg);
    box-shadow: 0 0 14px 4px rgba(255, 214, 0, 0.75);
    z-index: 2;
}

/* Active (selected) brick */
.brick.active-brick {
    transform: scale(1.5);
    box-shadow: 0 0 18px 6px rgba(255, 180, 0, 0.9);
    background-color: #ffab00;
    z-index: 3;
}

/* ---- Popup Card ------------------------------------------ */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 500;
    justify-content: center;
    align-items: center;
}
.popup-overlay.visible {
    display: flex;
}

.popup-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px 36px 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
    animation: popIn 0.22s ease;
}
@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.popup-close:hover {
    color: #333;
    background: #f0f0f0;
}

.popup-day-label {
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    color: #ffab00;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.popup-date {
    font-size: 1.05rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 14px;
}
.popup-quote {
    margin: 0 0 14px 0;
    padding: 12px 16px;
    background: #fffde7;
    border-left: 4px solid #ffd600;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}
.popup-summary {
    color: #444;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 18px 0;
}
.popup-link {
    display: inline-block;
    padding: 9px 20px;
    background: #2c3e50;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.popup-link:hover {
    background: #1abc9c;
}

/* ---- Footer ---------------------------------------------- */
footer {
    margin-top: auto;
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: #666;
    background-color: #f4f4f4;
    padding: 12px 0;
    border-top: 1px solid #ccc;
}
footer a {
    color: #007BFF;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* ============================================================
   Day Detail Page
   ============================================================ */
body.day-page {
    display: block;
    background: #f9f9f9;
}

.day-detail-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.back-link {
    display: inline-block;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 28px;
    border: 1px solid #ccc;
    padding: 6px 14px;
    border-radius: 5px;
    background: #fff;
    transition: background 0.2s, color 0.2s;
}
.back-link:hover {
    background: #2c3e50;
    color: #fff;
}

.day-header {
    margin-bottom: 28px;
}
.day-number-badge {
    display: inline-block;
    background: #ffd600;
    color: #333;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.day-title {
    font-size: 1.8rem;
    color: #222;
    margin: 0 0 6px 0;
}
.day-date {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

.day-image-wrap {
    margin-bottom: 24px;
}
.day-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.day-summary {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.65;
    border-left: 4px solid #ffd600;
    padding: 10px 16px;
    background: #fffde7;
    border-radius: 0 8px 8px 0;
    margin-bottom: 28px;
}

.day-body {
    font-size: 0.97rem;
    color: #333;
    line-height: 1.7;
    margin-bottom: 32px;
}
.day-body p { margin: 0 0 16px 0; }
.day-body h2 { font-size: 1.2rem; color: #2c3e50; margin-top: 28px; }
.day-body a  { color: #007BFF; }

/* Placeholder block when no real content yet */
.day-placeholder {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 10px;
    border: 2px dashed #ccc;
    color: #888;
    margin-bottom: 32px;
}
.day-placeholder.hidden { display: none; }
.placeholder-icon { font-size: 3rem; margin-bottom: 10px; }
.day-placeholder h2 { color: #aaa; font-size: 1.2rem; margin: 0 0 8px; }
.day-placeholder p  { font-size: 0.9rem; }

/* Prev / Next nav */
.day-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
.day-nav-btn {
    display: inline-block;
    padding: 9px 20px;
    background: #2c3e50;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.88rem;
    transition: background 0.2s;
}
.day-nav-btn:hover {
    background: #1abc9c;
}
.day-nav-btn.disabled {
    background: #ccc;
    cursor: default;
    pointer-events: none;
}
