/*
Theme Name: idea4mi
Template:   generatepress
Version:    1.0.0
*/

/* ============================================================
   SECTION 1 — PER-SITE CONFIG
   Edit ONLY this block for per-site customisation.
   ============================================================ */
:root {
  --accent:       #fd190b;  /* site accent colour — intentionally overrides GP Customizer */
  --font-heading: 'Blinker', system-ui, -apple-system, sans-serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================================
   SECTION 2 — FONT FACE (self-hosted Blinker — no CDN call)
   ============================================================ */
@font-face {
  font-family: 'Blinker';
  font-style:  normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/blinker-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Blinker';
  font-style:  normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/blinker-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Blinker';
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/blinker-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Blinker';
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/blinker-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   SECTION 3 — TYPOGRAPHY
   ============================================================ */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--contrast);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--contrast);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

/* ============================================================
   SECTION 4 — GLOBAL RESETS
   ============================================================ */
a {
  text-decoration: none;
}

.post-img {
  width: 100% !important;
  height: auto;
  display: block;
}

/* Visible focus ring using accent colour */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   SECTION 5 — HEADER
   ============================================================ */

/* Logo: proportional height (down from 100px) */
.navigation-branding img,
.site-logo img,
.site-logo.mobile-header-logo img {
  height: 60px;
  width: auto;
}

@media (max-width: 768px) {
  .inside-header {
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-logo {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
  }

  .mobile-menu-control-wrapper {
    flex: 0 0 auto;
    align-self: center;
  }

  .main-navigation .main-nav ul li a {
    padding: 0 10px !important;
  }
}

/* ============================================================
   SECTION 6 — NAVIGATION
   ============================================================ */

/* Mobile toggle tap target */
.mobile-menu-control-wrapper .menu-toggle {
  min-height: 44px;
  min-width: 44px;
}

/* ============================================================
   SECTION 7 — ARTICLE CARDS (blog index)
   ============================================================ */

/* Card lift on hover */
.separate-containers article.post {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.separate-containers article.post:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

/* Featured image subtle zoom */
.separate-containers article.post .post-image {
  overflow: hidden;
}
.separate-containers article.post .post-image img {
  transition: transform 0.3s ease;
}
.separate-containers article.post:hover .post-image img {
  transform: scale(1.03);
}

/* Entry meta smaller and quieter */
.entry-meta {
  font-size: 0.8rem;
  color: var(--contrast-2);
  margin-bottom: 0.5rem;
}

/* ============================================================
   SECTION 8 — SINGLE ARTICLE
   ============================================================ */
.entry-content {
  font-size: 1.0625rem; /* 17px — slightly above base for comfort */
  line-height: 1.72;
}

/* Heading family inside post content */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--font-heading);
}

/* Article header spacing */
.entry-header {
  margin-bottom: 1.5rem;
}

/* Blockquote */
.entry-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.75em 1.25em;
  margin: 1.5em 0;
  background: var(--base-2);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--contrast-2);
}

/* ============================================================
   SECTION 9 — SIDEBAR
   ============================================================ */
.sidebar .widget-title,
.sidebar .wp-block-heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

/* ============================================================
   SECTION 10 — FOOTER
   ============================================================ */
.site-footer ul {
  margin: 0;
  list-style: none !important;
  padding: 0;
}

.site-footer ul li {
  margin-bottom: 10px;
}

.footer-widgets-container {
  padding: 20px;
}

/* ============================================================
   SECTION 11 — ENTRY META DECORATIONS
   ============================================================ */

/* Small dot before entry date */
.entry-date:before {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
  content: "";
  background: currentColor;
}

/* Small author avatar */
.entry-meta .avatar {
  width: 25px;
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 5px;
}

/* Accent colour on h6 inline spans */
h6 span {
  font-weight: 900;
  color: var(--accent);
}

/* ============================================================
   SECTION 12 — TAG CLOUD PILLS
   ============================================================ */
.wp-block-tag-cloud > a,
.taxonomy-post_tag.wp-block-post-terms > a {
  display: inline-block;
  position: relative;
  vertical-align: top;
  text-decoration: none !important;
  font-size: 15px !important;
  margin-right: 5px;
  margin-bottom: 5px;
  padding: .15em .66em;
  border-radius: 2rem;
  border: 2px solid var(--accent);
  color: var(--accent);
  text-transform: capitalize;
}

.taxonomy-post_tag.wp-block-post-terms > a {
  border-color: var(--contrast-3) !important;
  color: var(--contrast-3) !important;
}

.wp-block-tag-cloud > a:hover:after {
  border-color: currentColor;
  background-color: transparent;
  opacity: .99;
}

/* ============================================================
   SECTION 13 — PAGINATED POST NAVIGATION
   ============================================================ */
.page-link-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 48px 0 24px;
  padding-top: 28px;
  border-top: 2px solid var(--base);
}

/* "Continua a leggere" — full-width CTA (always last link) */
.page-link-nav a:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none !important;
  background-color: var(--contrast);
  color: var(--base-3) !important;
  transition: background-color 0.2s;
  box-sizing: border-box;
}

.page-link-nav a:last-child:hover,
.page-link-nav a:last-child:focus {
  background-color: var(--accent);
  color: var(--base-3) !important;
}

/* "Pagina precedente" — ghost style */
.page-link-nav a:first-child:not(:last-child) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  color: var(--contrast-2) !important;
  border: 1px solid var(--base);
  transition: border-color 0.2s;
}

.page-link-nav a:first-child:not(:last-child):hover {
  border-color: var(--contrast-2);
}

/* ============================================================
   SECTION 14 — MOBILE
   ============================================================ */

/* Disable card hover effects on touch devices */
@media (hover: none) {
  .separate-containers article.post:hover {
    transform: none;
    box-shadow: none;
  }
  .separate-containers article.post:hover .post-image img {
    transform: none;
  }
}

/* Nav link tap targets on mobile */
@media (max-width: 768px) {
  .main-navigation .main-nav ul li a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Ensure images don't overflow on narrow screens */
  .separate-containers .inside-article img {
    max-width: 100%;
  }
}

/* ============================================================
   SECTION 15 — AUTHOR BOX
   ============================================================ */
.wm-author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 2.5rem;
  padding: 1.25rem;
  border-top: 2px solid var(--base);
  background: var(--base-2);
  border-radius: 8px;
}

.wm-author-box__avatar {
  flex-shrink: 0;
}

.wm-author-box__avatar-img {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.wm-author-box__body {
  flex: 1;
}

.wm-author-box__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  display: block;
  margin-bottom: 0.3rem;
  color: var(--contrast);
}

.wm-author-box__bio {
  font-size: 0.875rem;
  color: var(--contrast-2);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.wm-author-box__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

@media (max-width: 480px) {
  .wm-author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ============================================================
   SECTION 16 — AUTHOR ARCHIVE HEADER
   GP renders .page-header natively on /author/{slug}/ — style it directly.
   ============================================================ */
body.author .page-header {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--base-2);
  border-radius: 8px;
}

body.author .page-header .page-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin: 0 0 0.4rem;
  color: var(--contrast);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body.author .page-header .page-title img {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

body.author .page-header .author-info {
  font-size: 0.9rem;
  color: var(--contrast-2);
  margin: 0;
}

@media (max-width: 600px) {
  body.author .page-header {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
   SECTION 17 — CHI SIAMO TEAM GRID
   ============================================================ */
.wm-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.wm-team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.25rem;
  background: var(--base-3);
  border: 1px solid var(--base);
  border-radius: 10px;
}

.wm-team-card__avatar-img {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 0.75rem;
}

.wm-team-card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.4rem;
  color: var(--contrast);
}

.wm-team-card__bio {
  font-size: 0.875rem;
  color: var(--contrast-2);
  margin: 0 0 0.75rem;
  line-height: 1.5;
  flex: 1;
}

.wm-team-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

/* ============================================================
   SECTION 18 — CONTATTI FORM
   ============================================================ */
.wm-contact-form {
  max-width: 560px;
  margin-top: 1.5rem;
}

.wm-contact-form__group {
  margin-bottom: 1.25rem;
}

.wm-contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--contrast);
}

.wm-contact-form label span {
  color: var(--accent);
}

.wm-contact-form input[type="text"],
.wm-contact-form input[type="email"],
.wm-contact-form select,
.wm-contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--base);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--base-3);
  color: var(--contrast);
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.wm-contact-form input[type="text"]:focus,
.wm-contact-form input[type="email"]:focus,
.wm-contact-form select:focus,
.wm-contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.wm-contact-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.wm-contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.wm-contact-form__check {
  flex-direction: row;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.wm-contact-form__check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.wm-contact-form__check label {
  font-weight: 400;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--contrast-2);
}

.wm-contact-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: var(--base-3);
  border: none;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s;
}

.wm-contact-form button[type="submit"]:hover,
.wm-contact-form button[type="submit"]:focus {
  background-color: var(--contrast);
  color: var(--base-3);
}


.wm-contact-form__notice {
  padding: 1rem;
  background: var(--base-2);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  font-size: 0.875rem;
  margin-top: 1rem;
}
