/* ========================================
   Post Article Page Styles - Modern Design
   ======================================== */

/* Hero: unified .mzlat-hero — .article-hero / .pillar-hero are aliases */
.article-hero.mzlat-hero,
.pillar-hero.mzlat-hero {
    /* legacy hooks */
}

.services-section-inner .section-title-inner {
    margin-bottom: 1.5rem;
}

/* ========================================
   Article Content Section
   ======================================== */
.article-section {
    background: var(--bg-gray);
    padding: 4rem 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

.article-main-wrapper {
    min-width: 0;
}

.article-main {
    background: #fff;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

/* Article Content - تنسيق بسيط للعناوين فقط */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: inherit !important;
}

.article-content h1 {
    font-size: 2rem;
}

.article-content h2 {
    font-size: 1.75rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content h5 {
    font-size: 1.1rem;
}

.article-content h6 {
    font-size: 1rem;
}

/* Article Photos Section */
.article-photos-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.section-title-inner {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.section-title-inner .icon,
.section-title-inner i {
    color: var(--accent-color);
    flex-shrink: 0;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.photo-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.photo-card-image {
    display: block;
    position: relative;
    overflow: hidden;
}

.photo-card-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.photo-card-content {
    padding: 1.5rem;
}

.photo-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.8rem 0;
    transition: color 0.3s ease;
}

.photo-card-title-link {
    text-decoration: none;
}

.photo-card-title-link:hover .photo-card-title {
    color: var(--primary-color);
}

.photo-card-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Article Tags */
.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.article-tags h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-tags h4 .icon,
.article-tags h4 i {
    color: var(--accent-color);
    flex-shrink: 0;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    display: inline-block;
    background: var(--light-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.tag:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Article Share */
.article-share {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 12px;
}

.article-share h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-share h4 .icon,
.article-share h4 i {
    color: var(--accent-color);
    flex-shrink: 0;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.linkedin {
    background: #0077b5;
}

/* ========================================
   Article Sidebar
   ======================================== */
.article-sidebar {
    min-width: 0;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.widget-title .icon,
.widget-title i {
    color: var(--accent-color);
    flex-shrink: 0;
}

.widget-title-accent {
    color: var(--accent-color);
}

.widget-title-success {
    color: var(--success-color);
}

/* Sidebar Cards */
.sidebar-cards-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid var(--border-color);
}

.sidebar-card:hover {
    background: var(--primary-color);
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-card-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-card:hover .sidebar-card-number {
    background: #fff;
    color: var(--primary-color);
}

.sidebar-card-content {
    flex: 1;
    min-width: 0;
}

.sidebar-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-card:hover .sidebar-card-title {
    color: #fff;
}

.sidebar-card-date {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.3s ease;
}

.sidebar-card:hover .sidebar-card-date {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-card-arrow {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.sidebar-card:hover .sidebar-card-arrow {
    color: #fff;
    transform: translateX(-5px);
}

.sidebar-card-success {
    border-color: var(--success-color);
}

.sidebar-card-success:hover {
    background: var(--success-color);
}

.sidebar-card-success .sidebar-card-number {
    background: var(--success-color);
}

.sidebar-card-success:hover .sidebar-card-number {
    background: #fff;
    color: var(--success-color);
}

/* Popular Tags */
.popular-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.popular-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light-color);
    color: var(--text-color);
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.popular-tag:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.popular-tag span:first-child {
    font-weight: 600;
}

.tag-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.popular-tag:hover .tag-count {
    background: rgba(255, 255, 255, 0.3);
}

.pillar-hero .pillar-meta {
    /* moved to .mzlat-hero__meta */
}

/* ========================================
   Page Layout (pillar/page type - no sidebar)
   ======================================== */
.page-section {
    background: #f8fafc;
    padding: 3rem 0;
}

.page-main-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 2.25rem;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
    border: 1px solid #eef2f6;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.page-intro {
    margin: 0;
    padding: 1rem 1.15rem;
    background: #f1f5f9;
    border-right: 4px solid var(--primary-color, #2fb6b3);
    border-radius: 8px;
    color: #475569;
    font-size: 1rem;
    line-height: 1.85;
}

.page-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Table of Contents */
.page-toc {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.35rem 1.5rem;
    border-right: 4px solid var(--primary-color, #2fb6b3);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.page-toc-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color, #2c3e50);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e8ddd4;
}

.page-toc-header .icon {
    width: 18px;
    height: 18px;
    fill: var(--primary-color, #667eea);
}

.page-toc-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.toc-item {
    margin: 0;
}

.toc-h2 > .toc-link {
    font-size: 0.97rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
}

.toc-h3 > .toc-link {
    font-size: 0.9rem;
    font-weight: 400;
    padding: 0.3rem 0.75rem 0.3rem 1.75rem;
    color: #666;
}

.toc-link {
    display: block;
    text-decoration: none;
    color: #444;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.toc-link:hover,
.toc-link.active {
    background: #f0ebe5;
    color: var(--primary-color, #667eea);
    padding-right: 1.1rem;
}

.toc-link.active {
    font-weight: 700;
    border-right: 3px solid var(--primary-color, #667eea);
}

/* Page Article content inside card */
.page-main-card .article-content h2 {
    background: #faf6f2;
    border-right: 4px solid var(--primary-color, #667eea);
    padding: 0.6rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-top: 2.5rem;
}

.page-main-card .article-content h3 {
    color: #5a4a3a;
    border-bottom: 2px dashed #e8ddd4;
    padding-bottom: 0.4rem;
    margin-top: 2rem;
}

/* Responsive page layout */
@media (max-width: 767px) {
    .page-section {
        padding: 2rem 0;
    }

    .page-main-card {
        padding: 1.35rem 1.15rem;
        border-radius: 8px;
    }

    .page-toc {
        padding: 1rem 1.25rem;
    }

    .toc-h3 > .toc-link {
        padding-right: 1.25rem;
    }
}

/* ========================================
   Gallery Section (portfolioGrid)
   ======================================== */
#portfolioGrid {
    background: var(--bg-gray);
    padding: 4rem 0;
}

.galley-column {
    width: 100%;
}

.galley-column .row {
    margin: 0 -10px;
}

.galley-column .column {
    padding: 10px;
    margin-bottom: 20px;
}

.galley-column .image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
}

.galley-column .image:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.galley-column .image figure {
    margin: 0;
    position: relative;
    overflow: hidden;
}

.galley-column .image img,
.galley-column .image picture {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

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

.galley-column .image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(47, 182, 179, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 12px;
}

.galley-column .image:hover::before {
    opacity: 1;
}

/* Gallery zoom icon - now using SVG overlay */
.galley-column .image .gallery-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 3rem;
    height: 3rem;
    color: #fff;
    z-index: 2;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.galley-column .image:hover .gallery-zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

.galley-column .image-caption {
    background: rgba(47, 182, 179, 0.95);
    color: #fff;
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    border-radius: 0 0 12px 12px;
}

/* ========================================
   Responsive Design - Tablets
   ======================================== */
@media (max-width: 991px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-main {
        padding: 2rem;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .photo-card-image img {
        aspect-ratio: 4 / 3;
    }
    
    .galley-column .image img,
    .galley-column .image picture {
        aspect-ratio: 4 / 3;
    }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media (max-width: 767px) {
    .article-section {
        padding: 2rem 0;
    }
    
    .article-main {
        padding: 1.5rem;
        border-radius: 8px;
    }
    
    .article-photos-section {
        margin-top: 2rem;
        padding-top: 2rem;
    }
    
    .section-title-inner {
        font-size: 1.4rem;
    }
    
    .photos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .photo-card-image img {
        aspect-ratio: 4 / 3;
    }
    
    .photo-card-content {
        padding: 1rem;
    }
    
    .article-tags {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .article-share {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .share-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
    
    .widget-title {
        font-size: 1.1rem;
    }
    
    .sidebar-card {
        padding: 0.8rem;
    }
    
    .sidebar-card-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .sidebar-card-title {
        font-size: 0.95rem;
    }
    
    .popular-tag {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
    
    #portfolioGrid {
        padding: 2rem 0;
    }
    
    .galley-column .column {
        padding: 8px;
        margin-bottom: 15px;
    }
    
    .galley-column .image {
        border-radius: 8px;
    }
    
    .galley-column .image img,
    .galley-column .image picture {
        aspect-ratio: 4 / 3;
    }
    
    .galley-column .image::after {
        font-size: 2rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .bg-grad-stellar,
    #portfolioGrid,
    .navbar-container,
    .modern-footer,
    .floating-buttons {
        display: none !important;
    }
    
    .blog-three-mini {
        box-shadow: none;
        padding: 0;
    }
    
    .blog-three-mini .lead {
        color: #000;
    }
}

/* ========================================
   Utility Classes for Article Content
   ======================================== */
.text-highlight {
    background: linear-gradient(180deg, transparent 60%, var(--accent-color) 60%);
    padding: 0 0.3rem;
}

.article-divider {
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 3rem auto;
    border-radius: 2px;
}

.article-note {
    background: #fff3cd;
    border-right: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.article-tip {
    background: #d1ecf1;
    border-right: 4px solid #17a2b8;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.article-warning {
    background: #f8d7da;
    border-right: 4px solid #dc3545;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.article-success {
    background: #d4edda;
    border-right: 4px solid #28a745;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}
