/* Allegheny Cellars Winery - Main Stylesheet
   Theme: Woodsy / Rustic / Nature / Pennsylvania Wilds
   Accessibility & Layout Updated 2026
*/

* {
    box-sizing: border-box;
}

/* --- Base Styles --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, serif;
    background-color: #f4f1ea; /* Cream/Parchment feel */
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.container {
    max-width: 1170px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* --- Global Layout (Fixed Sidebar Issue) --- */
.content-wrapper {
    display: flex;
    flex-wrap: nowrap; /* Forces side-by-side */
    gap: 30px;
    margin-top: 20px;
    align-items: flex-start;
}

#main-content {
    /* calc(70% - 30px) leaves room for the 30px gap */
    flex: 0 0 calc(70% - 30px);
    min-width: 0;
}

aside {
    flex: 0 0 30%;
    min-width: 280px;
}

/* --- Typography & Headers --- */
#site-title a {
    color: #4a0404; /* Deep Wine Red */
    text-decoration: none;
    font-size: 36px;
    font-weight: bold;
}

#site-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.entry-title {
    color: #4a0404;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h2 {
    color: #4a0404;
    text-transform: uppercase;
    font-size: 1.4rem;
    margin-top: 30px;
}

/* --- Consolidated Parchment Hero Section --- */
#parchment-hero {
    position: relative;
    background-color: #f7f3e8; 
    padding: 40px 20px; 
    height: 380px; 
    text-align: center;
    border-bottom: 2px solid #e3decb;
    margin-top: 10px;
    overflow: hidden; 
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-v2 {
    position: absolute;
    inset: 0; 
    width: 100%;
    height: 100%;
    background-image: url('images/hero-bigfoot.png');
    background-size: contain; 
    background-position: center center; 
    background-repeat: no-repeat;
    opacity: 0.95;
    z-index: -1; 
    display: block !important;
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(247, 243, 232, 0.15); 
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.hero-title {
    font-family: Georgia, serif;
    font-size: 3.2rem; 
    color: #4a0404; 
    margin: 0 0 5px 0;
    font-weight: bold;
    text-transform: capitalize;
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
}

.hero-tagline {
    font-family: Georgia, serif;
    font-size: 1.3rem;
    color: #222;
    margin: 0;
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* --- Navigation --- */
nav#access {
    background: #222;
    margin-top: 10px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

nav ul li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
}

nav ul li a:hover {
    background: #4a0404;
}

/* --- Index Page: Retail Grid & Location Items --- */
.retail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.retail-column {
    flex: 1;
    min-width: 250px;
}

.retail-column ul {
    list-style: square;
    padding-left: 20px;
    font-size: 0.95rem;
}

.location-item {
    background: #fdfaf3;
    border: 1px solid #e3decb;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* --- Wine Page Jump Menu --- */
.wine-nav {
    margin: 20px 0;
    padding: 15px;
    background: #fdfaf3;
    border: 1px solid #e3decb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.jump-to {
    font-weight: bold;
    color: #4a0404;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.wine-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.wine-nav ul li a {
    display: inline-block;
    padding: 6px 15px;
    background: #fff;
    border: 1px solid #4a0404;
    color: #4a0404;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.wine-nav ul li a:hover {
    background: #4a0404;
    color: #fff;
}

/* --- Wine Grid Styling --- */
.wine-cat-block {
    scroll-margin-top: 30px; 
}

.category-divider {
    border-bottom: 2px solid #4a0404;
    color: #4a0404;
    padding-bottom: 10px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.6rem;
    margin-top: 40px;
}

.wine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.wine-card {
    display: flex;
    background: #fff;
    border: 1px solid #e3decb;
    border-radius: 6px;
    overflow: hidden;
    padding: 15px;
    align-items: center;
    position: relative;
}

.wine-card.out-of-stock {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.wine-img-wrap {
    flex: 0 0 80px;
    margin-right: 15px;
}

.wine-img-wrap img {
    width: 100%;
    height: auto;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.1));
}

.wine-body { flex: 1; }

.wine-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #4a0404;
    margin-bottom: 8px;
}

.wine-top h3 { margin: 0; color: #4a0404; font-size: 1.15rem; }

.sweet-tag { font-size: 0.7rem; text-transform: uppercase; color: #888; letter-spacing: 1px; }

.wine-desc { font-style: italic; font-size: 0.9rem; color: #555; margin-bottom: 10px; line-height: 1.3; }

.wine-badge {
    background: #fdf8e6;
    color: #856404;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: bold;
}

.wine-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #777;
}

.oos-notice {
    color: #a00;
    font-weight: bold;
    text-transform: uppercase;
}

/* --- Utilities --- */
.alignright { float: right; margin: 0 0 20px 20px; }
.alignleft { float: left; margin: 0 20px 20px 0; }
.clearfix::after { content: ""; clear: both; display: table; }
hr { border: 0; border-top: 1px solid #ddd; margin: 30px 0; }

/* --- Sidebar Items --- */
.sidebar-card, .sidebar-widget {
    background-color: #ffffff;
    border: 1px solid #e3decb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-facebook {
    display: block;
    background-color: #1877f2;
    color: #ffffff !important;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    margin-top: 10px;
}

.btn-directions {
    display: block;
    background-color: #4a5d23;
    color: #ffffff !important;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    border-top: 3px double #4a0404;
    font-size: 13px;
    color: #555;
}

/* --- Gallery Page Styles --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #000;
    height: 300px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    opacity: 0.8;
}

/* --- Awards Page Styles --- */
.featured-award-box {
    display: flex;
    gap: 30px;
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    align-items: center;
}

.award-img-wrap { flex: 0 0 300px; }
.award-img-wrap img { width: 100%; border-radius: 4px; }

/* --- Admin Styles --- */
.admin-section {
    background: #fdfaf3;
    padding: 20px;
    border: 1px solid #e3decb;
    border-radius: 8px;
    margin-bottom: 30px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

/* --- Accessibility: Skip Navigation Link --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: #4a0404;
    color: #ffffff !important;
    padding: 12px 20px;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 5px 5px;
    transition: top 0.2s ease-in-out;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #b2964d;
}

/* --- Global Focus States --- */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid #b2964d; 
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* --- Universal Mobile Responsiveness --- */
@media (max-width: 950px) {
    .content-wrapper { 
        flex-wrap: wrap; 
        flex-direction: column; 
    }
    #main-content, aside { 
        flex: 0 0 100%; 
        width: 100%;
    }
}

@media (max-width: 600px) {
    #parchment-hero { height: 300px; }
    .hero-title { font-size: 1.8rem; }
    .hero-image-v2 { 
        background-image: url('images/hero-bigfoot-mobile.webp'); 
        background-size: cover; 
    }
    .gallery-grid { grid-template-columns: 1fr; }
    .featured-award-box { flex-direction: column; text-align: center; }
}

#colophon a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

#colophon a:hover {
    color: #4a0404;
    text-decoration: underline;
}

.fa-universal-access {
    margin-right: 5px;
    font-size: 1.1rem;
    vertical-align: middle;
}

/* --- Event Calendar Buttons --- */
.event-link, .btn-calendar {
    display: inline-block;
    padding: 8px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.event-link {
    background-color: #4a0404; /* Deep Wine Red */
    color: #ffffff !important;
}

.btn-calendar {
    background-color: #f4f1ea; /* Parchment Cream */
    color: #4a0404 !important;
    border: 1px solid #4a0404;
}

.event-link:hover, .btn-calendar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-calendar:hover {
    background-color: #e3decb;
}

.event-actions {
    border-top: 1px solid #eee;
    padding-top: 12px;
}