
/*
Theme Name: Stella Tidy
Theme URI: https://stellamarisschool.bz
Author: ChatGPT
Author URI: https://chat.openai.com
Description: A clean, mobile-friendly theme that preserves the existing homepage content while adding a tidy, responsive menu bar and cleaner page layouts.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stella-tidy
*/

/* Base reset and typography */
*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; line-height: 1.6; color: #111; }
img { max-width: 100%; height: auto; }
a { color: #0b63ce; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
.screen-reader-text { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Layout */
.container { width: min(1100px, 92%); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 1000; background: #ffffffef; backdrop-filter: saturate(180%) blur(6px); border-bottom: 1px solid #eee; }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; padding: .65rem 0; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.brand__title { font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__tagline { color: #666; font-size: .85rem; display: none; }

/* Primary nav */
.nav { flex: 1 1 auto; }
.nav__toggle { display: none; border: 1px solid #ddd; background: #fff; border-radius: 10px; padding: .45rem .6rem; font-size: 1rem; }
#primary-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; justify-content: flex-end; }
#primary-menu > li { position: relative; }
#primary-menu > li > a { display: inline-block; padding: .35rem .5rem; border-radius: 10px; }
#primary-menu > li > a:hover, #primary-menu > li > a:focus, #primary-menu > li.current-menu-item > a { background: #f2f6ff; text-decoration: none; }

/* Dropdowns (1 level) */
#primary-menu li.menu-item-has-children > a::after { content: "▾"; margin-left: .35rem; font-size: .75em; }
#primary-menu li .sub-menu { position: absolute; top: calc(100% + .4rem); left: 0; min-width: 200px; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: .35rem; display: none; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
#primary-menu li .sub-menu li a { display: block; padding: .5rem .6rem; border-radius: 8px; }
#primary-menu li .sub-menu li a:hover { background: #f7f7f8; }
#primary-menu li:hover > .sub-menu, #primary-menu li:focus-within > .sub-menu { display: block; }

/* Page chrome */
.page-header { padding: 2.2rem 0 1.2rem; border-bottom: 1px solid #f1f1f1; margin-bottom: 1.5rem; }
.page-header h1 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 2rem); }
.entry { padding-bottom: 3rem; }
.entry .wp-block-image img { border-radius: 12px; }
.entry .wp-block-gallery { gap: .75rem !important; }
.entry table { width: 100%; border-collapse: collapse; }
.entry table th, .entry table td { border: 1px solid #eee; padding: .6rem .7rem; }
.entry .alignwide { width: min(1200px, 96%); margin-inline: auto; }
.entry .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }

/* Footer */
.site-footer { border-top: 1px solid #eee; background: #fafafa; padding: 1.2rem 0; color: #555; }
.site-footer .credits { font-size: .9rem; }

/* Responsive */
@media (max-width: 1024px) {
  .brand__tagline { display: none; }
}
@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; align-items: center; gap: .4rem; }
  .site-header .inner { flex-wrap: wrap; }
  .nav { width: 100%; }
  .nav--collapsed #primary-menu { display: none; }
  .nav--open #primary-menu { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .5rem 0; }
  #primary-menu > li > a { padding: .6rem .65rem; }
  #primary-menu li .sub-menu { position: static; box-shadow: none; border: 0; padding: 0; margin-left: 1rem; display: none; }
  #primary-menu li.menu-item-has-children.open > .sub-menu { display: block; }
}
