/*
Theme Name: SCDev Theme Pages
Version: 1.0.0
Text Domain: scdev-theme-pages
*/

/* ===========================
   DARK / LIGHT MODE VARIABLES
=========================== */
body[data-theme="light"] {
    --dm-text: #111111;
    --dm-text-muted: rgba(0,0,0,0.6);
    --dm-card-bg: rgba(255,255,255,0.12);
    --dm-card-hover: rgba(255,255,255,0.22);
    --dm-input-bg: rgba(255,255,255,0.6);
    --dm-input-border: rgba(0,0,0,0.2);
    --dm-form-border: rgba(0,0,0,0.1);
    --dm-btn-bg: rgba(255,255,255,0.2);
    --dm-counter-bg: rgba(0,0,0,0.3);
    --dm-overlay: rgba(0,0,0,0.15);
}

body[data-theme="dark"] {
    --dm-text: #f0f0f0;
    --dm-text-muted: rgba(255,255,255,0.55);
    --dm-card-bg: rgba(0,0,0,0.35);
    --dm-card-hover: rgba(0,0,0,0.5);
    --dm-input-bg: rgba(255,255,255,0.08);
    --dm-input-border: rgba(255,255,255,0.15);
    --dm-form-border: rgba(255,255,255,0.12);
    --dm-btn-bg: rgba(255,255,255,0.15);
    --dm-counter-bg: rgba(0,0,0,0.55);
    --dm-overlay: rgba(0,0,0,0.45);
}

/* ===========================
   BASE
=========================== */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--dm-text, #111);
    transition: color 0.3s ease;
}

/* ===========================
   LAYOUT
=========================== */
.container {
    width: 100vw;
    height: 100vh;
    background: lightblue;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-area {
    background: purple;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pages-content-wrapper img {
    max-width: 100%;
    width: auto !important;
  /*  height: 300px !important; */
    display: block;
    margin-bottom: 16px;
    object-fit: contain;
}

.pages-content-wrapper img.alignleft {
    float: left;
    margin: 0 20px 16px 0;
    display: inline;
}

.pages-content-wrapper img.alignright {
    float: right;
    margin: 0 0 16px 20px;
    display: inline;
}

.pages-content-wrapper img.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.entry-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    padding: 8px 40px;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    flex-shrink: 0;
}

.pages-content-wrapper {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 30px 40px 30px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

/* Images: shrink if too wide, never stretch, cap height, respect aspect ratio */
.pages-content-wrapper img {
    max-width: 100%;
    max-height: 50%;
    width: auto;
    display: block;
    margin-bottom: 16px;
    object-fit: contain;
}

/* ===========================
   HEADER / FOOTER BARS
=========================== */
.site-header,
.site-footer {
    position: fixed;
    left: 0;
    width: 100%;
    height: 30px;
    background: transparent;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.site-header { top: 0; }
.site-footer { bottom: 0; }

.site-footer .page-nav-prev {
    margin-right: 8px;
}

.site-footer .page-nav-next {
    margin-right: 50px;
}

/* ===========================
   RADIAL TRIGGER BUTTON
=========================== */
.radial-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

/* ===========================
   PAGE NAV BUTTONS & COUNTER
=========================== */
.page-nav-prev,
.page-nav-next {
    background: rgba(80, 80, 80, 0.75);
    border: none;
    color: white;
    font-size: 24px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-nav-prev:hover,
.page-nav-next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Hide arrows in header only */
.site-header .page-nav-prev,
.site-header .page-nav-next {
    visibility: hidden;
}

.page-counter {
    color: white;
    font-size: 12px;
    font-weight: 600;
    /*background: var(--dm-counter-bg, rgba(0,0,0,0.3));*/
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 50px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* ===========================
   RADIAL MENU
=========================== */
.radial-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9998;
}

.radial-menu.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.radial-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.radial-menu-items li {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.radial-menu-items li:nth-child(1) { --angle: 0deg; }
.radial-menu-items li:nth-child(2) { --angle: 30deg; }
.radial-menu-items li:nth-child(3) { --angle: 60deg; }
.radial-menu-items li:nth-child(4) { --angle: 80deg; }
.radial-menu-items li:nth-child(5) { --angle: 100deg; }
.radial-menu-items li:nth-child(6) { --angle: 125deg; }
.radial-menu-items li:nth-child(7) { --angle: 150deg; }
.radial-menu-items li:nth-child(8) { --angle: 180deg; }

.radial-menu.open .radial-menu-items li {
    transform: translate(-50%, -50%)
               rotate(var(--angle))
               translateY(-150px)
               rotate(calc(-1 * var(--angle)));
}

.radial-menu-items a {
    display: block;
    padding: 15px 25px;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    white-space: nowrap;
    font-weight: 600;
    transition: all 0.3s ease;
}

.radial-menu-items a:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.radial-has-sub {
    font-size: 11px;
    margin-left: 7px;
    vertical-align: middle;
    display: inline-block;
}

.radial-back-btn {
    background: rgba(255,255,255,0.85) !important;
    color: #555 !important;
    font-style: italic;
}

.radial-back-btn:hover {
    background: #eee !important;
    color: #333 !important;
}

/* ===========================
   MOBILE
=========================== */
@media (max-width: 768px) {
    .content-area {
        width: 95% !important;
        height: 90% !important;
        border-radius: 8px !important;
    }

    .radial-menu.open .radial-menu-items li {
        transform: translate(-50%, -50%)
                   rotate(var(--angle))
                   translateY(-100px)
                   rotate(calc(-1 * var(--angle)));
    }

    .radial-menu-items a {
        padding: 8px !important;
        font-size: 14px;
    }
}


/* ===========================
   DARK MODE TOGGLE BUTTON
=========================== */
.darkmode-toggle {
    background: var(--dm-btn-bg, rgba(255,255,255,0.2));
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.darkmode-toggle:hover {
    transform: scale(1.15);
}
