/* --- Global Styles & Fonts --- */
:root {
    --maroon: #4d0000;
    --off-white: #FAF9F6;
    --dark-text: #333333;
    --light-text: #F5F5F5;
}

body {
    background-color: var(--maroon);
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--light-text);
    margin: 0;
    line-height: 1.6;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Times New Roman', Times, serif;
    margin-top: 0;
}

/* --- Site Header --- */
.site-header {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header h1 {
    font-family: 'Pinyon Script', cursive;
    font-size: 4.5em;
    color: var(--off-white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

/* --- Main Content Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.year-section {
    margin-bottom: 60px;
}

.year-section h2 {
    font-size: 2.5em;
    color: var(--off-white);
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- Wine Card Design --- */
.wine-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 40px;
    justify-items: center; 
}

.wine-card {
    background: var(--off-white);
    border-radius: 8px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: var(--dark-text);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 320px; 
}

.wine-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.card-image-container {
    /* CHANGED: New white background color */
    background-color: #FFFFFF; 
    padding: 20px;
}

.wine-card img {
    width: 100%;
    height: auto; 
    display: block; 
}

.card-info {
    padding: 20px;
    text-align: center;
}

.card-info h3 {
    font-size: 1.5em;
    margin: 0;
    color: var(--dark-text);
}

/* --- Individual Wine Page Layout --- */
.wine-page-content {
    background: var(--off-white);
    color: var(--dark-text);
    border-radius: 8px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.wine-page-content .label-image {
    max-width: 400px;
    width: 100%;
    margin-bottom: 20px;
}

.wine-page-content img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wine-page-content .details {
    max-width: 700px;
    width: 100%;
    text-align: left;
}

.wine-page-content h1 {
    color: var(--maroon);
    font-size: 3.0em;
    margin-bottom: 5px;
    text-align: center;
}

.wine-page-content .appellation {
    font-style: italic;
    color: #666;
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.1em;
}

.wine-page-content h2 {
    color: var(--maroon);
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: center;
}

.wine-page-content p, .wine-page-content ul {
    margin-bottom: 20px;
}

.wine-page-content ul {
    list-style: none;
    padding: 0;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.wine-page-content ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.back-button {
    display: inline-block;
    margin-top: 40px;
    text-decoration: none;
    color: var(--off-white);
    font-weight: bold;
    font-size: 1.1em;
    padding: 10px 20px;
    border: 2px solid var(--off-white);
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
}

.back-button:hover {
    background-color: var(--off-white);
    color: var(--maroon);
}

/* --- Site Footer --- */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Media Queries for Mobile Responsiveness --- */
@media (max-width: 768px) {
    .site-header h1 {
        font-size: 3.5em;
    }

    .wine-page-content h1 {
        font-size: 2.5em;
    }
}
