/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Source Serif Pro', serif;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(41, 41, 41, 1);
    font-size: 20px;
    -webkit-font-smoothing: antialiased;
}

/* Header styles */
.blog-header {
    background-color: #ffffff;
    padding: 2rem 0;
    text-align: center;
}

.header-content h1 {
    font-family: 'Amatic SC', sans-serif;
    font-size: 5rem;
    letter-spacing: 0.07em;
    margin: 0;
    text-shadow: 7px 5px 7px rgba(0, 0, 0, 0.6);
}

.header-content .cook {
    color: #b87333;
    font-weight: 400;
}

.header-content .code {
    color: #606060;
    font-weight: 400;
}

.header-content .change {
    background: -webkit-linear-gradient(#606060, #b87333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 400;
}

.header-content p {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Navigation styles */
.main-menu {
    background-color: #4a4a4a;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.main-menu a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.main-menu a:hover {
    color: #e0e0e0;
}

/* Layout */
.posts-layout {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* Posts section */
.posts-section {
    width: 100%;
}

.wide-post h2, .column h2 {
    font-family: 'Amatic SC', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    margin: 1rem 0;
    color: #333;
    letter-spacing: 0.05em;
}

.wide-post {
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wide-post .article-content {
    font-size: 21px;
    line-height: 32px;
    letter-spacing: -0.003em;
    font-weight: 400;
    color: rgba(41, 41, 41, 1);
    margin-bottom: 2em;
    overflow: hidden;
}

/* Per l'immagine */
.wide-post .post-image {
    float: left;
    width: 40%;
    margin: 0 1.5em 1em 0;
    border-radius: 8px;
}

/* Per contenere i float */
.wide-post::after {
    content: '';
    display: table;
    clear: both;
}

.wide-post p, .column p {
    font-family: 'Source Serif Pro', serif;
    font-weight: 400;
    line-height: 32px;
    margin: 2em 0;
    color: rgba(41, 41, 41, 1);
    letter-spacing: -0.003em;
}

/* Immagini nei post più piccoli della homepage */
.column .post-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1rem 0;
}

.columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.column {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.column img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Post images */
.post-image-container {
    width: 100%;
    margin: 1rem 0;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.wide-post .post-image {
    max-width: 100%;
    margin: 1rem 0;
}

/* Sidebar */
.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.references h2{
    flex: 1;
    font-family: 'Dancing Script';
    font-size: 1.5rem;
    background: rgb(250, 231, 189);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 60vh;
    overflow-y: auto;
}

.references li {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
}

.instagram-feed {
    font-family: 'Dancing Script';
    font-size: 1.5rem;
    height: 400px;
    background: rgb(250, 231, 189);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#instagram-container {
    height: 350px;
    position: relative;
}

.instagram-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.instagram-item.active {
    opacity: 1;
}

.instagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .posts-layout {
        grid-template-columns: 1fr;
    }

    .columns {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 100%;
    }

    .main-menu ul {
        flex-direction: row;
        justify-content: space-around;
    }
}

/* Utility classes */
.read-more {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #ffffff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 1rem;
    border: 1px solid #333;
}

.read-more:hover {
    background-color: #f8f8f8;
}

.category-layout {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.category-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-list li {
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.archive-list li:last-child {
    border-bottom: none;
}

.post-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.post-date {
    color: #666;
    font-size: 0.9rem;
}

.post-excerpt {
    margin: 1rem 0;
}

.tagline {
    font-family: 'Source Serif Pro', serif;
    font-weight: 400;
    font-size: 18px;
    color: rgba(41, 41, 41, 0.9);
    line-height: 24px;
    letter-spacing: -0.003em;
}

.wide-post p a, .column p a {
    color: #1a8917;
    text-decoration: none;
    background-image: linear-gradient(transparent 0%, transparent calc(50% - 9px), rgba(26, 137, 23, 0.1) calc(50% - 9px), rgba(26, 137, 23, 0.1) 100%);
    background-size: 100% 200%;
    word-break: break-word;
    padding: 2px 0;
    transition: background-position 120ms ease-in-out 0s;
}

.wide-post p a:hover, .column p a:hover {
    background-position: 0px 100%;
}

@media (max-width: 576px) {
    .wide-post .post-image,
    .column .post-image,
    .post-content .post-image {
        max-height: 300px;  /* altezza ridotta per schermi molto piccoli */
    }
}

.footer {
    background: #4a4a4a;
    font-family: "Dancing Script", cursive;
    font-size: 30px;
    color: white;
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
  
}

/* Per il dropcap */
.dropcap {
    float: left;
    font-size: 5em;
    line-height: 0.8;
    padding-right: 0.2em;
    font-family: 'Source Serif Pro', serif;
}

.intro-text {
    display: block;
}

.intro-text p {
    margin: 0;
    padding-top: 0.5em;
}

.intro-text p:first-child {
    padding-top: 0;
}

/* Stili per il dropdown menu */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown > a {
    padding-right: 1.5rem !important;
}

.nav-dropdown .fa-chevron-down {
    font-size: 0.8em;
    margin-left: 0.3em;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    background-color: #4a4a4a;
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding-top: 10px;  /* Aggiunge spazio sopra il menu */
    margin-top: -10px;  /* Compensa il padding per mantenere la posizione */
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.nav-dropdown-content a {
    color: white;
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    display: block;
    border-radius: 4px;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
    font-size: 1.1rem;
}

.nav-dropdown-content a i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.nav-dropdown-content a:hover {
    background-color: #5a5a5a;
    padding-left: 1.5rem;
}

/* Freccia del dropdown */
.nav-dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #4a4a4a;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 20px;  /* Crea un'area cliccabile tra il link e il dropdown */
    background: transparent;
}