/* Mariachiara Marsella – English page template
   Inspired by Neve theme layout on mariachiaramarsella.it */

:root {
  --color-text: #404248;
  --color-heading: #272727;
  --color-link: #0366d6;
  --color-accent: #0073aa;
  --color-muted: #666666;
  --color-border: #e0e0e0;
  --color-bg: #ffffff;
  --color-footer-bg: #24292e;
  --color-footer-text: #ffffff;
  --container: 1170px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --header-height: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

ul,
ol {
  margin: 0 0 1.25em;
  padding-left: 1.5em;
}

p {
  margin: 0 0 1.25em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-heading);
  line-height: 1.3;
  margin: 1.5em 0 0.75em;
  font-weight: 600;
}

h1 {
  font-size: 1.75rem;
  margin-top: 0;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.2rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
}

/* ========== HEADER ========== */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 12px 0;
  min-height: 110px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand__logo {
  width: 120px;
  height: 110px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.brand__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.2;
}

.brand__tagline {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.3;
}

/* Navigation */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--color-heading);
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.primary-nav a {
  display: block;
  padding: 0.55rem 0.9rem;
  color: var(--color-heading);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav .current > a {
  color: var(--color-link);
  text-decoration: none;
}

/* Dropdown (My work) */
.primary-nav .has-children {
  position: relative;
}

.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 100;
  flex-direction: column;
  padding: 0.4rem 0;
}

.primary-nav .has-children:hover > .sub-menu,
.primary-nav .has-children:focus-within > .sub-menu {
  display: flex;
}

.primary-nav .sub-menu a {
  padding: 0.5rem 1rem;
  white-space: nowrap;
  font-weight: 400;
  font-size: 0.9rem;
}

/* ========== MAIN LAYOUT ========== */
.site-main {
  padding: 1.75rem 0 3rem;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "»";
  margin-left: 0.35rem;
  color: #999;
}

.breadcrumb a {
  color: var(--color-link);
}

.breadcrumb [aria-current="page"] {
  color: var(--color-muted);
}

.page-title {
  margin: 0 0 1.25rem;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-heading);
}

.content img {
  margin: 1em 0;
}

.content figure {
  margin: 1.5em 0;
}

.content figcaption {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 0.4em;
}

.content strong {
  font-weight: 700;
}

/* ========== SIDEBAR ========== */
.sidebar {
  font-size: 0.95rem;
}

.sidebar__eyebrow {
  display: block;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.sidebar__heading {
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 1.6rem;
  color: #333;
  font-weight: 800;
  line-height: 1.2;
  border-left: 4px solid var(--color-accent);
  padding-left: 15px;
}

.sidebar__heading .accent {
  color: var(--color-accent);
}

.sidebar__list {
  list-style: disc;
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

.sidebar__list a {
  color: var(--color-link);
}

.sidebar__cta-title {
  margin: 1.75rem 0 0;
  font-size: 1.1rem;
  color: #333;
  font-weight: 700;
  line-height: 1.4;
}

.sidebar__cta-label {
  display: block;
  color: var(--color-accent);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.sidebar__cta-text {
  margin: 8px 0 1rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.sidebar__image {
  margin: 1rem 0 0;
}

.sidebar__image a {
  display: block;
}

.sidebar__image img {
  width: 100%;
  display: block;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: #fff;
  text-decoration: underline;
}

.site-footer a:hover {
  opacity: 0.85;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.footer-copy {
  margin: 0;
  line-height: 1.5;
}

.footer-social {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  transition: background 0.2s ease;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.25);
  opacity: 1;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
    max-width: 420px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 10px 0;
  }

  .brand__logo {
    width: 80px;
    height: 73px;
  }

  .brand__title {
    font-size: 1.1rem;
  }

  .brand__tagline {
    font-size: 0.72rem;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
    border-top: 1px solid var(--color-border);
    padding-top: 0.5rem;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color-border);
    margin: 0 0 0 0.75rem;
    min-width: 0;
    padding: 0;
  }

  .primary-nav .has-children.is-open > .sub-menu {
    display: flex;
  }

  .page-title {
    font-size: 1.45rem;
  }

  .site-main {
    padding: 1.25rem 0 2rem;
  }

  .footer-copy {
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .brand {
    gap: 10px;
    max-width: calc(100% - 60px);
  }

  .brand__logo {
    width: 64px;
    height: 59px;
  }
}
