/*
Theme Name: Gianluca Rocci Style WP Theme
Theme URI: https://developer.microsoft.com/en-us/developer-experience
Author: Gianluca Rocci
Author URI: https://gianlucarocci.com
Description: Tema ispirato allo stile Microsoft Developer Experience con colori, arrotondamenti e ombre. Senza dipendenze da Node.js o Tailwind build.
Version: 1.0
Tags: custom-background, custom-logo, custom-menu, featured-images, translation-ready, blog, clean, modern, developer
*/

/* Base reset e font */
body {
  font-family: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
  font-weight: 400;       /* peso normale per i testi generali */
  font-size: 16px;        /* dimensione base leggibile */
  line-height: 1.5;       /* spaziatura di riga comoda */
  color: #333333;         /* colore testo di base */
  background-color: #f3f6f9; /* Tema */
	 max-width: 100% !important;
}


a {
    color: #0078D4;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

p {
    /* color: #0078D4; */   /* -> BLU */ 
	color: #333333; /* -> GRIGIO SCURO */
    margin-bottom: 1rem;
}

/* BREADCRUMB */
.breadcrumb {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: #0078D4;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}


img.featured-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 8px;
}

/* Solo se l'immagine è troppo alta */
img.featured-image.tall {
  max-height: 100px;
  object-fit: contain;
}



/* Contenitore principale */

/* */
* {
  box-sizing: border-box;
}

.section-flex, .hero, section {
  max-width: 100%;
  overflow-x: hidden;
}

.section-flex > *, .hero, .blog-wrapper, .blog-main {
  min-width: 0;
}
/* CONTAINER PRINCIPALE */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.container-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}


.hero {
  width: 100%;
  background-size: cover;
  background-position: center;
  padding: 6rem 1rem;
  text-align: center;
  color: white;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Mobile fix */
@media (max-width: 768px) {
  .hero {
    padding: 4rem 1rem;
    background-position: center top;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* SEZIONE 1 FRONT-PAGE */
.section-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 4rem;
}

.section-flex .text {
  flex: 1;
  min-width: 250px;
}

.section-flex .image {
  flex: 1;
  min-width: 250px;
}

.section-flex img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* MOBILE & TABLET FIX */
@media (max-width: 1024px) {
  .section-flex {
    flex-direction: column;
    padding: 2rem 1rem;
    text-align: center;
  }

  .section-flex .text,
  .section-flex .image {
    width: 100%;
    min-width: unset;
  }

  .section-flex img {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto;
    display: block;
  }
}



.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.devtools-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.devtools-card:hover {
  transform: translateY(-4px);
}

.devtools-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.devtools-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.post-category {
  font-weight: 600;
  color: #0078D4;
}

.dot {
  margin: 0 0.4rem;
}

.devtools-title {
  font-size: 1.1rem;
  margin: 0.4rem 0 0.5rem;
}

.devtools-excerpt {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1rem;
}

.category-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.category-card-image img {
  height: 160px;
}

.category-card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-card-date {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.category-card h2 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.category-card p {
  font-size: 0.95rem;
  color: #444;
}

.btn-readmore {
 /*  font-size: 0.85rem;
  color: #0078D4;
  text-decoration: none;
  font-weight: 500; */
  margin-top: 1rem;
  display: inline-block;
  font-size: 0.85rem;
  color: #0078D4;
  text-decoration: none;
  font-weight: 500;
}


/****************************/
/****** PAGINA SINGOLA ******/
/****************************/
.page-wrapper {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.page-article h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.page-content {
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
  .page-wrapper {
    padding: 0 1rem;
  }

  .page-article h1 {
    font-size: 2rem;
  }

  .page-content {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .page-article h1 {
    font-size: 1.75rem;
  }

  .page-content {
    font-size: 0.95rem;
  }
}

/* PAGINA SU DI ME - BIO */
.author-name {
  font-size: 2rem;
  font-weight: 600;
  background: linear-gradient(90deg, #0078D4, #D83B01, #107C10, #5C2D91);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; /* fallback */
  color: transparent;
}

.author-wrapper {
  max-width: 960px;
  margin: 4rem auto;
  padding: 0 1rem;
  font-family: system-ui, sans-serif;
}
.author-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}
.author-avatar {
  flex-shrink: 0;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
}
.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.author-info {
  flex: 1;
}

.author-subtitle {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 1rem;
}
.author-bio {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

/* Titoli */
h1, h2, h3, h4, h5, h6 {
    /* color: #0078D4; */   /* -> BLU */ 
	color: #333333; /* -> GRIGIO SCURO */
    margin-bottom: 1rem;
}

/* SEZIONE COMMENTI */
.azure-comments {
  margin-top: 2rem;
  background-color: #f4f9fc;
  border: 1px solid #d2e4f2;
  border-radius: 6px;
  padding: 1.25rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.95rem;
  color: #333;
}

.azure-comments h3,
#reply-title {
  font-size: 1.2rem;
  margin-bottom: 15rem;
  color: #0078d4;
  font-weight: 500;
}

.comment-list {
  margin-bottom: 1.5rem;
}

.comment-body {
	 line-height: 1.55;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2eef7;
}

.comment-author {
  font-weight: 500;
  color: #1e1e1e;
  font-size: 0.95rem;
}

.comment-metadata {
  font-size: 0.75rem;
  color: #777;
}

.comment-content {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #222;
}

.comment-reply-link {
  font-size: 0.8rem;
  color: #0078d4;
  text-decoration: none;
}

.comment-reply-link:hover {
  text-decoration: underline;
}

#commentform input,
#commentform textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  border: 1px solid #c9def1;
  border-radius: 4px;
  font-size: 0.95rem;
  background-color: #fff;
}

#commentform input[type="submit"] {
  background-color: #0078d4;
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
}

#commentform input[type="submit"]:hover {
  background-color: #005a9e;
}

#toggle-comment-form {
  display: block;
  margin: 1.5rem auto;
  background-color: transparent;
  color: #0078d4;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #c2e0f4;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  max-width: 200px;
  text-align: center;
}

#toggle-comment-form:hover {
  background-color: #eaf3fb;
}




/* SEZIONE CENTRALE A TUTTA LARGHEZZA */
.section-fullwidth {
  padding: 0;
}

.section-fullwidth .image-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 8px; /* Arrotonda i bordi dell'immagine */
}

.section-fullwidth .image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.section-fullwidth .community-content {
  text-align: center;
  padding: 4rem 1rem;
}


/* BLOCCO CON IMMAGINE IN CARD E TESTO A LATO */
.devex-card-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.devex-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.devex-card img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 180px;
  border-radius: 8px;
  object-fit: cover;
}

.devex-card-text {
  max-width: 500px;
}

.devex-quote {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  color: #1a1a1a;
  margin: 0;
}

.devex-cite {
  font-size: 0.95rem;
  color: #666;
  display: block;
  margin-top: 0.5rem;
}



/* Card con ombra e bordo arrotondato */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-wide {
  flex: 1 1 100% !important;
}

.card:nth-child(odd) {
  background-color: #f9f9f9;
}
.card:nth-child(even) {
  background-color: #ffffff;
}

.news-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e2e2e2;
}


.news-image img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.news-content {
  flex: 1;
}

.news-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-category {
  font-weight: 600;
  color: #0078D4;
}

.news-dot {
  font-size: 1rem;
  line-height: 1;
}

.news-title {
  font-size: 1.1rem;
  margin: 0.25rem 0 0.5rem;
}

.news-excerpt {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0.5rem;
}

/* Pulsante primario con colori Microsoft e arrotondamento */
.btn-primary {
    background-color: #0078D4;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #005A9E;
    outline: none;
}

/* Form inputs arrotondati */
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #0078D4;
    box-shadow: 0 0 0 3px rgba(0,120,212,0.3);
    outline: none;
}




.meta-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: center;   /* centra verticale */
  align-items: center;       /* centra orizzontale */
  height: 100vh;             /* 100% altezza viewport */
  padding: 1rem;
}

/* HEADER */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  padding: 1rem 0;
  box-sizing: border-box;
  padding: 0.25rem 3.6rem;
  background-color: rgba(255,255,255,0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* LOGO */
.site-logo-img {
  max-width: 300px;
  width: 100%;
  max-height: 60px;
  height: auto;
  display: block;
}

/* Tablet e smartphone */
@media (max-width: 1024px) {
  .site-logo-img {
    max-width: 100px;
  }
}

@media (max-width: 768px) {
  .site-logo-img {
    max-width: 120px;
  }
}



/* MENU PRINCIPALE */
.menu {
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu li {
  position: relative;
}

.menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: #1e1e1e;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
  border-bottom: 2px solid transparent;
}

.menu li a:hover {
  color: #005A9E;
  background-color: #eaf4ff; /* azzurro leggero */
  cursor: pointer;
  /* border-bottom: 2px solid #005A9E; */
}

/* SOTTOMENU (2º livello) */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  padding: 0.5rem 0;
  border-radius: 6px;
  min-width: 200px;
  z-index: 1000;
  list-style: none;
}

/* Mostra il dropdown su hover */
.menu li:hover > .sub-menu {
  display: block;
}

/* Link nel dropdown */
.sub-menu li {
  position: relative;
  padding: 0;
}

.sub-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  line-height: 1.2;
  color: #1e1e1e;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.sub-menu li a:hover {
  background-color: #f0f4fb;
  color: #005A9E; 
  cursor: pointer;
}

/* SOTTOMENU del SOTTOMENU (3º livello) */
.sub-menu .sub-menu {
  top: 0;
  left: 100%;
  display: none;
  position: absolute;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  border-radius: 6px;
  min-width: 200px;
  z-index: 1001;
}

.sub-menu .sub-menu li a {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.sub-menu .sub-menu li a:hover {
  background-color: #f4faff; /* sfondo coerente e sottile */
  color: #005A9E;
  cursor: pointer;
}

.sub-menu li:hover > .sub-menu {
  display: block;
}

/* MOBILE MENU */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: center;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-end;
    display: none;
  }

  .site-nav.active {
    display: flex;
  }

  .menu {
    flex-direction: column;
    gap: 1rem;
  }

  .menu-toggle {
    display: block;
    margin-top: 1rem;
  }

  .sub-menu,
  .sub-menu .sub-menu {
    position: static;
    box-shadow: none;
    min-width: auto;
    background-color: transparent;
    padding: 0;
  }

  .sub-menu li a {
    padding-left: 1.5rem;
  }

  .sub-menu .sub-menu li a {
    padding-left: 2.5rem;
  }
}

@media (max-width: 992px) {
  .menu ul, .menu li {
    list-style: none !important;
  }
  .menu li {
    display: block !important;
  }
	 .menu li a {
    line-height: 1.5; /* o valore adatto al tuo tema */
  }
}

.menu .menu-rosso > a {
  color: rgba(255, 0, 0, 0.5) !important;
}

.menu .menu-verde > a {
  color: #009e44 !important;
}

.menu .menu-blu > a {
  color: #005A9E !important;
}

.menu .menu-divider {
  pointer-events: none; /* non cliccabile */
}

.menu .menu-divider > a {
  padding: 0;
  height: 1px;
  background: #ccc;
  display: block;
  margin: 8px 0;
  font-size: 0;
  line-height: 0;
}

/* ARTICOLI */
.ultimi-articoli .articoli-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.ultimi-articoli h2 {
  max-width: 1200px;
  margin: 0 auto 1rem auto;

}


/* Footer semplice */
.site-footer {
    background-color: #f3f6f9;
    padding: 2rem 1rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
    margin-top: 4rem;
}