/*
 Theme Name:   Aroma Expeditions Theme
 Theme URI:    https://aromaexpeditions.com
 Description:  A Custom Theme for GeneratePress 
 Author:       Sonia Zannoni
 Author URI:   https://aromaexpeditions.com
 Template:     generatepress
 Version:      1.0
*/

/* GeneratePress Site CSS */

/* Featured Post in Blog */
.featured-column.grid-100 {
    width: 100%;
}

.featured-column.grid-100:not(.has-post-thumbnail) .gb-grid-wrapper > .gb-grid-column:first-child {
    display: none;
}

/* Custom Post Navigation - Remove Empty Classes */
.featured-navigation .gb-grid-column:empty {
    flex: 0 1;
}

@media (min-width: 769px) {
    .featured-navigation .gb-grid-column:not(:empty) {
        flex: 1 0;
    }
}

/* Single Post Hero Image Responsive Controls */
@media (max-width: 1024px) and (min-width: 769px) {
    .page-hero-block:before {
        background-size: cover;
    }

    .featured-column,
    .featured-column img.wp-post-image {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .page-hero-block:before {
        background: none;
    }
}

/* Post Archives - Force Post Meta to Vertically Align Bottom */
.generate-columns-container .post > .gb-container,
.generate-columns-container .post > .gb-container > .gb-inside-container,
.post-summary > .gb-inside-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-summary {
    flex: 1;
}

.post-summary > .gb-inside-container > *:last-child {
    margin-top: auto;
}

/* Add Border Radius to Post Archive Images */
.generate-columns-container .dynamic-featured-image {
    border-radius: 4px;
}

/* Off-Canvas Slideout Menu Background Overlay */
#generate-slideout-menu:before {
    position: absolute;
    width: 100%;
    height: 100%;
    content: '';
    background-image: url('https://aromaexpeditions.com/wp-content/uploads/2024/07/aroma-expeditions-03.jpg');
    background-position: center center;
    background-size: cover;
    opacity: 0.3;
}

/* Center Navigation Menu for Desktop */
@media (min-width: 1025px) {
    .nav-float-right #site-navigation {
        margin-left: 0;
    }

    .main-navigation {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    #primary-menu {
        width: 100%;
    }
}

/* Sidebar and Widgets Styling */
.sidebar .widget,
.comments-area,
.container-widget {
    border-right: 2px solid rgba(0, 0, 0, 0.07);
    border-bottom: 2px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 0 10px rgba(232, 234, 237, 0.5);
}

/* Comments Area Padding for Separate Containers */
.separate-containers .comments-area {
    padding-top: 20px;
    padding-left: 40px;
    padding-right: 40px;
}

/* Limit comment section width for readability */
.comments-area {
    max-width: 75ch;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive max-width and consistent padding on mobile */
@media (max-width: 768px) {
    .comments-area {
        max-width: 100%;
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* Responsive Behavior for Blog Post Layout */
/* Mobile stacking and column reordering for post template layout */

@media screen and (max-width: 1240px) {
  .grid-post-template {
    display: grid;
    grid-template-columns: 1fr !important;
  }

  .post-content {
    order: 1;
    display: block;
    width: 100%;
    grid-column: auto !important;
  }

  .sidebar-content {
    order: 2;
    display: block;
    width: 100%;
    grid-column: auto !important;
  }
}

/* Column Placement for Post Content and Sidebar (Desktop) */

.grid-post-template .post-content {
  grid-column: 2 / 3;
  width: clamp(100%, 75ch, 75ch);
  max-width: 100%;
}

.grid-post-template .sidebar-content {
  grid-column: 3 / 4;
  width: 100%;
} 

/* Remove Bottom Margin on Last Paragraph */
.gb-container p:last-child:last-of-type,
.block-editor-block-list__layout .gb-container p:nth-last-child(2) {
    margin-bottom: 0px;
}
