:root {
  --h1-font-size: 1.5rem; /* Sovrascrive la variabile CSS */
}
h1 {
  font-size: var(--h1-font-size) !important;
}

/* Box per tutti gli articoli */
.blog-item,
.intro-article,
.leading-article,
.article {
  background: #f8f9fa !important;
  border: 2px solid #224faa !important;
  border-radius: 0.7rem !important;
  padding: 1.2em !important;
  margin-bottom: 1.5em !important;
  box-shadow: 0 2px 8px #0001 !important;
}

/* Titolo di tutti gli articoli */
.blog-item h2,
.blog-item .item-title a,
.blog-item .article-title,
.intro-article h2,
.intro-article .item-title a,
.intro-article .article-title,
.leading-article h2,
.leading-article .item-title a,
.leading-article .article-title,
.article h2,
.article .item-title a,
.article .article-title {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #161870 !important;
  margin-bottom: 10px !important;
  line-height: 1.2 !important;
}

/* Testo di tutti gli articoli */
.blog-item .article-content,
.blog-item .item-content,
.blog-item .introtext,
.blog-item .content,
.intro-article .article-content,
.intro-article .item-content,
.intro-article .introtext,
.intro-article .content,
.leading-article .article-content,
.leading-article .item-content,
.leading-article .introtext,
.leading-article .content,
.article .article-content,
.article .item-content,
.article .introtext,
.article .content {
  font-size: 0.93rem !important;
  color: #222 !important;
  line-height: 1.6 !important;
}

.blog-item:hover,
.intro-article:hover,
.leading-article:hover,
.article:hover {
  background: #e3e8ff !important; /* Colore di sfondo al passaggio mouse */
  transition: background 0.2s;
}

.vertical-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: #f5f5f5;
  border-right: 2px solid #224faa;
  box-shadow: 2px 0 8px #0001;
  padding: 1em 0.5em;
  z-index: 2000;
  flex-direction: column;
}

/* Mostra il menu verticale quando il main menu non è visibile */
.menu-hidden .vertical-menu {
  display: flex;
}

/* Forza il sottomenu a posizionarsi sotto la voce cliccata */
.sidebar-right .mod-menu > li > ul,
.sidebar-right .metismenu > li > ul {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 180px;
  z-index: 1000;
  background: #f5f5f5;
  border: 2px solid #224faa;
  border-radius: 0.5rem;
  padding: 1em;
  box-shadow: 0 2px 8px #0001;
  margin-top: 0.5em;
}

.newsflash-item {
  display: flex;
  align-items: flex-start;
  gap: 1em;
}

.newsflash-image {
  flex-shrink: 0;
  width: 250px !important;
  height: 200px !important;
  border-radius: 0.5em !important;
  box-shadow: 0 2px 8px #0001 !important;
  object-fit: cover !important;
  margin: 0 !important;
  display: block !important;
}

body {
  color: #22262a;
  background-color: transparent;
  margin: 1rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

/* Forza la dimensione e il font dei titoli articoli ovunque */
.item-title,
.item-title a,
.article-title,
h2.item-title,
h2.article-title {
    font-family: 'Arial', sans-serif !important;
    font-size: 1.5em !important;
    color: #336699 !important;
    font-weight: bold !important;
    margin-bottom: 10px !important;
}

/* Box azzurro per articolo singolo */
.com-content-article.item-page {
    background: #e0f0ff !important;   /* azzurro */
    border: 2px solid #224faa !important;
    border-radius: 0.7rem !important;
    padding: 1.5em !important;
    margin-bottom: 2em !important;
    box-shadow: 0 2px 8px #0001 !important;
}

/* Titolo rosso per articolo singolo */
.com-content-article.item-page h1,
.com-content-article.item-page h2 {
    color: #d90000 !important;   /* rosso */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: transparent;
    color: #1e2a2e;
    line-height: 1.5;
    padding: 2rem 1rem;
}

/* main article container - mimics Joomla article container */
.rabat-article {
    max-width: 1280px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s ease;
}

/* hero header with a beautiful panoramic style */
.hero-header {
    position: relative;
    background: linear-gradient(0deg, rgba(0,0,0,0.5), rgba(0,0,0,0.2)), url('https://placehold.co/1200x500/2c3e2f/f8f3e6?text=RABAT+-+Hassan+Tower+%26+Mausoleum') center/cover no-repeat;
    background-size: cover;
    background-position: center 35%;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 2rem 2.5rem;
}

/* fix hero with real photo of Hassan Tower & Mausoleum */
.hero-header {
    background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.25)), url('https://images.unsplash.com/photo-1598971861718-9d7c7b6ec9b2?w=1400&auto=format') center/cover no-repeat;
}

/* fallback background for unsplash load issues */
.hero-header h1, .hero-header p {
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.hero-text {
    max-width: 700px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    padding: 1.5rem 2rem;
    border-radius: 24px;
    border-left: 6px solid #d4af37;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.hero-text p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* article body */
.article-content {
    padding: 2.2rem 2.5rem;
}

.intro {
    font-size: 1.18rem;
    border-left: 4px solid #b8860b;
    background: #fefaf0;
    padding: 1rem 1.8rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    color: #2c3e2f;
}

h2 {
    font-size: 1.9rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 3px solid #e2c28b;
    display: inline-block;
    padding-bottom: 6px;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 1.5rem;
    margin: 1.2rem 0 0.8rem 0;
    font-weight: 600;
    color: #2c553c;
}

.grid-2cols {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem 0;
}

.info-card {
    flex: 1;
    min-width: 220px;
    background: #fefaf2;
    padding: 1.4rem;
    border-radius: 28px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.info-card i.emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.8rem;
}

.info-card h4 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 2rem 0;
    justify-content: center;
}

.gallery figure {
    flex: 1;
    min-width: 240px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 22px -8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.gallery figure:hover {
    transform: translateY(-6px);
}

.gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

figcaption {
    padding: 0.8rem 1rem;
    background: white;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3e3a;
    border-top: 1px solid #eee;
}

.map-container {
    background: #e9e3d7;
    border-radius: 28px;
    padding: 0.8rem;
    margin: 2rem 0;
}

.map-responsive {
    overflow: hidden;
    border-radius: 24px;
    height: 380px;
}

.map-responsive iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.fun-facts {
    background: #eef3ea;
    border-radius: 28px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.fun-facts ul {
    columns: 2;
    column-gap: 2rem;
    list-style-type: none;
    margin-top: 1rem;
}

.fun-facts li {
    margin-bottom: 0.7rem;
    padding-left: 1.6rem;
    position: relative;
}

.fun-facts li:before {
    content: "🇲🇦";
    position: absolute;
    left: 0;
    top: 0;
}

footer {
    background: #1e2a2a;
    color: #ddd;
    text-align: center;
    padding: 1.4rem;
    font-size: 0.85rem;
    margin-top: 1.2rem;
}

@media (max-width: 780px) {
    .article-content {
        padding: 1.3rem;
    }
    .hero-text h1 {
        font-size: 2rem;
    }
    .hero-header {
        min-height: 280px;
        padding: 1rem;
    }
    .grid-2cols {
        gap: 1rem;
    }
    .fun-facts ul {
        columns: 1;
    }
    h2 {
        font-size: 1.7rem;
    }
}

hr {
    margin: 1.8rem 0;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, #e2c28b, transparent);
}





/*--------------------------------------------------------------------------------*/














/* 2. FORZA L'HEADER CON GRADIENTE */
header.header.container-header,
.container-header,
.header {
    background-color: #006400 !important;
    background-image: linear-gradient(135deg, #006400 0%, #ff011b 100%) !important;
    box-shadow: inset 0 5px 5px rgba(0,0,0,0.03) !important;
}
/* 3. FORZA IL FOOTER */
footer.container-footer,
.container-footer,
footer {
     background-color: #ff011b !important;
    background-image: linear-gradient(135deg, #ff011b 0%, #006400 100%) !important;
}

/* 5. TESTO DEL MENU PRINCIPALE */
.container-nav .mod-menu a,
.grid-child.container-nav a {
    color: #ffffff !important;
}
.container-nav .mod-menu a:hover,
.grid-child.container-nav a:hover {
    color: #b70202 !important;
}

/* 6. PULSANTI PRINCIPALI */
.btn-primary,
.btn-primary:hover {
    background-color: #ba0000 !important;
    border-color: #b8fd37 !important;
    color: #006400 !important;
}

/* SFONDO DEL BOX MENU */
.grid-child.container-nav,
.container-nav {
    background-color: #0ab02387 !important;  /* Cambia con il colore che vuoi */
    border-radius: 8px !important;  /* Opzionale: angoli arrotondati */
    padding: 0.5rem 1rem !important;  /* Opzionale: spazio interno */
}

/* Sfondo del modulo menu nella sidebar */
.sidebar-right .mod-menu,
.sidebar-left .mod-menu,
.mod-menu {
    background-color: #006400 !important;
    border-radius: 8px !important;
    padding: 0.5rem !important;
}


/* Sfondo dei singoli item del menu laterale */
.sidebar-right .mod-menu li,
.sidebar-left .mod-menu li {
    background-color: transparent !important;
}

/* Testo del menu laterale */
.sidebar-right .mod-menu a,
.sidebar-left .mod-menu a {
    color: #ffffff !important;
}


/* Testo del menu laterale al passaggio mouse */
.sidebar-right .mod-menu a:hover,
.sidebar-left .mod-menu a:hover {
    color: #e23e3e !important;
    background-color: rgba(0,0,0,0.2) !important;
}



/* ============================================ */
/* SUBMENU - CORREZIONE PER CLICCABILITÀ       */
/* ============================================ */

/* Assicura che il submenu e sub sub menu siano collegati */
.sidebar-right .mod-menu li,
.sidebar-left .mod-menu li {
    position: relative !important;
}

/* Submenu PRIMO LIVELLO - a sinistra */
.sidebar-right .mod-menu li ul,
.sidebar-left .mod-menu li ul {
    position: absolute !important;
    top: 0 !important;
    right: 100% !important;
    left: auto !important;
    min-width: 180px !important;
    z-index: 1050 !important;
    display: none !important;
    background-color: #219829 !important;
    border-radius: 8px !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    margin-right: 0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    list-style: none !important;
}

/* Submenu SECONDO LIVELLO - sotto */
.sidebar-right .mod-menu li ul li,
.sidebar-left .mod-menu li ul li {
    position: relative !important;
}

.sidebar-right .mod-menu li ul li ul,
.sidebar-left .mod-menu li ul li ul {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    min-width: 180px !important;
    z-index: 1060 !important;
    display: none !important;
    background-color: #6def8d !important;
    border-radius: 8px !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Mostra il submenu al passaggio del mouse sulla voce */
.sidebar-right .mod-menu li:hover > ul,
.sidebar-left .mod-menu li:hover > ul {
    display: block !important;
}

/* Mostra il sub sub menu al passaggio del mouse sulla voce del submenu */
.sidebar-right .mod-menu li ul li:hover > ul,
.sidebar-left .mod-menu li ul li:hover > ul {
    display: block !important;
}

/* CREA UN "PONTE" TRA I MENU - impedisce che si chiudano */
.sidebar-right .mod-menu li ul,
.sidebar-left .mod-menu li ul,
.sidebar-right .mod-menu li ul li ul,
.sidebar-left .mod-menu li ul li ul {
    pointer-events: auto !important;
}

.sidebar-right .mod-menu li,
.sidebar-left .mod-menu li {
    pointer-events: auto !important;
}

/* Aumenta l'area sensibile al mouse per la transizione */
.sidebar-right .mod-menu li ul::before,
.sidebar-left .mod-menu li ul::before {
    content: '' !important;
    position: absolute !important;
    top: -5px !important;
    left: 0 !important;
    right: 0 !important;
    height: 10px !important;
    background: transparent !important;
}

.sidebar-right .mod-menu li ul li ul::before,
.sidebar-left .mod-menu li ul li ul::before {
    content: '' !important;
    position: absolute !important;
    top: -5px !important;
    left: 0 !important;
    right: 0 !important;
    height: 10px !important;
    background: transparent !important;
}

/* Ritardo nella chiusura - dà il tempo di spostare il mouse */
.sidebar-right .mod-menu li ul,
.sidebar-left .mod-menu li ul,
.sidebar-right .mod-menu li ul li ul,
.sidebar-left .mod-menu li ul li ul {
    transition-delay: 0.15s !important;
}




/* Box menu laterale - SENZA overflow hidden */
.sidebar-right.card {
    background-color: #006400 !important;
    border: 2px solid #b8fd37 !important;
    border-radius: 12px !important;
    /* RIMOSSO overflow: hidden !important; */
    margin-bottom: 1.5rem !important;
    position: relative !important;
    z-index: 1 !important;
    width: auto !important;           /* Larghezza automatica */
    max-width: 100% !important;       /* Non supera il contenitore */
    display: inline-block !important; /* Si adatta al contenuto */
    min-width: 180px !important;      /* Larghezza minima */
}
/* Titolo del menu - con border radius solo sopra */
.sidebar-right.card .card-header {
    background-color: #e4626f !important;
    color: #ffffff !important;
    padding: 12px 15px !important;
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    white-space: nowrap !important;    /* Titolo su una riga */
    /*white-space: normal !important;*/    /* Permette andare a capo */
    /*word-break: break-word !important;*/ /* Rompe le parole lunghe */
}

/* Corpo del menu */
.sidebar-right.card .card-body {
    background-color: #006400 !important;
    padding: 0 !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}
/* Contenitore del menu - larghezza adattata */
.sidebar-right.card .mod-menu {
    width: auto !important;
    display: inline-block !important;
    min-width: 100% !important;
}


/*-----------------------------------------------------------------------*/

/* 7. LINK DEL SITO 
a {
    color: #b8fd37 !important;
}

a:hover {
    color: #e4626f !important;
}
*/


.container-topbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem;
}

.container-topbar > * {
    flex: 0 1 auto;
}
.container-topbar .moduletable,
.container-topbar .card {
    flex: 0 1 auto;
    width: auto;
}

.container-topbar > div {
    display: inline-block !important;
    width: auto !important;
    margin-right: 1rem;
}

/*-------------------------------------------------------------*/

/* Sfondo del sottomenu */
.mod-menu__sub {
    background-color: #06cb13 !important;
    border: 1px solid #2993fd;
    border-radius: 4px;
    padding: 8px 0;
    margin-top: 0;
}

/* Colore dei link nel sottomenu */
.mod-menu__sub li a {
    color: #960303 !important;
    padding: 8px 20px;
    display: block;
    transition: all 0.3s ease;
}

/* Colore dei link al passaggio del mouse */
.mod-menu__sub li a:hover {
    background-color: #e9ecef !important;
    color: #0d6efd !important;
    text-decoration: none;
}
/* FORZA IL COLORE NERO PER I LINK DELLA DIRECTORY DEI PIATTI */
.dish-link {
    color: #b45a2a !important;
}

.dish-link:hover {
    color: #ffffff !important;
    background-color: #e67e22 !important;
}