/** * Rankwell Newspaper - Single Post Styles * Self-contained CSS for single.php * Version: 2.0.0 * Theme: Rankwell Newspaper by Ejes Gist Media Limited */ /* ========================================================================== CSS Custom Properties (Design Tokens) ========================================================================== */ :root { --rw-content-width: 728px; --rw-sidebar-width: 336px; --rw-gap: 24px; --rw-font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; --rw-font-heading: Georgia, "Times New Roman", Times, serif; --rw-color-text: #1a1a1a; --rw-color-text-light: #4a4a4a; --rw-color-bg: #ffffff; --rw-color-accent: #c00; --rw-color-link: #c00; --rw-color-link-hover: #a00; --rw-color-border: #e0e0e0; --rw-border-radius: 4px; --rw-shadow-sm: 0 1px 3px rgba(0,0,0,0.08); } /* ========================================================================== Single Post Container ========================================================================== */ .rw-single { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 20px; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: var(--rw-gap); background-color: var(--rw-color-bg); font-family: var(--rw-font-primary); color: var(--rw-color-text); } /* Primary Content Area */ .rw-single__content { flex: 1 1 var(--rw-content-width); min-width: 0; /* Prevent flex item from overflowing */ max-width: 100%; } /* Sidebar */ .rw-single__sidebar { flex: 0 1 var(--rw-sidebar-width); min-width: 280px; max-width: 100%; } /* ========================================================================== Post Header ========================================================================== */ .rw-single__header { margin-bottom: 24px; border-bottom: 1px solid var(--rw-color-border); padding-bottom: 20px; } .rw-single__category { display: inline-block; background-color: var(--rw-color-accent); color: #fff; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 10px; border-radius: 2px; margin-bottom: 12px; text-decoration: none; } .rw-single__title { font-family: var(--rw-font-heading); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.25; margin: 0 0 16px 0; color: var(--rw-color-text); word-wrap: break-word; } .rw-single__meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 0.875rem; color: var(--rw-color-text-light); } .rw-single__author { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; } .rw-single__author-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; } .rw-single__date { display: flex; align-items: center; gap: 4px; } /* ========================================================================== Featured Image ========================================================================== */ .rw-single__featured-image { margin-bottom: 24px; position: relative; border-radius: var(--rw-border-radius); overflow: hidden; background-color: #f5f5f5; } .rw-single__featured-image img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; /* Preserve aspect ratio, show entire image */ } /* Image caption styling */ .rw-single__featured-caption { font-size: 0.8rem; color: var(--rw-color-text-light); padding: 8px 12px; background: #f9f9f9; text-align: left; font-style: italic; border-bottom: 1px solid var(--rw-color-border); } /* ========================================================================== Post Content Body ========================================================================== */ .rw-single__body { font-size: 1.125rem; line-height: 1.8; word-wrap: break-word; overflow-wrap: break-word; } /* Ensure ALL images inside post content resize perfectly */ .rw-single__body img, .rw-single__body figure img, .rw-single__body .wp-block-image img, .rw-single__body .size-full, .rw-single__body .size-large, .rw-single__body .size-medium, .rw-single__body .wp-post-image, .rw-single__body .attachment-post-thumbnail { display: block; max-width: 100%; height: auto; border-radius: var(--rw-border-radius); box-sizing: border-box; } /* Handle legacy WordPress image alignment */ .rw-single__body .alignleft { float: left; margin: 8px 24px 24px 0; max-width: 50%; } .rw-single__body .alignright { float: right; margin: 8px 0 24px 24px; max-width: 50%; } .rw-single__body .aligncenter { display: block; margin-left: auto; margin-right: auto; float: none; } /* Clear floats after aligned images */ .rw-single__body::after { content: ""; display: table; clear: both; } /* Figure and Figcaption */ .rw-single__body figure { margin: 24px 0; max-width: 100%; } .rw-single__body figcaption, .rw-single__body .wp-element-caption { font-size: 0.85rem; color: var(--rw-color-text-light); text-align: center; margin-top: 8px; font-style: italic; } /* Video and iframe responsiveness */ .rw-single__body iframe, .rw-single__body video, .rw-single__body embed, .rw-single__body object { max-width: 100%; width: 100%; height: auto; aspect-ratio: 16 / 9; border: none; } /* ========================================================================== Typography inside content ========================================================================== */ .rw-single__body h2 { font-family: var(--rw-font-heading); font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 32px 0 16px; line-height: 1.3; } .rw-single__body h3 { font-family: var(--rw-font-heading); font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin: 28px 0 14px; } .rw-single__body h4 { font-size: clamp(1.1rem, 2vw, 1.25rem); margin: 24px 0 12px; } .rw-single__body p { margin: 0 0 20px; } .rw-single__body a { color: var(--rw-color-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; } .rw-single__body a:hover { color: var(--rw-color-link-hover); text-decoration-thickness: 2px; } .rw-single__body blockquote { margin: 24px 0; padding: 16px 24px; border-left: 4px solid var(--rw-color-accent); background: #f9f9f9; font-style: italic; color: var(--rw-color-text-light); } .rw-single__body ul, .rw-single__body ol { margin: 0 0 20px 24px; padding: 0; } .rw-single__body li { margin-bottom: 8px; } /* ========================================================================== Post Tags & Sharing ========================================================================== */ .rw-single__footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rw-color-border); } .rw-single__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; } .rw-single__tags-label { font-weight: 700; font-size: 0.875rem; margin-right: 4px; } .rw-single__tag { display: inline-block; background: #f0f0f0; color: var(--rw-color-text-light); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; text-decoration: none; transition: background 0.2s; } .rw-single__tag:hover { background: var(--rw-color-accent); color: #fff; } /* ========================================================================== Author Box ========================================================================== */ .rw-single__author-box { display: flex; gap: 16px; padding: 20px; background: #f9f9f9; border-radius: var(--rw-border-radius); margin: 24px 0; align-items: center; } .rw-single__author-box-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; } .rw-single__author-box-name { font-weight: 700; font-size: 1.1rem; margin: 0 0 4px; } .rw-single__author-box-bio { font-size: 0.9rem; color: var(--rw-color-text-light); margin: 0; line-height: 1.5; } /* ========================================================================== Comments Section ========================================================================== */ .rw-single__comments { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rw-color-border); } .rw-single__comments-title { font-family: var(--rw-font-heading); font-size: 1.4rem; margin: 0 0 24px; } /* ========================================================================== Sidebar Widgets ========================================================================== */ .rw-single .widget { margin-bottom: 32px; padding: 20px; background: #fafafa; border-radius: var(--rw-border-radius); box-shadow: var(--rw-shadow-sm); } .rw-single .widget-title { font-family: var(--rw-font-heading); font-size: 1.1rem; font-weight: 700; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--rw-color-accent); color: var(--rw-color-text); } .rw-single .widget img { max-width: 100%; height: auto; } /* ========================================================================== Responsive Breakpoints ========================================================================== */ /* Tablet - Below 1024px */ @media screen and (max-width: 1024px) { .rw-single { padding: 24px 16px; gap: 20px; } .rw-single__content { flex: 1 1 100%; } .rw-single__sidebar { flex: 1 1 100%; min-width: 100%; } .rw-single__body .alignleft, .rw-single__body .alignright { float: none; display: block; margin: 16px auto; max-width: 100%; } } /* Mobile - Below 768px */ @media screen and (max-width: 768px) { .rw-single { padding: 16px 12px; gap: 16px; } .rw-single__header { margin-bottom: 16px; padding-bottom: 16px; } .rw-single__title { font-size: clamp(1.4rem, 5vw, 2rem); } .rw-single__meta { gap: 12px; font-size: 0.8rem; } .rw-single__body { font-size: 1rem; line-height: 1.7; } .rw-single__featured-caption { font-size: 0.75rem; padding: 6px 10px; } .rw-single__author-box { flex-direction: column; text-align: center; padding: 16px; } .rw-single__author-box-avatar { width: 48px; height: 48px; } .rw-single__body figure { margin: 16px 0; } } /* Small Mobile - Below 480px */ @media screen and (max-width: 480px) { .rw-single { padding: 12px 10px; } .rw-single__title { font-size: 1.3rem; } .rw-single__body { font-size: 0.95rem; } .rw-single__body h2 { font-size: 1.25rem; } .rw-single__body h3 { font-size: 1.15rem; } .rw-single__tags { gap: 6px; } .rw-single__tag { padding: 3px 10px; font-size: 0.75rem; } .rw-single .widget { padding: 12px; } } /* ========================================================================== Accessibility & Print ========================================================================== */ @media print { .rw-single { max-width: 100%; padding: 0; display: block; } .rw-single__sidebar { display: none; } .rw-single__body img { max-width: 100% !important; page-break-inside: avoid; } } /* Reduced motion for accessibility */ @media (prefers-reduced-motion: reduce) { .rw-single * { transition: none !important; animation: none !important; } }