/*
Theme Name: vCard
Theme URI: https://art-template.ru/
Author: ArtTemplate (Converted by AI)
Author URI: https://art-template.ru/
Description: vCard WordPress Theme
Version: 1.0.0
Text Domain: vcard
*/

/* WordPress Core Styles & Alignment */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 100% !important;
    height: auto !important;
}
.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 100% !important;
    height: auto !important;
}
.aligncenter {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1.5rem;
    max-width: 100% !important;
    height: auto !important;
    text-align: center;
}
.alignnone {
    max-width: 100% !important;
    height: auto !important;
    margin-bottom: 1.5rem;
}
@media only screen and (max-width: 580px) {
    .alignleft,
    .alignright {
        float: none;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block;
    }
}

/* ==========================================================================
   Post & Page Content - Image & Media Overflow Prevention
   ========================================================================== */

/* Container word wrapping & clearfix */
.caption-post,
.entry-content,
.post-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.caption-post::after,
.entry-content::after,
.post-content::after {
    content: "";
    display: table;
    clear: both;
}

/* All media inside content must stay strictly within container */
.caption-post img,
.entry-content img,
.post-content img,
.caption-post figure,
.entry-content figure,
.post-content figure,
.caption-post .wp-block-image,
.entry-content .wp-block-image,
.post-content .wp-block-image,
.caption-post .wp-caption,
.entry-content .wp-caption,
.post-content .wp-caption,
.caption-post iframe,
.entry-content iframe,
.post-content iframe,
.caption-post video,
.entry-content video,
.post-content video,
.caption-post embed,
.entry-content embed,
.post-content embed,
.caption-post object,
.entry-content object,
.post-content object {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Image styling inside post content */
.caption-post img,
.entry-content img,
.post-content img {
    height: auto !important;
    border-radius: 12px;
}

/* Gutenberg block image & resized image fix */
.wp-block-image {
    max-width: 100% !important;
    margin-bottom: 1.5rem;
}
.wp-block-image img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.wp-block-image.is-resized {
    max-width: 100% !important;
}
.wp-block-image.is-resized img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}
.wp-block-image.aligncenter,
.wp-block-image.aligncenter img {
    margin-left: auto !important;
    margin-right: auto !important;
}
.wp-block-image.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
}
.wp-block-image.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.wp-block-image.alignwide,
.wp-block-image.alignfull {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Gutenberg Galleries */
.wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0;
    list-style: none;
    max-width: 100% !important;
    margin-bottom: 1.5rem;
}
.wp-block-gallery .wp-block-image {
    margin-bottom: 0;
    max-width: 100% !important;
    flex: 1 1 calc(50% - 1rem);
}
.wp-block-gallery .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Classic Editor Captions & Figures */
figure {
    max-width: 100% !important;
    margin: 0 auto 1.5rem auto;
}
figure img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
figcaption,
.wp-caption-text {
    font-size: 0.875rem;
    color: #8697A8;
    text-align: center;
    padding-top: 0.625rem;
    margin-bottom: 0;
    font-style: italic;
}
.wp-caption {
    max-width: 100% !important;
    margin-bottom: 1.5rem;
}
.wp-caption img,
.wp-caption img[class*="wp-image-"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100% !important;
    height: auto !important;
}

/* Blockquotes in content */
.caption-post blockquote,
.entry-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #304CFD;
    background-color: #F5F6F7;
    border-radius: 0 12px 12px 0;
    font-style: italic;
}
.caption-post blockquote p,
.entry-content blockquote p {
    margin-bottom: 0;
}

/* Tables in content */
.caption-post table,
.entry-content table {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}
.caption-post th,
.caption-post td,
.entry-content th,
.entry-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #E1E8ED;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Pagination Styles */
.navigation.pagination {
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
}
.navigation.pagination .nav-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #44566C;
    background-color: #F5F6F7;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.current {
    background-color: #304CFD;
    color: #ffffff;
}
.page-links {
    font-weight: 600;
}
.page-links a,
.page-links > span {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 4px;
    background-color: #F5F6F7;
    border-radius: 12px;
    color: #44566C;
    text-decoration: none;
}
.page-links > span.current {
    background-color: #304CFD;
    color: #ffffff;
}

/* Comment Box avatar fix */
.comment-box .avatar img {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* Contact Map Embed Styling */
.map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 13.3333333333px;
    display: block;
}
