/**
 * Content Pages CSS - Rigas Ziedi
 * Prefix: rz-content to avoid conflicts
 *
 * Design tokens 100% aligned with:
 *   - checkout2 (--c2-* variables)
 *   - cart (rz-cart-* classes)
 *   - success page
 *
 * Colors:
 *   Emerald:     #09614D
 *   Emerald-hov: #07503F
 *   Parchment:   #F5F4F0
 *   Dark text:   #05372C
 *   Body text:   #374151
 *   Muted:       #6B7280
 *   Border:      #E5E7EB
 *   Success-bg:  #E8F5EE
 *   Error:       #DC2626
 *
 * Typography:
 *   H1, H2:  'Playfair Display', Georgia, serif  (700)
 *   Body:    'Inter', -apple-system, sans-serif   (400/500/600/700)
 *
 * Radii: 12px sections, 8px images/inputs, 6px code
 * Shadow: 0 2px 8px rgba(0,0,0,0.04)
 */

/* ============================================
   CONTAINER
   ============================================ */
.rz-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   OVERRIDE CMS LEGACY STYLES
   Reset column widths, post cards, blog-post-text
   inside rz-content so content uses full width
   ============================================ */
.rz-content .col-lg-9,
.rz-content .col-md-8 {
    width: 100%;
    float: none;
    padding-left: 0;
    padding-right: 0;
}

.rz-content .blog-post-text {
    box-shadow: none;
    background: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.rz-content .post {
    max-width: none;
    box-shadow: none;
    background: none;
    margin: 0 0 24px 0;
}

.rz-content .post:hover {
    box-shadow: none;
}

.rz-content .page-title.opendoc {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #05372C;
    margin: 0 0 8px 0;
    padding: 0;
    border: none;
}

.rz-content .post-content_date,
.rz-content time {
    font-size: 13px;
    color: #6B7280;
    display: block;
    margin-bottom: 20px;
}

.rz-content .btn.btn_go-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #FFFFFF;
    background-image: none;
    color: #09614D;
    border: 2px solid #09614D;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-shadow: none;
    transition: all 0.15s;
    margin-top: 24px;
}

.rz-content .btn.btn_go-back:before {
    content: "";
    background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3IDEwIiBmaWxsPSJub25lIiBzdHJva2U9IiMwOTYxNEQiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwb2x5bGluZSBwb2ludHM9IjYsMSAxLDUgNiw5Ii8+PC9zdmc+") no-repeat center;
    background-size: 7px 10px;
    width: 7px;
    height: 10px;
    display: inline-block;
    margin-right: 0;
    position: static;
}

.rz-content .btn.btn_go-back:hover {
    background: #E8F5EE;
    background-image: none;
    color: #09614D;
    text-decoration: none;
    text-shadow: none;
}

/* ============================================
   SECTION CARD (optional wrapper inside content)
   ============================================ */
.rz-content__section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ============================================
   HEADINGS
   ============================================ */
.rz-content h1 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #05372C;
    margin: 0 0 16px 0;
}

.rz-content h2 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #05372C;
    margin: 32px 0 12px 0;
}

.rz-content h3 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: #05372C;
    margin: 24px 0 10px 0;
}

.rz-content h4 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #05372C;
    margin: 20px 0 8px 0;
}

.rz-content h5 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #374151;
    margin: 16px 0 6px 0;
}

.rz-content h6 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 6px 0;
}

/* First heading has no top margin */
.rz-content > h1:first-child,
.rz-content > h2:first-child,
.rz-content > h3:first-child,
.rz-content__section > h1:first-child,
.rz-content__section > h2:first-child,
.rz-content__section > h3:first-child {
    margin-top: 0;
}

/* Heading followed by heading - tighter spacing */
.rz-content h1 + h2,
.rz-content h2 + h3,
.rz-content h3 + h4 {
    margin-top: 8px;
}

/* ============================================
   PARAGRAPHS
   ============================================ */
.rz-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 16px 0;
}

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

/* ============================================
   LINKS
   ============================================ */
.rz-content a {
    color: #09614D;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.rz-content a:hover {
    color: #07503F;
    text-decoration: underline;
}

/* ============================================
   STRONG / EM / SMALL
   ============================================ */
.rz-content strong,
.rz-content b {
    font-weight: 600;
    color: #05372C;
}

.rz-content em,
.rz-content i {
    font-style: italic;
}

.rz-content small {
    font-size: 13px;
    color: #6B7280;
}

/* ============================================
   IMAGES
   ============================================ */
.rz-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 16px 0;
}

/* Float image left (CKEditor alignment) */
.rz-content img[style*="float: left"],
.rz-content img[style*="float:left"] {
    margin: 4px 20px 12px 0;
    border-radius: 8px;
}

/* Float image right (CKEditor alignment) */
.rz-content img[style*="float: right"],
.rz-content img[style*="float:right"] {
    margin: 4px 0 12px 20px;
    border-radius: 8px;
}

/* CKEditor centered image */
.rz-content p > img:only-child {
    margin: 20px auto;
}

/* ============================================
   UNORDERED LISTS
   ============================================ */
.rz-content ul {
    margin: 12px 0 16px 0;
    padding: 0 0 0 24px;
    list-style: none;
}

.rz-content ul > li {
    position: relative;
    padding-left: 8px;
    margin-bottom: 8px;
    line-height: 1.5;
    list-style: none;
    list-style-image: none;
}

.rz-content ul > li::before {
    content: '\2713';
    position: absolute;
    left: -20px;
    top: 0;
    font-size: 14px;
    font-weight: 700;
    color: #09614D;
}

/* Nested list */
.rz-content ul ul {
    margin: 6px 0 6px 0;
}

.rz-content ul ul > li::before {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
}

/* ============================================
   ORDERED LISTS
   ============================================ */
.rz-content ol {
    margin: 12px 0 16px 0;
    padding: 0 0 0 24px;
    counter-reset: rz-list;
    list-style: none;
}

.rz-content ol > li {
    position: relative;
    padding-left: 8px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.rz-content ol > li::before {
    content: counter(rz-list) '.';
    counter-increment: rz-list;
    position: absolute;
    left: -24px;
    top: 0;
    width: 20px;
    text-align: right;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #09614D;
}

/* Nested ordered list */
.rz-content ol ol {
    margin: 6px 0 6px 0;
}

/* ============================================
   TABLES
   ============================================ */
.rz-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
}

.rz-content table thead {
    border: none;
}

.rz-content table th {
    background: #09614D;
    color: #FFFFFF;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    padding: 12px 16px;
    letter-spacing: 0.3px;
}

.rz-content table td {
    padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB;
    color: #374151;
    vertical-align: top;
}

.rz-content table tbody tr:last-child td {
    border-bottom: none;
}

.rz-content table tbody tr:hover {
    background: #F5F4F0;
}

/* Responsive table */
@media (max-width: 600px) {
    .rz-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   BLOCKQUOTES
   ============================================ */
.rz-content blockquote {
    margin: 16px 0;
    padding: 16px 20px;
    border-left: 4px solid #09614D;
    background: #F5F4F0;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

.rz-content blockquote p {
    margin: 0 0 8px 0;
}

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

/* ============================================
   CODE / PRE
   ============================================ */
.rz-content code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 13px;
    background: #F5F4F0;
    padding: 2px 6px;
    border-radius: 4px;
    color: #05372C;
}

.rz-content pre {
    margin: 16px 0;
    padding: 16px 20px;
    background: #05372C;
    color: #F5F4F0;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
}

.rz-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
}

/* ============================================
   HORIZONTAL RULE
   ============================================ */
.rz-content hr {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 24px 0;
}

/* ============================================
   INFO / ALERT BOXES (optional utility classes)
   ============================================ */
.rz-content__info {
    padding: 16px 20px;
    background: #E8F5EE;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #05372C;
    margin: 16px 0;
}

.rz-content__warning {
    padding: 16px 20px;
    background: #FEF9E7;
    border-left: 4px solid #F59E0B;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin: 16px 0;
}

.rz-content__error {
    padding: 16px 20px;
    background: #FEF2F2;
    border-left: 4px solid #DC2626;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin: 16px 0;
}

/* ============================================
   BUTTONS (inline CTA within content)
   ============================================ */
.rz-content__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #09614D;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.rz-content__btn:hover {
    background: #07503F;
    color: #FFFFFF;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(9, 97, 77, 0.3);
}

.rz-content__btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(9, 97, 77, 0.2);
}

.rz-content__btn--secondary {
    background: #FFFFFF;
    color: #09614D;
    border: 2px solid #09614D;
}

.rz-content__btn--secondary:hover {
    background: #E8F5EE;
    color: #09614D;
}

/* ============================================
   SECTION TITLE (reusable like checkout2)
   ============================================ */
.rz-content__section-title {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #05372C;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

/* ============================================
   CONTACT INFO (reuse checkout2 pattern)
   ============================================ */
.rz-content__contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.rz-content__contacts a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .rz-content {
        padding: 16px 12px;
        font-size: 15px;
    }

    .rz-content__section {
        padding: 16px;
        border-radius: 10px;
    }

    .rz-content h1 {
        font-size: 24px;
    }

    .rz-content h2 {
        font-size: 20px;
        margin-top: 24px;
    }

    .rz-content h3 {
        font-size: 16px;
    }

    .rz-content img {
        border-radius: 6px;
    }

    /* Remove floats on mobile */
    .rz-content img[style*="float: left"],
    .rz-content img[style*="float:left"],
    .rz-content img[style*="float: right"],
    .rz-content img[style*="float:right"] {
        float: none !important;
        margin: 12px 0 !important;
        width: 100% !important;
    }

    .rz-content__btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
}

@media (max-width: 380px) {
    .rz-content {
        padding: 12px 8px;
    }

    .rz-content__section {
        padding: 14px 12px;
    }

    .rz-content h1 {
        font-size: 22px;
    }
}

/* ============================================
   GALLERY - uniform grid
   ============================================ */
.rz-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin: 32px 0;
}

.rz-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.rz-gallery img:hover {
    transform: scale(1.02);
}

/* ============================================
   CATEGORY GRID - subcategory thumbnails
   ============================================ */
.rz-catgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0 0 40px 0;
}

.rz-catgrid a {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    aspect-ratio: 4/3;
}

.rz-catgrid a:hover {
    text-decoration: none;
}

.rz-catgrid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    transition: transform 0.25s ease;
}

.rz-catgrid a:hover img {
    transform: scale(1.05);
}

.rz-catgrid span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

@media (max-width: 600px) {
    .rz-catgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rz-catgrid span {
        font-size: 14px;
        padding: 10px 12px;
    }
}
