/*
Theme Name:   Royal School Child
Theme URI:    https://royal.edu.eg
Description:  Child theme of Twenty Twenty-Five for Royal International School
Author:       Royal International School
Author URI:   https://royal.edu.eg
Template:     twentytwentyfive
Version:      1.0.0
Text Domain:  royal-school-child
*/

/* ============================================================
   ROYAL SCHOOL — SINGLE POST STYLES
   Matching the design from royal.edu.eg posts
   ============================================================ */

:root {
    --royal-primary:    #1a1a2e;
    --royal-accent:     #b8972e;
    --royal-accent-light: #d4af55;
    --royal-white:      #ffffff;
    --royal-light-bg:   #f9f7f2;
    --royal-text:       #2d2d2d;
    --royal-muted:      #6b6b6b;
    --royal-border:     #e0d9cc;
    --royal-font-head:  'Playfair Display', Georgia, serif;
    --royal-font-body:  'Source Serif 4', Georgia, serif;
    --royal-radius:     6px;
    --royal-shadow:     0 4px 24px rgba(26,26,46,0.10);
}

/* ============================================================
   HIDE ELEMENTOR CANVAS HEADER/FOOTER CONFLICT
   ============================================================ */
.single-post .wp-block-template-part { display: block; }

/* ============================================================
   SINGLE POST WRAPPER
   ============================================================ */
.royal-single-post {
    background: var(--royal-light-bg);
    min-height: 100vh;
    font-family: var(--royal-font-body);
    color: var(--royal-text);
}

/* ============================================================
   ELEMENTOR HEADER / FOOTER WRAPPERS
   ============================================================ */
.royal-elementor-header {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
}
.royal-elementor-footer {
    width: 100%;
}

/* ============================================================
   TWO-COLUMN POST BODY
   LEFT: images  |  RIGHT: title + content
   ============================================================ */
.royal-post-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 9% 5%;
    align-items: start;
}

/* ---------- LEFT COLUMN ---------- */
.royal-post-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Featured image */
.royal-featured-link {
    display: block;
    border-radius: var(--royal-radius);
    overflow: hidden;
    box-shadow: var(--royal-shadow);
    transition: box-shadow 0.25s;
}
.royal-featured-link:hover { box-shadow: 0 8px 32px rgba(26,26,46,0.20); }
.royal-featured-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--royal-radius);
}

/* Attached thumbnails grid below featured */
.royal-sidebar-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}
.royal-sidebar-thumbs a {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--royal-radius);
    background: var(--royal-border);
    box-shadow: 0 2px 8px rgba(26,26,46,0.08);
    transition: transform 0.22s, box-shadow 0.22s;
}
.royal-sidebar-thumbs a:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(26,26,46,0.16);
}
.royal-sidebar-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- RIGHT COLUMN ---------- */
.royal-post-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.royal-post-title {
    font-family: var(--royal-font-head);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--royal-primary);
    line-height: 1.3;
    margin: 0 0 8px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--royal-accent);
}

.royal-post-content-wrap {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--royal-text);
}
.royal-post-content-wrap .entry-content p {
    margin-bottom: 1.3em;
}
.royal-post-content-wrap .entry-content h2,
.royal-post-content-wrap .entry-content h3 {
    font-family: var(--royal-font-head);
    color: var(--royal-primary);
    margin-top: 1.6em;
    margin-bottom: 0.5em;
}
.royal-post-content-wrap .entry-content img {
    max-width: 100%;
    border-radius: var(--royal-radius);
    margin: 1em 0;
}

/* ============================================================
   RESPONSIVE — stack columns on mobile
   ============================================================ */
@media (max-width: 768px) {
    .royal-post-body {
        grid-template-columns: 1fr;
        padding: 24px 18px;
        gap: 28px;
    }
    /* On mobile: title+content first, images below */
    .royal-post-left  { order: 2; }
    .royal-post-right { order: 1; }
    .royal-sidebar-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* ============================================================
   META BAR (date, category)
   ============================================================ */
.royal-post-meta {
    background: var(--royal-white);
    border-bottom: 1px solid var(--royal-border);
    padding: 12px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 0.82rem;
    color: var(--royal-muted);
    letter-spacing: 0.03em;
}
.royal-post-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.royal-post-meta .meta-item svg {
    width: 14px; height: 14px;
    color: var(--royal-accent);
}
.royal-post-meta a {
    color: var(--royal-accent);
    text-decoration: none;
    font-weight: 600;
}
.royal-post-meta a:hover { text-decoration: underline; }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.royal-post-content-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 50px 24px 30px;
}

/* Gold accent line */
.royal-post-content-wrap::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--royal-accent), var(--royal-accent-light));
    border-radius: 2px;
    margin-bottom: 32px;
}

.royal-post-content-wrap .entry-content {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--royal-text);
}
.royal-post-content-wrap .entry-content p {
    margin-bottom: 1.4em;
}
.royal-post-content-wrap .entry-content h2,
.royal-post-content-wrap .entry-content h3 {
    font-family: var(--royal-font-head);
    color: var(--royal-primary);
    margin-top: 2em;
    margin-bottom: 0.6em;
}
.royal-post-content-wrap .entry-content img {
    max-width: 100%;
    border-radius: var(--royal-radius);
    margin: 1.5em 0;
}

/* ============================================================
   GALLERY GRID
   ============================================================ */
.royal-gallery-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 24px 60px;
    display :none;
}
.royal-gallery-section h3 {
    font-family: var(--royal-font-head);
    color: var(--royal-primary);
    font-size: 1.2rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.royal-gallery-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--royal-border);
}

.royal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.royal-gallery-grid a {
    display: block;
    overflow: hidden;
    border-radius: var(--royal-radius);
    aspect-ratio: 1;
    background: var(--royal-border);
    box-shadow: var(--royal-shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}
.royal-gallery-grid a:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 32px rgba(26,26,46,0.18);
}
.royal-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.royal-gallery-grid a:hover img { opacity: 0.9; }

/* ============================================================
   DIVIDER
   ============================================================ */
.royal-post-divider {
    max-width: 860px;
    margin: 0 auto 40px;
    padding: 0 24px;
    border: none;
    border-top: 1px solid var(--royal-border);
}

/* ============================================================
   ELEMENTOR FOOTER WRAPPER
   ============================================================ */
.royal-elementor-footer {
    width: 100%;
}

/* kept for reference — not used */
.royal-post-footer-bottom {
    display: none;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.04em;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.royal-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,10,20,0.94);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.royal-lightbox-overlay.active { display: flex; }
.royal-lightbox-overlay img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 0 60px rgba(0,0,0,0.7);
}
.royal-lightbox-close {
    position: fixed;
    top: 20px; right: 28px;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
    transition: color 0.2s;
}
.royal-lightbox-close:hover { color: var(--royal-accent-light); }
.royal-lightbox-prev,
.royal-lightbox-next {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,0.8);
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s;
    user-select: none;
    padding: 10px;
}
.royal-lightbox-prev { left: 16px; }
.royal-lightbox-next { right: 16px; }
.royal-lightbox-prev:hover,
.royal-lightbox-next:hover { color: var(--royal-accent-light); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* end of royal-school-child styles */