/*
Theme Name: RM Modern
Theme URI:  https://example.com
Author:     Talaourar Abderraouf
Author URI: https://example.com
Description: A minimal modern blog theme inspired by clean magazine layouts.
Version:    1.0
License:    GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rm-modern
Tags: minimalist, blog, responsive
*/

:root {
  --max-width: 1300px;
  --space: 48px;
  --accent: #111;
  --muted: #8a8a8a;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-sans);
  color: var(--accent);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--space) / 2);
}

.site-top { padding: 16px 0; }

.site-branding {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  position: relative;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 24px;
  padding-bottom: 36px;
}

.page-title {
  font-size: 40px;
  margin: 0 0 28px;
  text-align: center;
  font-weight: 600;
}

.entry {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 12px;
}

.entry-title {
  font-size: 24px;
  margin: 0 0 8px;
}

.entry-excerpt {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.entry-meta {
  font-size: 12px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid #eee;
  margin-top: 80px;
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  font-weight: 700;
  font-size: 20px;
}

.footer-widgets {
  display: flex;
  gap: 48px;
}

.footer-widgets ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-widgets li {
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-inner {
    padding-top: 16px;
    padding-bottom: 24px;
  }

  .page-title {
    font-size: 28px;
  }

  :root {
    --space: 28px;
  }
}

/* Header controls: centered logo, left hamburger, right search */
.site-top--has-controls .site-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

/* Buttons for toggles */
.site-toggle {
  background: transparent;
  border: none;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
  transform: scale(1.2); /* ⬅️ Increased size */
}

.site-toggle:focus {
  outline: 2px solid rgba(0, 0, 0, 0.12);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Branding centered */
.site-branding-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.site-branding {
  font-weight: 700;
  font-size: 16px;
}

.site-logo-link img {
  max-height: 52px; /* ⬅️ Slightly increased */
  display: inline-block;
}

/* Make sure toggles don't push the center off on small screens */
.site-toggle--menu,
.site-toggle--search {
  flex: 0 0 auto;
}

/* --- Backdrop for drawer --- */
.site-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 9998;
}

.site-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer (menu) styling - mobile slide behaviour */
.site-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 280px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid #eee;
  z-index: 9999;
  transition: left 240ms ease;
  padding-top: 72px;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.site-drawer.is-open {
  left: 0;
}

.site-drawer .primary-menu-drawer {
  list-style: none;
  padding: 24px;
  margin: 0;
  display: block;
}

.site-drawer .primary-menu-drawer li {
  margin-bottom: 0;
  border-bottom: 1px solid #f0f0f0;
}

.site-drawer .primary-menu-drawer a {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
  display: block;
  padding: 10px 8px;
  box-sizing: border-box;
}

/* Search area */
.site-search {
  position: fixed;
  top: 12px;
  right: 12px;
  width: calc(100% - 48px);
  max-width: 420px;
  background: #fff;
  z-index: 9998;
  border: 1px solid #eee;
  padding: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.site-search.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.site-search .search-form {
  display: flex;
  gap: 8px;
}

.site-search .search-field {
  flex: 1 1 auto;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* ===== Desktop behavior: centered dropdown ===== */
@media (min-width: 900px) {
  .site-drawer {
    position: fixed;
    left: 50%;
    top: 64px;
    transform: none;
    width: 360px;
    min-width: 320px;
    padding: 14px;
    display: none;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    overflow: visible;
    z-index: 200000;
  }

  .site-drawer.is-open {
    display: block;
    left: 50%;
  }

  .site-drawer-inner.container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .site-drawer .primary-menu-drawer {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
  }

  .site-drawer .primary-menu-drawer li {
    border-bottom: none !important;
    display: block !important;
    margin: 0 0 10px 0 !important;
  }

  .site-drawer .primary-menu-drawer li + li {
    border-top: 1px solid #f0f0f0 !important;
  }

  .site-drawer .primary-menu-drawer a {
    display: block !important;
    width: 100% !important;
    padding: 12px 16px !important;
    text-align: left !important;
    color: var(--accent) !important;
    box-sizing: border-box !important;
  }
}

/* Move hamburger slightly to the right */
.site-toggle--menu {
  margin-left: 12px;
}

/* Move search slightly to the left */
.site-toggle--search {
  margin-right: 12px;
}

/* Ensure the header uses relative positioning to allow absolute centering */
.site-top-inner {
  position: relative;
}

h1, h2, h3, h4, h5, h6, p {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
ul, li, p {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  hyphens: auto;
}



/* Inter Regular */
@font-face {
  font-family: 'Inter';
  src: url('/wp-content/themes/rm-modern/fonts/Inter_28pt-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

/* Inter Bold */
@font-face {
  font-family: 'Inter';
  src: url('/wp-content/themes/rm-modern/fonts/Inter_28pt-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* Inter Italic */
@font-face {
  font-family: 'Inter';
  src: url('/wp-content/themes/rm-modern/fonts/Inter_28pt-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
}

/* Inter Bold Italic */
@font-face {
  font-family: 'Inter';
  src: url('/wp-content/themes/rm-modern/fonts/Inter_28pt-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
}

/* Apply Inter everywhere but keep weight/style */
body, body * {
  font-family: 'Inter', sans-serif !important;
}
