@font-face {
    font-family: 'eb_garamond08_regular';
    src: url('/fonts/ebgaramond08-regular-webfont.woff2') format('woff2'),
         url('/fonts/ebgaramond08-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;  /* ← Add this */
}

html {
  font-size: 16px; /* Base size for desktop */
  background-image:url("/images/stone-wall-repeating.webp");
}

body {
    margin: 0;
}

#wrapper {
    color: #222;
    max-width: 1280px;
    font-family: Arial, sans-serif;
    margin: 0 auto;
    padding: 0.8rem 3rem;
}

header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 2px solid #666;
    margin-bottom: 2rem;
}

header h1 {
    font-family: 'eb_garamond08_regular';
    font-size: 3rem;
    margin: 0 0 0.5rem 0;
}

header h2 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: normal;
}

article {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2rem 3rem;
    border-radius: 8px;
    margin: 2rem;
}

article p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0 2%;
}

.item-container {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 1.5rem;
    grid-template-rows: auto 1fr;
    background-color: RGBA(171, 138, 88, 0.4);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 2%;
    margin: 2rem 3%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.item-container:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.item-image {
    text-align: center;
}

.item-image img {
    margin: 0;
    max-width: 90%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.item-header {
    grid-column: 1 / span 2;
    text-align: center;
}

.item-header h2 {
    font-family: 'eb_garamond08_regular';
    font-size: 2rem;
    margin: 0 0 1rem 0;
}

.item-list ul {
    margin: 0;
    padding-left: 1.5rem;
    line-height: 1.8;
}

.item-list li {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    border-top: 2px solid #666;
}

footer p {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.6rem;
}

footer a {
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s ease;
}

footer a:hover {
    border-bottom: 2px solid #222;
}
footer a:focus {
    outline: 2px solid #222;
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    #wrapper {
        padding: 0.7rem 1.5rem;
    }

    header {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    header h2 {
        font-size: 1.3rem;
    }
    
    article {
        padding: 1.5rem 2rem;
        margin: 1rem;
    }
    
    article p {
        font-size: 1.1rem;
    }
    
    .item-container {
        grid-template-columns: 40% 60%;
        gap: 1rem;
        max-width: 750px;
        margin: 1.5rem 3rem;
    }
    
    .item-header h2 {
        font-size: 1.3rem;
    }
    
    .item-list li {
        font-size: 1.1rem;
    }
    
    footer {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    footer p {
        font-size: 1.3rem;
    }
}

/* Mobile landscape (640px and below) */
@media (max-width: 640px) {
    html {
        font-size: 15px;
    }

    #wrapper {
        padding: 0.5rem 0.7rem;
    }
    
    header {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header h2 {
        font-size: 1.1rem;
    }
    
    article {
        padding: 1rem 1.5rem;
        margin: 0.6rem;
    }
    
    article p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .item-container {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        max-width: 100%;
        margin: 1rem 2rem;
        padding: 1.5%;
    }
    
    .item-header {
        grid-column: 1;
    }
    
    .item-header h2 {
        font-size: 1.1rem;
    }
    
    .item-image img {
        max-width: 50%;
    }
    
    .item-list li {
        font-size: 1rem;
    }
    
    footer {
        padding: 1rem;
        margin-top: 1rem;
    }
    footer p {
        font-size: 1.1rem;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    #wrapper {
        padding: 0.4rem 0.5rem;
    }
    
    header {
        padding-bottom: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    header h2 {
        font-size: 0.95rem;
    }
    
    article {
        padding: 0.8rem 1rem;
        margin: 0.5rem;
    }
    
    article p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .item-container {
        margin: 0.8rem 1%;
        gap: 0.5rem;
        padding: 1%;
    }
    
    .item-header h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .item-image img {
        max-width: 70%;
    }
    
    .item-list li {
        font-size: 0.9rem;
    }
    
    footer {
        padding: 0.8rem;
        margin-top: 0.8rem;
    }

    footer p {
        font-size: 0.95rem;
    }
}
