/* =========================
   BASE / RESET
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffc9ec;
  color: #111827;
}

/* =========================
   LAYOUT GENERALE
========================= */
main {
  padding: 1.5rem 1rem 3rem;
}

/* Sezioni tool centrate e strette (mobile-first) */
.tool-section {
  max-width: 700px;
  margin: 2rem auto;
  padding: 1rem;
}

/* =========================
   HERO
========================= */
.hero {
  text-align:center ;
  padding: 3rem 1.5rem 1.5rem;
 /* background: radial-gradient(circle at top, #C4B5FD, #4C1D95);*/
  background-image: url("../img/hero.png");
  background-size: cover;
  color: #fff;
}


.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  margin: 0 auto 1.5rem;
  max-width: 480px;
  font-size: 1rem;
  line-height: 1.5;
  
}



.hero-cta {
  display: inline-block;
  margin: 0 auto;
  background: #FFFFFF;
  color: #4C1D95;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.hero-cta:hover {
  background: #F3E8FF;
  transform: translateY(-1px);
}


/* =========================
   NAV STICKY
========================= */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #dcb7ff;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

nav button {
  background: #EDE9FE;
  color: #4C1D95;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

nav button:hover {
  background: #C4B5FD;
}

/* =========================
   INPUT / BUTTON GENERICI
========================= */
input[type="file"],
input[type="number"],
input[type="text"],
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem;
  margin: 0.3rem 0 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid #D1D5DB;
  font-size: 0.95rem;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

button {
  font-family: inherit;
}

.tool-section button {
  background: #7C3AED;
  color: #FFFFFF;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.7rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.tool-section button:hover {
  background: #4C1D95;
}

/* =========================
   PREVIEW IMMAGINI
========================= */
#optimizePreview,
#faviconPreview,
#convertPreview,
#resizePreview,
#cropPreview {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* =========================
   AD SPACES
========================= */
.ad-space {
  background: #F3E8FF;
  border: 2px dashed #7C3AED;
  color: #4C1D95;
  text-align: center;
  padding: 1.2rem;
  margin: 1.5rem auto;
  border-radius: 1rem;
  font-weight: 600;
  max-width: 100%;
}

.ad-top,
.ad-bottom {
  max-width: 728px;
}

.ad-sidebar {
  max-width: 300px;
  display: none; /* mobile: nascosta */
}

.tool-section {
  display: none;
}

.tool-section.active {
  display: block;
}
/* =========================
   BTN guide
========================= */
.tool-guide-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: #6D28D9;
  color: #fff;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.tool-guide-btn:hover {
  background: #7C3AED;
}
/* =========================
   Article
========================= */
/* --- Layout generale delle guide --- */

.guides-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* --- Header della pagina Guide --- */

.guides-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.guides-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.guides-header p {
  max-width: 600px;
  margin: 0.5rem auto 0;
  opacity: 0.85;
  color: #e5e7eb;
}

/* --- Articoli --- */

.guide-article {
  background: #0f172a;
  border-radius: 1rem;
  padding: 1.8rem 1.6rem;
  margin-bottom: 1.8rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.guide-article h2 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #e5e7eb;
}

.guide-article h3 {
  font-size: 1.05rem;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
  color: #c7d2fe;
}

.guide-article p {
  margin: 0.35rem 0;
  line-height: 1.6;
  color: #e5e7eb;
}

.guide-article ul {
  margin: 0.4rem 0 0.8rem 1.2rem;
  padding: 0;
  color: #e5e7eb;
}

.guide-article li {
  margin: 0.2rem 0;
}

/* --- Tag categoria --- */

.guide-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  margin-bottom: 0.4rem;
}

.guide-tag span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #a5b4fc;
}

/* --- Link al tool --- */

.guide-tool-link {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #a5b4fc;
}

.guide-tool-link a {
  color: #c4b5fd;
  text-decoration: none;
  font-weight: 500;
}

.guide-tool-link a:hover {
  text-decoration: underline;
}

/* --- Pulsante nei tool (se lo usi anche qui) --- */

.tool-guide-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: #6D28D9;
  color: #fff;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.tool-guide-btn:hover {
  background: #7C3AED;
}

/* --- Responsive --- */

@media (max-width: 640px) {
  .guides-page {
    padding: 2rem 1.1rem 3rem;
  }

  .guide-article {
    padding: 1.4rem 1.2rem;
  }
}

   .tool-guide-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: #6D28D9;
  color: #fff;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.tool-guide-btn:hover {
  background: #7C3AED;
}





/* =========================
   FOOTER
========================= */
.footer {
  background: #4C1D95;
  color: #fff;
  padding: 3rem 1.5rem;
  margin-top: 4rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col.guides ul {
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
  column-gap: 1.5rem;
}

.footer-col.guides li {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0.3rem 0;
}


.footer-col li {
  margin: 0.35rem 0;
}

.footer-col a {
  color: #EDE9FE;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-copy {
  text-align: center;
  opacity: 0.8;
  font-size: 0.85rem;
}
/* Centrare contenuti nelle colonne */
.footer-col {
  text-align: center;
}

/* Bordo sinistro alle prime due colonne */
.footer-columns .footer-col:nth-child(1),
.footer-columns .footer-col:nth-child(2) {
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  padding-right: 1.5rem;
}

/* Evita bordo sulla prima colonna su mobile */
@media (max-width: 640px) {
  .footer-columns .footer-col:nth-child(1),
  .footer-columns .footer-col:nth-child(2) {
    border-right: none;
    padding-right: 0;
  }
}



/* =========================
   COOKIE BANNER
========================= */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1F2937;
  color: #FFFFFF;
  padding: 0.8rem 1rem;
  display: none; /* di default nascosto, JS lo mostra */
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  z-index: 9999;
  font-size: 0.85rem;
}

#cookie-banner p {
  margin: 0;
}

#cookie-banner a {
  color: #7C3AED;
  text-decoration: underline;
}

#cookie-accept {
  background: #7C3AED;
  color: #FFFFFF;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
}

#cookie-accept:hover {
  background: #4C1D95;
}


/* =========================
   CROPPER AVANZATO
========================= */
.crop-container {
  width: 100%;
  max-width: 600px;
  margin: 1rem auto;
  border-radius: 1rem;
  overflow: hidden;
  background: #F3E8FF;
  border: 2px solid #7C3AED;
}

.crop-presets,
.crop-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.crop-presets button,
.crop-controls button {
  background: #7C3AED;
  color: #fff;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.crop-presets button:hover,
.crop-controls button:hover {
  background: #4C1D95;
}

/* =========================
   PAGINA PRIVACY
========================= */
.privacy-page {
  max-width: 900px;
  margin: 2rem auto 4rem;
  padding: 0 1.2rem;
}

.privacy-page h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.privacy-page h2 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

.privacy-page p,
.privacy-page li {
  font-size: 0.95rem;
  line-height: 1.6;
}

.back-home {
  display: inline-block;
  margin: 0.5rem 0 1.5rem;
  color: #7C3AED;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.back-home:hover {
  text-decoration: underline;
  color: #4C1D95;
}

/* =========================
   MEDIA QUERY (TABLET / DESKTOP)
========================= */
@media (min-width: 768px) {
  .hero {
    padding: 4rem 2rem 3rem;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  main {
    padding: 2rem 2rem 4rem;
  }
}

@media (min-width: 1000px) {
  .ad-sidebar {
    display: block;
    float: right;
    margin-left: 1.5rem;
  }

  .tool-section {
    max-width: 800px;
  }
}
.tool-section {
  scroll-margin-top: 90px; /* spazio per la nav sticky */
}
.tool-section {
  display: none;
  
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tool-section.active .tool-divider {
  display: block;
 
  transform: translateY(0);
}

.tool-divider {
  display: none;
  width: 100%;
  max-width: 700px;
  margin: 3rem auto;
  border-bottom: 1px solid #E5E7EB;
  opacity: 0.7;
}
