/* ============================================================
   Egypt 2025 Travel Album — also used by Jordan.html
   Style: Clean & Minimal, Mobile-First
   ============================================================ */
 
/* --- CSS Variables --- */
:root {
    --color-bg:         #f5f4f0;
    --color-surface:    #ffffff;
    --color-text:       #2c2c2a;
    --color-text-muted: #6b6b67;
    --color-accent:     #b87333;   /* warm copper/gold — Egyptian feel */
    --color-border:     #e0ddd6;
 
    --font-body:        'Open Sans', Helvetica, Arial, sans-serif;
    --font-heading:     'Playfair Display', Georgia, serif;
 
    --radius-sm:        6px;
    --radius-md:        12px;
    --radius-lg:        20px;
 
    --max-width:        860px;
    --spacing:          1.5rem;
}
 
/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
 
html {
    scroll-behavior: smooth;
}
 
body {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    padding: 1rem;
    overflow-x: hidden;
}
 
/* --- Keyboard Focus --- */
/* Visible ring for keyboard users; hidden for mouse/touch */
:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}
 
:focus:not(:focus-visible) {
    outline: none;
}
 
/* --- Screen-Reader-Only Utility ---
   Used on <label> elements paired with placeholder-only inputs
   so the form is accessible without changing its visual design. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
 
/* --- Layout Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}
 
/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}
 
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 0.5rem; text-align: center; }
h2 { font-size: clamp(1.4rem, 4vw, 2rem);   margin-bottom: 0.75rem; text-align: center; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; text-align: center; }
 
p {
    margin-bottom: 1rem;
    max-width: 65ch;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
 
a {
    color: var(--color-accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
 
/* --- Images --- */
img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-md);
}
 
/* --- Figures & Captions --- */
figure {
    margin: 1.5rem auto;
    max-width: var(--max-width);
}
 
/* Prevents layout shift (CLS) while images load.
   For the best possible CLS score, also add width="" and height=""
   attributes to each <img> matching its actual pixel dimensions. */
figure img,
figure video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}
 
figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 600;
    text-align: center;
    max-width: none;
    line-height: 1.5;
}
 
/* Timestamps are secondary info — visually quiet but still readable.
   Uses --color-text-muted (#6b6b67) which meets WCAG AA contrast on white. */
.timestamp {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
    opacity: 0.75;
}
 
/* --- Day Sections --- */
.day-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--color-border);
}
 
.day-heading {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    color: var(--color-accent);
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}
 
/* --- Videos --- */
.travel-video {
    display: block;
    width: 100%;
    max-width: var(--max-width);
    border-radius: var(--radius-md);
    border: 3px solid var(--color-border);
    background: #000;
}
 
/* --- Tomb Link Cards --- */
.tomb-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
 
.tomb-card {
    display: block;
    text-decoration: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--color-border);
    transition: border-color 0.2s ease, transform 0.2s ease;
    background: var(--color-surface);
}
 
.tomb-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    text-decoration: none;
}
 
.tomb-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}
 
.tomb-card-label {
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text);
    font-weight: 600;
    text-align: center;
}
 
/* --- Page Header --- */
.page-header {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}
 
.page-header .subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}
 
/* --- Generic Section Card --- */
.section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}
 
/* --- Photo Gallery Grid --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 1.5rem 0;
}
 
.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
 
.gallery img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
 
/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: zoom-out;
}
 
.lightbox.active {
    display: flex;
}
 
.lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    cursor: default;
}
 
.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    /* Ensure it's reachable by keyboard */
    padding: 0.25rem 0.5rem;
}
 
.lightbox-caption {
    position: fixed;
    bottom: 1.25rem;
    left: 0;
    right: 0;
    text-align: center;
    color: #e0ddd6;
    font-size: 0.9rem;
    padding: 0 1rem;
}
 
/* --- Featured / Hero Image --- */
.featured-image {
    width: 100%;
    max-width: var(--max-width);
    height: auto;
    border-radius: var(--radius-lg);
    margin: 0 auto 1.5rem;
    display: block;
}
 
/* --- Alignment Utilities --- */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
 
.alignleft {
    float: left;
    margin: 0.5rem 1.25rem 0.75rem 0;
    max-width: 45%;
}
 
.alignright {
    float: right;
    margin: 0.5rem 0 0.75rem 1.25rem;
    max-width: 45%;
}
 
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
 
/* --- Bottom Navigation ---
   Used at the foot of each page for links to adjacent pages
   (e.g. "Back to index" / "Continue to part 2"). */
.bottom-nav {
    margin: 2rem 0 0;
    padding: 1.25rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    text-align: center;
    font-size: 1.05rem;
}
 
.bottom-nav p {
    margin: 0.4rem auto;
    max-width: none;
    text-align: center;
}
 
/* --- Trip Index List ---
   Vertical list of links used on trip index/hub pages.
   Place inside a .day-section card. Each <li> is separated
   by a border line with generous padding for easy tapping. */
.trip-index {
    list-style: none;
    padding: 0;
    margin: 0;
}
 
.trip-index li {
    border-bottom: 1px solid var(--color-border);
}
 
.trip-index li:last-child {
    border-bottom: none;
}
 
.trip-index a {
    display: block;
    padding: 0.85rem 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    text-align: center;
    transition: background 0.15s ease, padding-left 0.15s ease;
    border-radius: var(--radius-sm);
}
 
.trip-index a:hover {
    background: var(--color-bg);
    padding-left: 1.25rem;
    text-decoration: none;
}
 
/* --- Comments Section --- */
.comments-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--color-border);
}
 
.comments-section h2 {
    margin-bottom: 1.25rem;
    text-align: center;
}
 
.comment {
    border-top: 1px solid var(--color-border);
    padding: 1rem 0;
}
 
.comment:first-of-type {
    border-top: none;
}
 
.comment .comment-author {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-accent);
}
 
.comment .comment-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-left: 0.5rem;
}
 
.comment .comment-text {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    text-align: left;
    max-width: none;
}
 
.comment-form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
 
.comment-form input,
.comment-form textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text);
    width: 100%;
}
 
.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}
 
.comment-form button {
    align-self: flex-start;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: opacity 0.2s;
}
 
.comment-form button:hover {
    opacity: 0.85;
}
 
.comment-success {
    background: #eaf3de;
    color: #3B6D11;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 1rem;
    max-width: none;
}
 
.comment-error {
    background: #fcebeb;
    color: #A32D2D;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 0.75rem;
    max-width: none;
}
 
.no-comments {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.95rem;
    max-width: none;
}
 
/* --- Day Index Navigation ---
   On desktop: wraps to multiple rows, centred.
   On mobile: single scrollable row, no visible scrollbar. */
.day-index {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}
 
.day-index a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}
 
.day-index a span {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--color-text-muted);
    text-align: center;
}
 
.day-index a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}
 
.day-index a:hover span {
    color: rgba(255,255,255,0.85);
}
 
/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 500;
    line-height: 44px;
    text-align: center;
}
 
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}
 
/* --- Email Footer --- */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-family: var(--font-body);
}
 
.site-footer a {
    color: var(--color-accent);
}
 
/* --- Reduced Motion ---
   Respects the OS preference to minimise animation for users
   who are sensitive to motion. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
 
/* --- Print Stylesheet --- */
@media print {
    .back-to-top,
    .day-index,
    .lightbox,
    .comment-form,
    .travel-video { display: none !important; }
 
    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
        padding: 0;
    }
 
    .container { max-width: 100%; }
 
    .page-header {
        border-bottom: 1px solid #ccc;
        margin-bottom: 1rem;
    }
 
    .day-section {
        border: none;
        border-top: 2px solid #ccc;
        border-radius: 0;
        padding: 1rem 0;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
 
    .day-heading {
        color: #000;
        font-size: 14pt;
    }
 
    figure {
        page-break-inside: avoid;
        margin: 0.75rem 0;
    }
 
    figcaption {
        color: #333;
        font-size: 10pt;
    }
 
    .timestamp {
        color: #888;
        opacity: 1;
    }
 
    img {
        max-width: 100%;
        border-radius: 0;
    }
 
    .tomb-links {
        grid-template-columns: repeat(4, 1fr);
    }
 
    .trip-index a {
        color: #000;
        padding: 0.4rem 0;
    }
 
    .bottom-nav,
    .comments-section { display: none; }
 
    a { color: #000; text-decoration: none; }
}
 
/* --- Scrollbar Styling (Chromium / Safari) --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }
 
/* --- Responsive --- */
@media (max-width: 600px) {
    body { padding: 0.5rem; }
 
    .section,
    .day-section { padding: 1.25rem; }
 
    /* On small screens switch the day-index from a wrapping grid to a
       single horizontally-scrollable row so it never takes up multiple
       lines of vertical space. */
    .day-index {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0.75rem 1rem;
    }
    .day-index::-webkit-scrollbar { display: none; }
 
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
 
    .gallery img { height: 150px; }
 
    .alignleft,
    .alignright {
        float: none;
        max-width: 100%;
        margin: 0 0 1rem;
    }
 
    .tomb-links {
        grid-template-columns: repeat(2, 1fr);
    }
 
    .tomb-card img { height: 120px; }
}
