/* =================================================
   GRIGLIA CORSI
================================================= */

.udemy-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  height: 100%;

}

.udemy-grid {
    width: 100%;
}
.entry-content {
    display: flex;
    flex-direction: column;
}


/* Tablet */
@media (max-width: 1024px) {
  .udemy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .udemy-grid {
    grid-template-columns: 1fr;
  }
}

/* =================================================
   CARD
================================================= */

.udemy-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid black;
  width: 80%;
}


/* =================================================
   THUMBNAIL
================================================= */

.udemy-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16/12;   /* ⬅️ più alta della classica 16:9 */
  overflow: hiddee;
  border-radius: 12px 12px 0 0;
}
.udemy-thumb {
  margin: 0;
  padding: 0;
  line-height: 0;      /* ⬅️ QUESTO è il punto chiave */
}



.udemy-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.udemy-thumb img {
  display: block;     /* ⬅️ elimina spazio inline */
  margin: 0;
}



/* =================================================
   CONTENUTO
================================================= */

.udemy-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.udemy-content {
  padding-top: 8px;   /* prima era troppo alto */
}
.udemy-content .udemy-category {
  display: inline-block;
  margin: 6px 0 2px;              /* ⬅️ meno spazio */
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #DC143C;
  background-color: rgba(124, 58, 237, 0.12);
  border-radius: 999px;
}
.udemy-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}



.udemy-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #000;
}

.udemy-description {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: 16px;

  /* Limite a 3 righe */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =================================================
   BOTTONE
================================================= */

.udemy-card .udemy-btn {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 14px 16px;
  background: #DC143C;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  line-height: 0.4;
  box-sizing: border-box;
}
.udemy-btn {
  height: 50px;
}



.udemy-btn:hover {
  background: #000;
}
/* RESET STILI TEMA DENTRO LE CARD */
.udemy-card h1,
.udemy-card h2,
.udemy-card h3,
.udemy-card p {
  margin: 0;
}

.udemy-card h3 {
  margin-bottom: 8px;
}

.udemy-card p {
  margin-bottom: 16px;
}
.udemy-card {
  align-self: stretch;
}

.udemy-content {
  justify-content: flex-start;
}

.udemy-title {
  margin: 4px 0 6px;
}

.udemy-content p {
  margin: 0 0 12px;
}
.udemy-content {
  padding: 14px 16px 16px;
}
/* =================================================
   HERO CORSO
================================================= */

.course-hero {
  background: #DC143C;
  border: 3px solid black;
  border-radius: 16px;
  padding: 48px 32px;
  color: #ffffff;
  margin-bottom: 40px;
  margin: 80px 80px;
}

.course-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

.course-hero p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  opacity: 0.95;
}

/* =================================================
   LAYOUT PAGINA CORSO
================================================= */

.course-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .course-layout {
    grid-template-columns: 1fr;
  }
}

/* =================================================
   CONTENUTO PRINCIPALE (SEO)
================================================= */

.course-content {
  font-size: 1rem;
  line-height: 1.65;
}

.course-content h2 {
  margin: 40px 0 12px;
  font-size: 1.4rem;
  font-weight: 700;
}

.course-content h3 {
  margin: 32px 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.course-content p {
  margin: 0 0 18px;
}

.course-content ul {
  margin: 0 0 24px;
  padding-left: 20px;
}

.course-content li {
  margin-bottom: 8px;
}

/* =================================================
   SIDEBAR (CONVERSIONE)
================================================= */

.course-sidebar {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  top: 24px;
  margin: 80;
}

@media (max-width: 900px) {
  .course-sidebar {
    position: static;
    margin-top: 32px;
  }
}

/* =================================================
   CTA CORSO
================================================= */

.course-cta {
  display: block;
  width: 90%;
  padding: 14px 16px;
  background: #DC143C;
  color: #ffffff;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  transition: background 0.2s ease, transform 0.15s ease;
}

.course-cta:hover {
  background: #000;
  transform: translateY(-1px);
}

/* =================================================
   ELEMENTI SEO / INFO (OPZIONALI)
================================================= */

.course-meta {
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #555;
}

.course-meta strong {
  color: #111;
}

/* =================================================
   LINK INTERNI A CORSI CORRELATI
================================================= */

.course-related {
  margin-top: 48px;
}

.course-related h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.course-hero,
.course-layout {
  max-width: var(--wp--style--global--wide-size);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
/* ==============================
   Header landing corsi – SOLO TESTO
================================ */

body.single-udemy_course #headerimg h1,
body.single-udemy_course #headerimg .description {
  padding-left: 38px;
  padding-right: 38px;
}
body.single-udemy_course #footer p,
body.single-udemy_course #colophon p {
  padding-left: 32px;
  padding-right: 32px;
}
/* ===== HERO LANDING CORSO ===== */

body.single-udemy_course .course-hero {
  margin: 48px auto;
  max-width: 1200px;
}

body.single-udemy_course .course-hero h1 {
  margin-bottom: 12px;
}

body.single-udemy_course .course-hero p {
  max-width: 900px;
  line-height: 1.5;
}

/* ===== LAYOUT ===== */

body.single-udemy_course .course-layout {
  margin: 0 auto 64px;
  max-width: 1200px;
  padding: 0 24px;
}

/* ===== SIDEBAR ===== */

body.single-udemy_course .course-sidebar {
  padding: 32px;
}

body.single-udemy_course .course-sidebar-text {
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.4;
}
/* Testo descrittivo sopra il bottone */
body.single-udemy_course .course-sidebar-text {
  color: #222;
}
/* ===== HERO: TESTO ===== */

body.single-udemy_course .course-hero h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 12px;
}

body.single-udemy_course .course-hero p {
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 900px;
}
/* ===== SIDEBAR: TESTO ===== */

body.single-udemy_course .course-sidebar-text {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #222;
}
/* ===== SIDEBAR: BOTTONE ===== */

body.single-udemy_course .course-cta {
  padding: 10px 14px;
  font-size: 1rem;
  line-height: 1.2;
}
/* ===== GRIGLIA CORSI: BANNER ALLINEATI ===== */

.udemy-thumb {
  height: 180px;        /* puoi aumentare a 200 se vuoi */
  overflow: hidden;
}

.udemy-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ===== ALLINEAMENTO BOTTONI GRIGLIA ===== */

/* === CARD FLEX CORRETTA === */

.udemy-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* THUMB A ALTEZZA FISSA */
.udemy-thumb {
  display: block;
  height: 180px;        /* ← questo allinea i banner */
  overflow: hidden;
}

.udemy-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CONTENUTO ELASTICO */
.udemy-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* BOTTONE SEMPRE IN BASSO */
.udemy-btn {
  margin-top: auto;
}
/* === NORMALIZZA TESTO CARD === */

.udemy-content p {
  line-height: 1.45;
  max-height: 4.35em; /* ≈ 3 righe */
  overflow: hidden;
}
/* === ALLINEAMENTO CARD === */

.udemy-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.udemy-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.udemy-btn {
  margin-top: auto;
}
/* ===============================
   FILTRI CORSI UDEMY
   =============================== */

.udemy-filters {
    display: flex;items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.udemy-filters {
  align-items: center;
}


/* Input ricerca */
.udemy-search {
    flex: 1 1 260px;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid black;
    border-radius: 6px;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
height: 15px;

}

.udemy-search:focus {
    outline: none;
    border-color: #5624d0; /* viola Udemy-like */
    box-shadow: 0 0 0 2px rgba(86, 36, 208, 0.15);
}

/* Select categoria */
.udemy-category-filter {
    flex: 0 0 220px;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid black;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    
}

.udemy-category-filter:focus {
    outline: none;
    border-color: #5624d0;
    box-shadow: 0 0 0 2px rgba(86, 36, 208, 0.15);
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 640px) {
    .udemy-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .udemy-category-filter {
        width: 100%;
    }
}
/* ===============================
   PULSANTE "MOSTRA ALTRI"
   =============================== */

.udemy-load-more {
    display: block;
    margin: 40px auto 0;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #d41443; /* rosso coerente col CTA */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.25s ease,
                transform 0.2s ease,
                box-shadow 0.2s ease;
}

/* Hover */
.udemy-load-more:hover {
    background-color: #b8123a;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

/* Click */
.udemy-load-more:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

/* Focus (accessibilità) */
.udemy-load-more:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 20, 67, 0.35);
}

/* Nascondi se non necessario (JS gestisce lo stato) */
.udemy-load-more[style*="display: none"] {
    display: none !important;
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 480px) {
    .udemy-load-more {
        width: 100%;
        padding: 14px 0;
        font-size: 15px;
    }
}
/* ===============================
   BREADCRUMB CORSI / LMS
   =============================== */

.udemy-breadcrumb {
    margin: 20px 24px;

    font-size: 14px;
    color: #666;
}

.udemy-breadcrumb a {
    color: #5624d0;
    text-decoration: none;
    font-weight: 500;
}

.udemy-breadcrumb a:hover {
    text-decoration: underline;
}

.udemy-breadcrumb-sep {
    margin: 0 6px;
    color: #aaa;
}

.udemy-breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* ===============================
   CTA CONDIVISIONE CORSO
=============================== */

.course-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #dc143c;
  color: #dc143c;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}

.course-share-btn:hover {
  background: #dc143c;
  color: #fff;
}

.share-icon::before {
  content: "🔗";
  font-size: 1.5em;
}
.course-sidebar-thumb {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
}

.course-sidebar-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* ===============================
   CTA MOBILE STICKY – ACCEDI AL CORSO
   =============================== */

@media (max-width: 768px) {

  .course-sidebar {
    position: static;
    padding-bottom: 0;
  }

  .course-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    width: 100%;
    margin: 0;
    border-radius: 0;

    padding: 16px;
    font-size: 1.05rem;
    z-index: 9999;
  }

  /* Spazio per evitare che il contenuto finisca sotto la CTA */
  .course-layout {
    padding-bottom: 90px;
  }
}

