/* ============================================================
   derstyle.css — Menar Vol.1 shared stylesheet
   Covers: split-panel pages (tr*), sidebar pages (sayfa*),
           photo/video grid pages, and the shared footer.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Page container ── */
/* Split-panel pages (tr*) use 5-row grid */
.page-container {
    width: 95vw;
    height: 92vh;
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
    display: grid;
    grid-template-rows: 55px auto auto 1fr 60px;
    overflow: hidden;
    position: relative;
}

/* Sidebar pages (sayfa*) use a 3-row grid — add class="page-container sidebar-layout" */
.page-container.sidebar-layout {
    grid-template-rows: 55px 1fr 60px;
}

/* ── Header ── */
.header {
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    padding: 0 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-bottom: 3px solid #FEC163;
}

.page-title-section { display: flex; align-items: center; gap: 0.7rem; }

.page-number {
    background: white;
    color: #C44569;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700;
    font-family: 'Fredoka', sans-serif;
}

.page-title { font-family: 'Fredoka', sans-serif; font-size: 1.3rem; font-weight: 700; }
.header-nav { display: flex; gap: 0.4rem; }

.header-nav-btn {
    background: white; color: #C44569;
    padding: 0.5rem 1.2rem; border: none; border-radius: 50px;
    font-family: 'Fredoka', sans-serif; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease; text-decoration: none;
}

.header-nav-btn:hover { transform: scale(1.05); }

/* ── Unified Rule (split-panel pages) ── */
.unified-rule {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF5D6 100%);
    padding: 0.8rem 2.5rem;
    border-bottom: 3px solid #FEC163;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rule-icon { font-size: 1.8rem; flex-shrink: 0; }
.rule-text { font-size: 0.95rem; line-height: 1.5; color: #5D4037; }
.rule-text strong { color: #C44569; font-weight: 700; }

/* ── Split Summary ── */
.split-summary { display: grid; grid-template-columns: 1fr 1fr; position: relative; }

.split-summary::after {
    content: ''; position: absolute;
    left: 50%; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #FEC163, #667eea);
    transform: translateX(-50%); z-index: 1;
}

.summary-panel { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; }
.summary-panel.traditional { background: linear-gradient(180deg, #E8F5E9, #C8E6C9); border-bottom: 2px solid #66BB6A; }
.summary-panel.modern      { background: linear-gradient(180deg, #E3F2FD, #BBDEFB); border-bottom: 2px solid #42A5F5; }

.summary-header { display: flex; align-items: center; justify-content: center; gap: 0.8rem; }

.summary-badge { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 0.25rem 0.7rem; border-radius: 15px; }
.summary-badge.traditional { background: #4CAF50; color: white; }
.summary-badge.modern      { background: #2196F3; color: white; }

.summary-number { font-family: 'Fredoka', sans-serif; font-size: 2rem; font-weight: 700; }
.summary-number.traditional { color: #2E7D32; }
.summary-number.modern      { color: #1565C0; }

.summary-steps { display: flex; flex-direction: column; gap: 0.4rem; }
.summary-step  { display: flex; align-items: flex-start; gap: 0.5rem; }

.step-badge {
    background: white; width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem; flex-shrink: 0;
}

.step-badge.traditional { color: #2E7D32; }
.step-badge.modern      { color: #1565C0; }
.step-text { font-size: 0.8rem; line-height: 1.3; color: #3E2723; }

/* ── Split Content ── */
.split-content {
    display: grid; grid-template-columns: 1fr 1fr;
    height: 100%; position: relative; overflow: hidden;
}

.split-content::after {
    content: ''; position: absolute;
    left: 50%; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #66BB6A, #FEC163, #42A5F5);
    transform: translateX(-50%); z-index: 1;
}

.demo-panel { display: flex; flex-direction: column; padding: 0.6rem; overflow: hidden; }
.demo-panel.traditional { background: linear-gradient(135deg, #F1F8E9, #DCEDC8); }
.demo-panel.modern      { background: linear-gradient(135deg, #E8EAF6, #C5CAE9); }

.panel-header { text-align: center; margin-bottom: 0.5rem; }

.method-badge {
    display: inline-block; padding: 0.35rem 1rem; border-radius: 20px;
    font-family: 'Fredoka', sans-serif; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; margin-bottom: 0.5rem;
}

.method-badge.traditional { background: linear-gradient(135deg, #66BB6A, #4CAF50); color: white; }
.method-badge.modern      { background: linear-gradient(135deg, #42A5F5, #2196F3); color: white; }

.panel-title { font-family: 'Fredoka', sans-serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 0.3rem; }
.panel-title.traditional { color: #2E7D32; }
.panel-title.modern      { color: #1565C0; }

.panel-subtitle { font-size: 0.85rem; }
.panel-subtitle.traditional { color: #558B2F; }
.panel-subtitle.modern      { color: #1976D2; }

.animation-box {
    background: white; border-radius: 16px; padding: 0.2rem; margin-bottom: 0.2rem;
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; max-height: 100%;
}

.animation-box.traditional { border: 3px solid #66BB6A; }
.animation-box.modern      { border: 3px solid #42A5F5; }

.media-wrapper {
    width: 100%; max-height: 220px; position: relative;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.2rem; overflow: hidden;
}

.demo-media {
    width: 100%; max-width: 100%; max-height: 210px;
    height: auto; border-radius: 10px; display: block; object-fit: contain;
}

.play-overlay {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.play-overlay:hover { transform: translate(-50%, -50%) scale(1.1); background: white; }
.play-overlay::after { content: '▶'; font-size: 1.5rem; color: #667eea; margin-left: 3px; }
.play-overlay.hidden { display: none; }

.replay-btn {
    background: linear-gradient(135deg, #FEC163, #F9A825);
    color: #5D4037; padding: 0.15rem 1.3rem; border: none; border-radius: 50px;
    font-family: 'Fredoka', sans-serif; font-size: 0.8rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; gap: 0.3rem;
}

.replay-btn:hover { transform: translateY(-2px); }
.replay-btn::before { content: '↻'; font-size: 1.1rem; }

.description-box { background: rgba(255,255,255,0.7); border-radius: 10px; padding: 0.5rem; margin-top: 0.4rem; }
.description-box.traditional { border: 2px solid #66BB6A; }
.description-box.modern      { border: 2px solid #42A5F5; }

.description-title { font-family: 'Fredoka', sans-serif; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.4rem; }
.description-title.traditional { color: #2E7D32; }
.description-title.modern      { color: #1565C0; }

.description-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }

.description-list li {
    display: flex; align-items: flex-start; gap: 0.3rem;
    font-size: 0.75rem; line-height: 1.2; color: #3E2723;
}

.description-list li::before { content: '✓'; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.description-list.traditional li::before { color: #4CAF50; }
.description-list.modern li::before      { color: #2196F3; }

/* ── Sidebar layout (sayfa* pages) ── */
.main-content {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: 100%;
    overflow: hidden;
}

.sidebar {
    background: linear-gradient(180deg, #FFF9E6, #FFE9B1);
    border-right: 3px solid #FEC163;
    padding: 1.8rem 1.5rem;
    overflow-y: auto;
}

.sidebar-title {
    font-family: 'Fredoka', sans-serif; font-size: 1.3rem; font-weight: 700;
    color: #C44569; margin-bottom: 1rem; padding-bottom: 0.8rem;
    border-bottom: 2px solid #FEC163;
}

.sidebar-content { font-size: 0.92rem; line-height: 1.65; color: #5D4037; }
.sidebar-content p      { margin-bottom: 1rem; }
.sidebar-content strong { color: #8F1F5C; }

.key-point {
    background: white; padding: 1rem; border-radius: 12px; margin-top: 1rem;
    border-left: 4px solid #FF6B9D; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.key-point strong { display: block; margin-bottom: 0.5rem; font-size: 0.95rem; color: #C44569; }

/* ── Content area ── */
.content-area { background: #F7E8DE; padding: 1.5rem 2rem; overflow-y: auto; }

.content-title {
    font-family: 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 700;
    color: #C44569; margin-bottom: 1.2rem; text-align: center;
}

.content-image { display: flex; justify-content: center; margin-bottom: 1.2rem; }

.content-image img {
    max-width: 100%; width: 420px; height: 260px;
    border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.content-text { max-width: 860px; margin: 0 auto; }

.content-text p {
    font-size: 1rem; line-height: 1.75; color: #3E2723;
    margin-bottom: 1.1rem; text-align: justify;
}

.content-text strong { color: #8F1F5C; font-weight: 700; }
.content-text ul { margin: 0.5rem 0 1rem 1.2rem; }
.content-text li { margin-bottom: 0.5rem; line-height: 1.6; }

/* ── Highlight box ── */
.highlight-box {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border: 3px solid #66BB6A; border-radius: 16px; padding: 1.2rem; margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(102, 187, 106, 0.2);
}

.highlight-box p { font-size: 0.95rem; line-height: 1.6; color: #1B5E20; margin-bottom: 0.7rem; }
.highlight-box p:last-child { margin-bottom: 0; }

/* ── Photo/video grids ── */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }

.photo-grid img {
    width: 100%; height: auto; border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12); display: block;
}

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }

.video-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1); }

.video-label {
    font-family: 'Fredoka', sans-serif; font-size: 0.85rem; font-weight: 600;
    padding: 0.4rem 0.8rem; color: white;
    background: linear-gradient(135deg, #FF6B9D, #C44569);
}

.video-card video { width: 100%; height: auto; display: block; max-height: 160px; object-fit: cover; }

/* ── Comparison / image grids ── */
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.image-card { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }

.image-card-label {
    font-family: 'Fredoka', sans-serif; font-size: 1rem; font-weight: 700;
    text-align: center; padding: 0.5rem;
}

.image-card-label.abakus { background: linear-gradient(135deg, #4CAF50, #2E7D32); color: white; }
.image-card-label.sorbie { background: linear-gradient(135deg, #42A5F5, #1565C0); color: white; }
.image-card-label.mental { background: linear-gradient(135deg, #FF7043, #BF360C); color: white; }
.image-card img { width: 100%; height: auto; display: block; object-fit: cover; }

/* ── Tools grid (sayfa3c) ── */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-bottom: 1.2rem; }

.tool-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1); text-align: center; }

.tool-label { font-family: 'Fredoka', sans-serif; font-size: 0.9rem; font-weight: 700; padding: 0.4rem; color: white; }
.tool-label.abakus { background: linear-gradient(135deg, #4CAF50, #2E7D32); }
.tool-label.sorbie { background: linear-gradient(135deg, #42A5F5, #1565C0); }
.tool-label.mental { background: linear-gradient(135deg, #FF7043, #BF360C); }
.tool-card img { width: 80%; height: auto; display: block; margin: 0.6rem auto; }

/* ── Observations box (sayfa3c) ── */
.observations { background: white; border-radius: 16px; padding: 1.2rem; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08); }

.observations-title { font-family: 'Fredoka', sans-serif; font-size: 1rem; font-weight: 700; color: #C44569; margin-bottom: 0.8rem; }
.observations ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.observations li {
    display: flex; align-items: flex-start; gap: 0.6rem;
    font-size: 0.95rem; line-height: 1.5; color: #3E2723;
}

.observations li::before { content: '▸'; color: #C44569; font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }
.observations li strong  { color: #8F1F5C; }

/* ── Footer ── */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 2.5rem; border-top: 3px solid #FEC163;
}

.footer-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

.footer-link {
    color: white; text-decoration: none; font-size: 0.8rem; font-weight: 600;
    padding: 0.3rem 0.6rem; border-radius: 5px; transition: background 0.2s;
}

.footer-link:hover { background: rgba(255, 255, 255, 0.2); }

.footer-right { display: flex; align-items: center; gap: 1.2rem; }

.footer-copyright { color: rgba(255, 255, 255, 0.9); font-size: 0.75rem; }

.footer-logout {
    color: rgba(255, 255, 255, 0.7); text-decoration: none;
    font-size: 0.75rem; font-weight: 600;
    padding: 0.2rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 20px; transition: all 0.2s;
}

.footer-logout:hover { background: rgba(255, 255, 255, 0.15); color: white; }

/* ── Responsive ──────────────────────────────────────────────────── */

/* All screens narrower than 1400px: switch to scrollable, auto height */
@media (max-width: 1400px) {
    body { height: auto; min-height: 100vh; min-height: 100dvh; overflow: auto; align-items: stretch; }
    .page-container,
    .page-container.sidebar-layout {
        height: auto; min-height: 100vh; min-height: 100dvh;
        overflow: visible; border-radius: 0; width: 100vw;
    }
    /* last row auto so the footer is never squeezed; the 1fr row absorbs spare height */
    .page-container { grid-template-rows: 55px auto auto 1fr auto; }
    .page-container.sidebar-layout { grid-template-rows: 55px 1fr auto; }
    .unified-rule { padding: 0.8rem 1.5rem; flex-direction: column; text-align: center; }
    .rule-icon    { font-size: 1.5rem; }
    .rule-text    { font-size: 0.85rem; }
    .footer { flex-direction: column; gap: 0.4rem; padding: 0.8rem 1.5rem; height: auto; }
}

/* Tablet landscape 1024–1400px: keep 2-col split, full sizes */
@media (max-width: 1400px) and (min-width: 1024px) {
    .split-summary,
    .split-content { grid-template-columns: 1fr 1fr; height: auto; overflow: visible; }
    .split-summary::after,
    .split-content::after { display: none; }
    .demo-panel { height: auto; overflow: visible; }
    .main-content { height: auto; overflow: visible; grid-template-columns: 1fr; }
    .photo-grid  { grid-template-columns: repeat(2, 1fr); }
    .video-grid  { grid-template-columns: repeat(2, 1fr); }
    .tools-grid  { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet portrait 600–1023px: keep 2-col split, slightly smaller */
@media (max-width: 1023px) and (min-width: 600px) {
    .split-summary,
    .split-content { grid-template-columns: 1fr 1fr; height: auto; overflow: visible; }
    .split-summary::after,
    .split-content::after { display: none; }
    .demo-panel { height: auto; overflow: visible; padding: 0.4rem; }
    .main-content { height: auto; overflow: visible; grid-template-columns: 1fr; }
    .summary-panel { padding: 0.6rem 0.8rem; gap: 0.4rem; }
    .summary-header { gap: 0.4rem; }
    .summary-number { font-size: 1rem; }
    .step-text { font-size: 0.82rem; }
    .panel-title { font-size: 1rem; }
    .panel-subtitle { font-size: 0.78rem; }
    .num-btn { min-width: 32px; height: 32px; font-size: 0.72rem; padding: 0 4px; }
    .photo-grid  { grid-template-columns: repeat(2, 1fr); }
    .video-grid  { grid-template-columns: repeat(2, 1fr); }
    .tools-grid  { grid-template-columns: repeat(2, 1fr); }
    .comparison-grid { grid-template-columns: 1fr; }
    .sidebar { border-right: none; border-bottom: 3px solid #FEC163; }
    .content-area { padding: 0.5rem; }
}

/* Phone under 600px: single column */
@media (max-width: 599px) {
    .split-summary,
    .split-content { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .split-summary::after,
    .split-content::after { display: none; }
    .demo-panel { height: auto; overflow: visible; }
    .main-content { height: auto; overflow: visible; grid-template-columns: 1fr; }
    .photo-grid  { grid-template-columns: 1fr; }
    .video-grid  { grid-template-columns: 1fr; }
    .tools-grid  { grid-template-columns: repeat(2, 1fr); }
    .comparison-grid { grid-template-columns: 1fr; }
    .sidebar { border-right: none; border-bottom: 3px solid #FEC163; }
    .content-area { padding: 0.4rem; }
}
