/* ==========================================================================
   Custom Theme Styles
   ========================================================================== */

/* Container Bootstrap Override */
.container {
    max-width: 1200px;
}

@media (max-width: 1200px) {
    .container {
        max-width: 970px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 750px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

/* Row/Column Utilities */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    width: 100%;
}

.col-12 {
    grid-column: 1 / -1;
}

.col-md-4 {
    grid-column: span 1;
}

.col-md-6 {
    grid-column: span 2;
}

.col-lg-3 {
    grid-column: span 1;
}

.col-lg-8 {
    grid-column: span 2;
}

.col-lg-4 {
    grid-column: span 1;
}

.mb-4 {
    margin-bottom: 30px;
}

.mb-5 {
    margin-bottom: 50px;
}

/* Custom Post Type Styling */
.post-article,
.page-article {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-article ul,
.page-article ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.post-article li,
.page-article li {
    margin-bottom: 8px;
    list-style-type: disc;
}

.post-article ol,
.page-article ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.post-article blockquote,
.page-article blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--text-light);
    font-style: italic;
}

.post-article code,
.page-article code {
    background: var(--background-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
}

.post-article pre,
.page-article pre {
    background: var(--background-light);
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 15px;
}

/* Comment Section Styling */
.comment-list {
    list-style: none;
    margin: 30px 0;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.comment-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.comment-content {
    margin-left: 60px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--text-dark);
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 10px;
}

.comment-body {
    background: var(--background-light);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.comment-body p {
    margin-bottom: 0;
}

.reply {
    margin-top: 15px;
}

.reply a {
    display: inline-block;
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.reply a:hover {
    background: var(--secondary-color);
    color: white;
}

/* Comment Form Styling */
.comment-form {
    margin-top: 40px;
    padding: 30px;
    background: var(--background-light);
    border-radius: 10px;
}

.comment-form-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.comment-form .form-submit {
    margin-top: 20px;
}

/* Bootstrap Grid Responsive */
@media (max-width: 768px) {
    .col-md-4 {
        grid-column: span 1;
    }

    .col-md-6 {
        grid-column: span 1;
    }

    .col-lg-8 {
        grid-column: span 1;
    }

    .col-lg-4 {
        grid-column: span 1;
    }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Link Styling in Content */
.post-article a,
.page-article a,
.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.post-article a:hover,
.page-article a:hover,
.post-content a:hover {
    color: var(--secondary-color);
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

thead {
    background: var(--primary-color);
    color: white;
}

th,
td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

tbody tr:nth-child(even) {
    background: var(--background-light);
}

tbody tr:hover {
    background: rgba(26, 71, 179, 0.05);
}

/* Breadcrumb Styling */
.breadcrumb {
    background: var(--background-light);
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 6px;
}

.breadcrumb-item {
    display: inline;
}

.breadcrumb-item::after {
    content: ' / ';
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-item a {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-light);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 100px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state-text {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Hover Effects */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Text Utilities */
.text-uppercase {
    text-transform: uppercase;
}

.text-capitalize {
    text-transform: capitalize;
}

.font-weight-bold {
    font-weight: bold;
}

.font-weight-light {
    font-weight: 300;
}

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-secondary {
    background-color: var(--secondary-color);
}

/* Spacing Utilities */
.pt-5 {
    padding-top: 50px;
}

.pb-5 {
    padding-bottom: 50px;
}

.px-5 {
    padding-left: 50px;
    padding-right: 50px;
}

.py-5 {
    padding-top: 50px;
    padding-bottom: 50px;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 30px 0;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .navigation,
    .comment-respond {
        display: none;
    }

    .post-article,
    .page-article {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
