/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #333333;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --bg-color: #ffffff;
    --text-color: #333333;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}




body {
    font-family: 'Hanken Grotesk', sans-serif;
    font-size:16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

p, .blog-post-preview {
     -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.widget p, .widget-bio p {
    font-size:15px;
}


h1, h2, h3, h4, h5, h6, .blog-nav-title {
    font-family:'Fjalla One', sans-serif;
    font-weight:400;
}

h4.sidebar-intro {
    text-align:center;
    font-size:20px;
}

.widget h3 {
    font-size:20px;
}

.blog-post-content h2 {
font-size: 24px;
margin-top:8px;
line-height:1.4;
}

.blog-nav-title {
    font-size:18px;
    font-weight:500;
}

.blog-post-featured-image .blog-post-image-overlay h1, 
.page-featured-image .blog-post-image-overlay h1,
.blog-feed h1 {
    font-size:28px;
}



.container {
    margin: 0 auto;
    width: 100%;
}

/* Navigation */
.navbar, .admin-navbar {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    padding: 15px 30px;
    position: relative;
    z-index: 1000;
}

.navbar .container, .admin-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-image {
    max-width:110px;
    height: auto;
    object-fit: contain;
}

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-menu:hover span {
    background-color: var(--primary-color);
}

.burger-menu-active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu-active span:nth-child(2) {
    opacity: 0;
}

.burger-menu-active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size:12px;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

.nav-menu li a {
  line-height:2.5;
  position:relative;
}

.nav-menu li a:after {
    position:absolute;
    bottom:-6px;
    left:0;
    content:"";
    height:2px;
    width:0;
    transition:width .5s;
    background-color:#3B0F09;
  }
  
  .nav-menu li a:hover:after {
    width:100%;
  }

/* Search Form */
.search-menu-item {
    margin-left: 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    width: 150px;
    transition: border-color 0.3s, width 0.3s;
    font-family:'Hanken Grotesk', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 200px;
}

.search-button {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: transform 0.3s;
}

.search-button:hover {
    transform: scale(1.1);
}

/* Search Results */
.search-results {
    margin-top: 2rem;
}

.search-section {
    margin-bottom: 3rem;
}

.search-section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom:25px;
}

/* Main Content */
main {
    flex: 1;
}

article {
    max-width:1200px;
    padding:0 30px 0 30px;
    margin:auto;
}

article img {
    width:100%;
    height:auto;
    border-radius:3px;
}

.blog-post {
    max-width:1000px;
    margin-top:30px;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Page Content */

.page-container {
    padding:30px 30px;
}
.page-content {
    max-width:1000px;
    margin:auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.page-featured-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background-color: #e9ecef;
}

/* .page-featured-image styles are now in the main featured image section below */

/* Front Page Styles */
.front-page-container {
    padding: 30px 30px;
    max-width: 1300px;
    margin: auto;
    width: 100%;
    box-sizing: border-box;
}

.front-page-description {
    width:80%;
    text-align:center;
    margin:auto;
    margin-top:30px;
}

.front-page-content {
    /* Add your custom front page styles here */
}

.front-page-header {
    margin-bottom: 2rem;
}

.front-page-header h1 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.front-page-featured-image {
    width: 100%;
    min-height: 400px;
    max-height: 400px;
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.front-page-markdown-content {
    line-height: 1.8;
    margin: auto;
}

.front-page-markdown-content h1,
.front-page-markdown-content h2,
.front-page-markdown-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.front-page-markdown-content h1 {
    font-size: 2rem;
    padding-bottom: 0.5rem;
}

.front-page-markdown-content h2 {
    font-size: 1.5rem;
}

.front-page-markdown-content h3 {
    font-size: 1.25rem;
}

.front-page-markdown-content p {
    margin-bottom: 1rem;
}

/* Remove margin from paragraphs that contain images to prevent double spacing */
.front-page-markdown-content p:has(img) {
    margin-bottom: 0;
}

/* Images in paragraphs get consistent spacing */
.front-page-markdown-content p img {
    margin-bottom: 1rem;
    display: block;
}

/* Prevent extra spacing when figure follows paragraph with images */
.front-page-markdown-content p:has(img) + figure {
    margin-top: 0;
}

.front-page-markdown-content ul,
.front-page-markdown-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.front-page-markdown-content li {
    margin-bottom: 0.5rem;
}

.front-page-markdown-content code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.front-page-markdown-content pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.front-page-markdown-content pre code {
    background: none;
    padding: 0;
}

.front-page-markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    color: #666;
    font-style: italic;
}

.front-page-markdown-content a {
    color: #C0451C;
    text-decoration: none;
}

.front-page-markdown-content a:hover {
    text-decoration: underline;
}

/* Promoted Pages Grid */
.promoted-pages-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem 0;
    width: 100%;
    box-sizing: border-box;
}

.promoted-page-box {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0; /* Prevents grid items from overflowing */
    box-sizing: border-box;
}

.promoted-page-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.promoted-page-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.promoted-page-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promoted-page-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.promoted-page-box:hover .promoted-page-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
}

.promoted-page-button {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 10px 20px;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
   /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);*/
}

.promoted-page-button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
   /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);*/
}

.markdown-content {
    line-height: 1.8;
    margin:auto;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.markdown-content h1 {
    font-size: 28px;
    padding-bottom: 0.5rem;
}

.markdown-content h2 {
    font-size: 26px;
}

.markdown-content h3 {
    font-size: 24px;
}

.markdown-content h4 {
    font-size:22px;
}

.markdown-content p {
    margin-bottom: 20px;
}

/* Remove margin from paragraphs that contain images to prevent double spacing */
.markdown-content p:has(img) {
    margin-bottom: 0;
}

/* Images in paragraphs get consistent spacing */
.markdown-content p img {
    margin-bottom: 20px;
    display: block;
}

/* Prevent extra spacing when figure follows paragraph with images */
.markdown-content p:has(img) + figure {
    margin-top: 0;
}



.markdown-content ul, .markdown-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.markdown-content li {
    font-weight:normal;
}

.markdown-content code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    color: #666;
    font-style: italic;
}

.markdown-content a, .widget p a {
    color: #C0451C;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

/* Tasting notes block*/

.tasting-notes {
    background-size:cover;
    background-position:50% 70%;
    padding:25px;
    margin-bottom:25px;
}

.tasting-notes-block {
    background:rgba(0, 0, 0, 0.7);
    padding:12px 25px;
    color:#fff;
}

.tasting-notes h4, .tasting-notes h5 {
    color:#fff;
}

.tasting-notes h5 {
    font-size:18px;
}

/* Page List */
.page-list {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.page-list h1 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.description {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.page-list-items {
    list-style: none;
}

.page-list-items li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.page-list-items a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-list-items h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-list-items .preview {
    color: var(--secondary-color);
}

/* Admin Styles */
.admin-body {
    background-color: #f5f5f5;
}

.admin-container {
    padding: 2rem 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-align: center;
    font-family:'Hanken Grotesk', sans-serif;
    text-transform:uppercase;
    letter-spacing: 2px;
    font-size:11px;
}


button a {
    color:#fff;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size:11px;
}


.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-view {
    background-color: #17a2b8;
    color: white;
}

.btn-edit {
    background-color: #ffc107;
    color: #333;
}

.btn-delete {
    background-color: var(--danger-color);
    color: white;
}

.btn-view:hover, .btn-edit:hover, .btn-delete:hover {
    opacity: 0.9;
}

/* Admin Table */
.admin-table {
    width: 100%;
    background: var(--bg-color);
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table thead {
    background-color: var(--primary-color);
    color: white;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.admin-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background-color: #f8f9fa;
}

.admin-table .preview {
    color: var(--secondary-color);
    font-size: 0.9rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
}

.admin-table code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Forms */
.page-form {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="color"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input[type="color"] {
    width: 100px;
    height: 40px;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    font-family: 'Hanken Grotesk', sans-serif;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Empty State */
.empty-state {
    background: var(--bg-color);
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--secondary-color);
}

.empty-state a {
    color: var(--primary-color);
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--bg-color);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--secondary-color);
    font-size:14px;
}

.footer p {
    
    font-size:12px;
}

.footer-nav {
    margin-bottom:20px;
}
.footer-nav a {
    margin:12px 4px 12px 4px;
    color:#444;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size:11px;
    text-decoration: none;
}

/* Blog Styles */
.blog-feed {
    padding: 40px 30px 30px 30px;
    width:96%;
   max-width:1450px;
   margin:auto;
}

.blog-description {
    margin:auto;
    text-align:center;
    font-style:italic;
    font-size:17px;
    padding:0 0 40px 0;
    max-width:80%;
}

.two-columns {
display:flex;
align-items: flex-start;
gap: 2rem;
}

.content-container {
width:75%;
}



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


.search-pages, .search-posts {
   
}

.search-section .blog-posts {
    width:100%;
        display:grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 2rem;
}

.sidebar {
    width:25%;
    margin:0 12px 0 12px;
}

.widget-bio {
    margin-bottom:25px;
    text-align:center;
}

.widget-bio p {
    padding:20px 20px 25px 20px;
    text-align:left;
}

.widget h3, .widget-bio h3 {
    text-align:center;
}

.widget {
    text-align:center;
    background:#f0f0f0cc;
    padding:20px 20px 25px 20px;
}


.widget p {
    text-align:center;
    margin:12px 0 20px 0;
}

.widget blockquote p {
    font-size:17px;
    font-weight:bold;
    font-style:italic;
    color:#222;
}

.widget blockquote cite {
    font-size:14px;
    letter-spacing: 0;
    color:#333;
}

.widget-bio img {
    width:70%;
    height:auto;
    border-radius:100%;
    margin:auto;
    padding:12px;
}

.widget-bio p,
.widget p {
    text-align:center;
}


.blog-feed h1 {
    margin-bottom: 2rem;
    color: var(--primary-color);
}



.blog-post-card {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
   
}

.search-section .blog-post-card {
    width:100%;
}

.blog-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.blog-post-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #e9ecef;
    background-size:cover;
    background-position:50% 60%;
}



.blog-post-card .blog-post-content {
    padding:25px;
    text-align:center;
}

.blog-post-card .blog-post-categories {
    display:inline;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.blog-post-content h2 {
margin-top:8px;
line-height:1.4;
}

.blog-post-content h2 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-post-content h2 a:hover {
    color: #444;
    text-decoration: underline;
}

.search-pages .blog-post-content h2 {
margin-top:8px;
margin-bottom:15px;
line-height:1.4;
}

.blog-post-meta {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    
}

.blog-post-meta time {
    font-style: normal;
    letter-spacing:2px;
    text-transform:uppercase;
    font-size:9px;
}

.blog-post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.blog-post .blog-post-categories {
justify-content: center;
}

.blog-post-category {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.blog-post-card .blog-post-category a {
    
}

.blog-post-category a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
    padding:2px 8px;
    border-radius: 50px;
    border:1px solid #999;
    display: inline-block;
}

.blog-post-category a:hover {
    color:#444;
}

.blog-post-preview {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align:left;
}

.read-more {
    display: inline-block;
    background:var(--primary-color);
    color:#fff;
    padding:6px 12px;
    border-radius:3px;
    text-decoration: none;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size:11px;
}

.read-more:hover {
    text-decoration: underline;
}



/* Single Blog Post */
/*.blog-post {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}*/

figure {
    margin-bottom: 20px;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
    min-width: 0; /* Allow items to shrink below minmax */
    display: flex;
    flex-direction: column;
}

/* Remove aspect-ratio when caption is present */
.gallery-item:has(figcaption) {
    aspect-ratio: unset;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

/* When caption exists, image should maintain aspect ratio */
.gallery-item:has(figcaption) img {
    aspect-ratio: 4/3;
    height: auto;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery item captions */
.gallery-item figcaption {
    font-size: 14px;
    color: #999;
    text-align: center;
    padding: 0.5rem;
    margin-top: 0;
}

/* Ensure galleries with few items still fill width */
.photo-gallery:has(.gallery-item:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
}

.photo-gallery:has(.gallery-item:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

/* Responsive gallery - fewer columns on smaller screens */
@media (max-width: 767px) {
    .photo-gallery {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.75rem;
    }

    .photo-gallery:has(.gallery-item:nth-child(2):last-child) {
    grid-template-columns: repeat(1, 1fr);
}

.photo-gallery:has(.gallery-item:nth-child(3):last-child) {
    grid-template-columns: repeat(1, 1fr);
}
}

@media (max-width: 480px) {
    .photo-gallery {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.5rem;
    }

       .photo-gallery:has(.gallery-item:nth-child(2):last-child) {
    grid-template-columns: repeat(1, 1fr);
}

.photo-gallery:has(.gallery-item:nth-child(3):last-child) {
    grid-template-columns: repeat(1, 1fr);
}
}

figcaption {
    font-size:14px;
    color:#999;
    text-align:center;
}

.blog-post-header {
    margin-bottom: 30px;
    text-align: center;
}

.blog-post-header .blog-post-categories {
    justify-content: center;
}

.blog-post-header h1 {
    color: var(--primary-color);
    font-size: 34px;
}

.blog-post-featured-image,
.page-featured-image {
    width: 100%;
    min-height: 350px;
    max-height: 350px;
    overflow: hidden;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}

/* Overlay for single post and page featured images */
.blog-post-featured-image .blog-post-image-overlay,
.page-featured-image .blog-post-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    color: white;
    z-index: 2;
    text-align: center;
}

.blog-post-featured-image .blog-post-image-overlay .blog-post-categories,
.page-featured-image .blog-post-image-overlay .blog-post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.blog-post-featured-image .blog-post-image-overlay .blog-post-category a,
.page-featured-image .blog-post-image-overlay .blog-post-category a {
    color: white;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 50px;
    text-decoration: none;
    transition: background-color 0.3s;
    border: none;
}

.blog-post-featured-image .blog-post-image-overlay .blog-post-category a:hover,
.page-featured-image .blog-post-image-overlay .blog-post-category a:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
}

.blog-post-featured-image .blog-post-image-overlay h1,
.page-featured-image .blog-post-image-overlay h1 {
    margin: 0.5rem 0;
    line-height: 1.3;
    font-weight: 300;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.blog-post-featured-image .blog-post-image-overlay .blog-post-meta,
.page-featured-image .blog-post-image-overlay .blog-post-meta {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
}

.blog-post-featured-image .blog-post-image-overlay .blog-post-meta time,
.page-featured-image .blog-post-image-overlay .blog-post-meta time {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.blog-post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Blog Post Navigation */
.blog-post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin:auto;
    margin-top: 2rem;
    flex-wrap: wrap;
    max-width:1000px;
    padding:0 30px 0 30px;
}

.blog-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    max-width: 45%;
}

.blog-nav-link:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.blog-nav-link.blog-nav-disabled {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.blog-nav-previous {
    text-align: left;
}

.blog-nav-next {
    text-align: right;
    justify-content: flex-end;
}

.blog-nav-chevron {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    flex-shrink: 0;
}

.blog-nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.blog-nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;;
}

.back-to-link {
   padding: 30px 2rem 0 2rem;
    margin:auto;
    text-align:center;
    max-width:300px;
}


/********************************************************/
/* Page templates */

.about-section {
width:90%;
margin:auto;
display:grid;
 grid-template-columns: repeat(2, 1fr);
 gap:20px;
 margin-bottom:30px;
 margin-top:30px;
 align-items: start;   
}

.about-info {
position:relative;
    z-index:200;
    background:#eee;
padding:25px;
margin-right:-40px;
margin-top:40px;

}

.about-info p {
    margin-bottom:15px;
    font-size:15px;
}

.about-image {
    position:relative;
    z-index:80;
    background:#eee;
    background-image:url('/images/pages/roe-co-glass-fix.jpg');
    background-size:cover;
    background-position:50% 60%;
   height:450px;
}

@media (max-width: 1024px) {
    .about-section {
grid-template-columns: repeat(1, 1fr);
width:100%;
 }
    
    .about-info {
        margin-right:0;
        margin-bottom:15px;
    }
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

/* Medium screens (tablets) - full width blog cards */
@media (max-width: 1150px) {
    .blog-post-card {
        width: 100%;
    }
    
  
    
    .blog-posts {
        margin: 0 0 2rem 0;
    }

    .sidebar {
        width:25%;
        margin: 0 0 2rem 0;
    }
    
  .blog-posts {
   grid-template-columns: repeat(1, minmax(0, 1fr));

}
   
}

@media (max-width: 1000px) {
   .two-columns {
    flex-direction: column;
   } 
   
   .blog-post-card,
   .content-container, 
   .sidebar {
        width: 100%;
    }

    .blog-posts {
        margin: 0 0 2rem 0;
    }

    
    
  .blog-posts {
   grid-template-columns: repeat(1, minmax(0, 1fr));

}
   
}


@media (max-width: 900px) and (min-width: 769px) {
     /* Promoted pages full width on tablets */
    .promoted-pages-grid {
        grid-template-columns: 1fr !important;
    }

    .promoted-page-box {
        aspect-ratio: 16 / 9;
    }
}



.blog-nav-title {
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Responsive */
@media (max-width: 1000px) {
     .search-section .blog-posts {
   grid-template-columns: repeat(2, minmax(0, 1fr));

}
}


@media (max-width: 768px) {
    .navbar .container, .admin-navbar .container {
        position: relative;
    }

      .search-section .blog-posts {
   grid-template-columns: repeat(1, minmax(0, 1fr));

}
    
    /* Show burger menu on mobile */
    .burger-menu {
        display: flex;
    }
    
    /* Hide menu by default on mobile */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        margin-top: 1rem;
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }
    
    /* Show menu when active */
    .nav-menu-active {
        max-height: 500px;
        opacity: 1;
        padding: 1rem 0;
    }
    
    .nav-menu li {
        width: 100%;
        padding: 15px 20px;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
    }
    
    .nav-menu a:hover {
        color: var(--primary-color);
    }
    
    .search-menu-item {
        margin-left: 0;
        margin-top: 0;
        width: 100%;
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .search-form {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    
    .search-input {
        flex: 1;
        width: 100% !important;
        max-width: 100%;
    }
    
    .search-button {
        flex-shrink: 0;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-table {
        font-size: 0.875rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
    
    .admin-table .actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .blog-post-header h1 {
        font-size: 1.75rem;
    }
    
    .blog-post-image {
        height: 200px;
    }
    
    .blog-post-featured-image,
    .page-featured-image {
        max-height: 300px;
    }
    
    .blog-post-featured-image .blog-post-image-overlay,
    .page-featured-image .blog-post-image-overlay {
        padding: 1.5rem 1rem 1rem 1rem;
    }
    
    .blog-post-featured-image .blog-post-image-overlay h1,
    .page-featured-image .blog-post-image-overlay h1 {
        font-size: 1.5rem;
    }
    
    .blog-post-navigation {
        flex-direction: column;
    }
    
    .blog-nav-link {
        width: 100%;
        min-width:100%;
    }
    
    /* Responsive blog grid - single column on mobile */
    .blog-posts {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .blog-post-card {
        width: 100%;
    }
    
    .two-columns {
        flex-direction: column;
    }
    
    .blog-posts,
    .sidebar,
    .content-container {
        width: 100%;
        margin: 0;
    }


    
    /* Promoted pages full width on mobile */
    .promoted-pages-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .promoted-page-box {
        aspect-ratio: 16 / 9;
    }
}

/* Comments Section */
.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    max-width:1000px;
    margin:auto;
    padding:50px 30px 0 30px;
}

.comments-section btn {
    font-family:'Hanken Grotesk', sans-serif;
    text-transform:uppercase;
    letter-spacing: 2px;
    font-size:11px;
}

.comments-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align:center;
}

.comments-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.comments-list {
    margin-bottom: 3rem;
}

.comment {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    background:#f6f6f6;
}

.comment .comment-reply {
    padding:0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-author {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.comment-author a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.comment-author a:hover {
    color: #555;
    text-decoration: underline;
}

.comment-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-style: italic;
}

.comment-content {
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

/* Paragraph spacing in comments */
.comment-content p {
    margin: 0 0 0.5em 0;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Comment Actions */
.comment-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.comment-reply-btn {
    background: #888;
    border: 0;
    color: #fff;
    padding: 6px 8px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 8px;
    transition: all 0.3s;
    letter-spacing: 2px;
    text-transform: uppercase;

}

.comment-reply-btn:hover {
    background: #666;
    color: white;
    border:0;
}

/* Nested Comments (Replies) */
.comment-replies {
    margin-top: 1.5rem;
    margin-left: 15px;
}

.comment-reply {
    margin-bottom: 1rem;
   /* background: #f0f0f0;*/
    border-left:none;
}

.comment-reply .comment-replies {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left-color: #ccc;
}

/* Reply Form */
.comment-reply-form-container {
    margin-top: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

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

.comment-reply-form .form-group {
    margin-bottom: 0;
}

.comment-reply-form .btn {
    margin-right: 0.5rem;
}

.reply-message {
    margin-top: 1rem;
}

.no-comments {
    color: var(--secondary-color);
    font-style: italic;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Comment Form */
.comment-form-container {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group-checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.required {
    color: var(--danger-color);
}

.comment-message {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.comment-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.comment-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-form-container {
        padding: 1.5rem;
    }
    
    .form-group-checkbox {
        flex-direction: column;
    }
    
    /* Nested comments on mobile */
    .comment-replies {
        margin-left: 1rem;
        padding-left: 1rem;
    }
    
    .comment-reply-form-container {
        padding: 1rem;
    }
    
    /* Pagination on mobile */
    .pagination-links {
        flex-direction: column;
    }
    
    .pagination-link {
        width: 100%;
        justify-content: center;
    }
    
    .pagination-numbers {
        order: -1;
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.pagination-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-links span {
    letter-spacing: 2px;
    text-transform:uppercase;
    font-size:11px;
}

.pagination-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.pagination-link:hover:not(.pagination-disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-link.pagination-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--secondary-color);
}

.pagination-chevron {
    font-size: 1.2rem;
    line-height: 1;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.scroll-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 999;
}

.scroll-to-top span {
    line-height: 1;
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #000;
}

@media (max-width: 768px) {
    .scroll-to-top {
        right: 1.5rem;
        bottom: 1.5rem;
        width: 44px;
        height: 44px;
    }
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.pagination-number:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

.pagination-number.pagination-current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--secondary-color);
}

