/* ========================================
   Single Post Page Styles
   Vrtnarski svet - vrtnarskisvet.si
   ======================================== */

/* CSS Custom Properties */
:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c59;
    --light-green: #a8d5ba;
    --accent-red: #e74c3c;
    --accent-red-dark: #c0392b;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
}

  /* ========================================
     GeneratePress Layout Override
     Remove default sidebar space
     ======================================== */

  /* Make single post full width */
  body.single-post .site-content {
      display: block;
  }

  body.single-post #primary {
      width: 100%;
      max-width: 100%;
      margin: 0;
      padding: 0;
  }

  body.single-post .inside-article {
      padding: 0;
      max-width: 100%;
  }

  /* Remove default content area restrictions */
  body.single-post .site-content .content-area {
      width: 100%;
      float: none;
  }

  /* If using separate containers layout */
  body.single-post.separate-containers .inside-article {
      padding: 0;
  }

  /* Hide default sidebar on single posts (we have custom one) */
  body.single-post #right-sidebar,
  body.single-post #left-sidebar,
  body.single-post .widget-area {
      display: none;
  }

  /* Reset the single post wrapper to take full width */
  .single-post-wrapper {
      width: 100%;
      background-color: var(--light-gray);
  }

/* ========================================
   Post Header Section
   ======================================== */
.post-header {
    background: linear-gradient(rgba(45, 80, 22, 0.85), rgba(74, 124, 89, 0.85)),
                url('/wp-content/uploads/default-post-header.jpg');
    background-size: cover;
    background-position: center;
    padding: 10rem 0 5rem;
    color: var(--white);
    text-align: center;
    /* Full width - break out of container */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.post-header-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb .current {
    color: rgba(255, 255, 255, 0.7);
}

/* Category Badge */
.post-category-badge {
    display: inline-block;
    background: var(--accent-red);
    color: var(--white);
    padding: 0.6rem 1.8rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: background 0.3s, transform 0.3s;
}

.post-category-badge:hover {
    background: var(--accent-red-dark);
    color: var(--white);
    transform: translateY(-2px);
}

/* Post Title */
.post-header .post-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.25;
    font-weight: 700;
}

/* Post Meta */
.post-header .post-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.post-meta i {
    color: var(--light-green);
}

/* ========================================
   Main Content Layout
   ======================================== */
.single-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.single-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

/* ========================================
   Post Content
   ======================================== */
.post-content {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Featured Image */
.featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Post Body */
.post-body {
    padding: 2.5rem;
}

/* Post Excerpt */
.post-excerpt {
    font-size: 1.15rem;
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 10px;
    border-left: 4px solid var(--secondary-green);
    line-height: 1.7;
}

.post-excerpt p {
    margin: 0;
}

/* Entry Content - The post content */
.entry-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-dark);
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2 {
    color: var(--primary-green);
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--medium-gray);
    font-weight: 700;
}

.entry-content h3 {
    color: var(--secondary-green);
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.entry-content h4 {
    color: var(--primary-green);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.entry-content li strong {
    color: var(--primary-green);
}

.entry-content a {
    color: var(--secondary-green);
    text-decoration: underline;
    transition: color 0.3s;
}

.entry-content a:hover {
    color: var(--primary-green);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--light-gray);
    border-left: 4px solid var(--secondary-green);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--text-gray);
}

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

/* Highlight Box (use with custom class in editor) */
.wp-block-group.highlight-box,
.highlight-box {
    background: linear-gradient(135deg, var(--secondary-green), #65a572);
    color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.highlight-box h3,
.highlight-box h4 {
    color: var(--white);
    margin-top: 0;
    margin-bottom: 1rem;
}

.highlight-box p:last-child {
    margin-bottom: 0;
}

/* Tip Box (use with custom class in editor) */
.wp-block-group.tip-box,
.tip-box {
    background: #e8f5e8;
    border: 1px solid var(--secondary-green);
    border-radius: 10px;
    padding: 1.5rem;
    padding-left: 4rem;
    margin: 2rem 0;
    position: relative;
}

.tip-box::before {
    content: '\f0eb';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--secondary-green);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.tip-box h4 {
    color: var(--primary-green);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.tip-box p:last-child {
    margin-bottom: 0;
}

/* Image Gallery in Content */
.wp-block-gallery {
    margin: 2rem 0;
}

.wp-block-gallery .wp-block-image {
    border-radius: 10px;
    overflow: hidden;
}

.wp-block-gallery .wp-block-image img {
    transition: transform 0.3s ease;
}

.wp-block-gallery .wp-block-image:hover img {
    transform: scale(1.05);
}

/* Post Tags */
.post-tags {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.tags-label {
    color: var(--text-gray);
    font-weight: 600;
}

.tags-label i {
    margin-right: 0.3rem;
    color: var(--secondary-green);
}

.post-tags .tag {
    background: var(--light-gray);
    color: var(--text-gray);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.post-tags .tag:hover {
    background: var(--secondary-green);
    color: var(--white);
}

/* ========================================
   Author Box
   ======================================== */
.author-box {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin: 2.5rem 0;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--light-green);
}

.author-info {
    flex: 1;
}

.author-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.25rem;
}

.author-name {
    color: var(--primary-green);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.author-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.author-name a:hover {
    color: var(--secondary-green);
}

.author-bio {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 0.75rem;
}

.author-social a {
    width: 36px;
    height: 36px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-green);
    text-decoration: none;
    transition: all 0.3s;
}

.author-social a:hover {
    background: var(--secondary-green);
    color: var(--white);
}

/* ========================================
   Post Navigation
   ======================================== */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 2.5rem 0;
}

.nav-post {
    flex: 1;
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s, box-shadow 0.3s;
}

.nav-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.nav-post.empty {
    visibility: hidden;
}

.nav-post.prev {
    text-align: left;
}

.nav-post.next {
    text-align: right;
}

.nav-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: block;
}

.nav-label i {
    color: var(--secondary-green);
}

.nav-title {
    font-size: 1.1rem;
    color: var(--primary-green);
    font-weight: 600;
    line-height: 1.4;
    display: block;
}

/* ========================================
   Comments Section
   ======================================== */
.comments-section {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.comments-title {
    color: var(--primary-green);
    font-size: 1.6rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--medium-gray);
}

/* Comment List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--medium-gray);
}

.comment:last-child {
    border-bottom: none;
}

.comment-body {
    display: flex;
    gap: 1rem;
}

.comment .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 0.25rem;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.comment-text {
    color: var(--text-gray);
    line-height: 1.6;
}

.comment-text p {
    margin: 0;
}

.reply a {
    font-size: 0.9rem;
    color: var(--secondary-green);
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

.reply a:hover {
    color: var(--primary-green);
}

/* Nested Comments */
.children {
    margin-left: 2rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--medium-gray);
}

/* Comment Form */
.comment-form {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
}

.comment-form h4 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-green);
}

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

.submit-comment {
    background: var(--secondary-green);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-comment:hover {
    background: var(--primary-green);
}

/* ========================================
   Sidebar
   ======================================== */
.single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.widget-title {
    color: var(--primary-green);
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--secondary-green);
    font-weight: 700;
}

/* Related Posts */
.related-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--medium-gray);
}

.related-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-image:hover img {
    transform: scale(1.1);
}

.related-content h5 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.related-content h5 a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.3s;
}

.related-content h5 a:hover {
    color: var(--secondary-green);
}

.related-date {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Social Share */
.social-share {
    text-align: center;
}

.social-share p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: transform 0.3s, opacity 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.email { background: #dd4b39; }

/* Newsletter Widget - Same as archive */
.newsletter-form {
    text-align: center;
}

.newsletter-form p {
    color: var(--text-gray);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--medium-gray);
    border-radius: 25px;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--secondary-green);
}

.newsletter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--secondary-green);
    color: var(--white);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    font-size: 1rem;
}

.newsletter-btn:hover {
    background: var(--primary-green);
}

/* Categories Widget - Same as archive */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.categories-list a {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    transition: color 0.3s;
    border-bottom: 1px solid var(--light-gray);
}

.categories-list li:last-child a {
    border-bottom: none;
}

.categories-list a:hover {
    color: var(--secondary-green);
}

.post-count {
    background: var(--light-gray);
    color: var(--text-gray);
    padding: 0.2rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .single-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .single-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .post-header {
        padding: 8rem 0 3rem;
    }

    .post-header .post-title {
        font-size: 2rem;
    }

    .post-header .post-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-body {
        padding: 1.5rem;
    }

    .entry-content {
        font-size: 1rem;
    }

    .entry-content h2 {
        font-size: 1.5rem;
    }

    .entry-content h3 {
        font-size: 1.25rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-social {
        justify-content: center;
    }

    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-post.prev,
    .nav-post.next {
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .children {
        margin-left: 1rem;
        padding-left: 1rem;
    }

    .single-main-content {
        padding: 2rem 1rem;
    }
}