/**
 * Page Template - Kowsh Theme
 * قالب صفحات استاتیک - تم کوش
 * طراحی فوق مینیمال، جذاب و پیشرفته
 */

/* ========================================
   Main Container
======================================== */

.kowsh-page {
    min-height: 100vh;
    background: #ffffff;
    padding-top: 120px;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

/* Hide header content on checkout page */
body.woocommerce-checkout .kowsh-page__header-content,
body.woocommerce-checkout .kowsh-page__header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout .kowsh-page {
    padding-top: 140px;
}

/* ========================================
   Page Header
======================================== */

.kowsh-page__header {
    position: relative;
    margin-bottom: 80px;
    overflow: hidden;
    width: 100%;
}

.kowsh-page__header-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.kowsh-page__header-content {
    position: relative;
    overflow: hidden;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    margin: 0 40px;
    border-radius: 24px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.15);
}

.kowsh-page__header-image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.kowsh-page__featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kowsh-page__header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.75) 0%, rgba(26, 26, 26, 0.65) 100%);
    z-index: 2;
}

.kowsh-page__header-text {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 80px 40px;
    max-width: 900px;
}

.kowsh-page__title {
    font-size: 56px;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 20px;
    line-height: 1.1;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.kowsh-page__subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: -0.3px;
}

/* Header without featured image */
.kowsh-page__header-content:not(:has(.kowsh-page__header-image)) {
    min-height: 350px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* ========================================
   Page Wrapper
======================================== */

.kowsh-page__wrapper {
    padding-bottom: 100px;
    width: 100%;
}

.kowsh-page__container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ========================================
   Page Content
======================================== */

.kowsh-page__content {
    background: #ffffff;
    border-radius: 24px;
    padding: 80px 60px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 40px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Entry Header (when no featured image) */
.kowsh-page__entry-header {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 2px solid #f5f5f5;
    text-align: center;
}

.kowsh-page__entry-title {
    font-size: 48px;
    font-weight: 900;
    color: #0a0a0a;
    margin: 0 0 20px;
    line-height: 1.1;
    letter-spacing: -1.2px;
}

.kowsh-page__entry-subtitle {
    font-size: 20px;
    color: #666666;
    margin: 0;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: -0.3px;
}

/* Entry Content */
.kowsh-page__entry-content {
    font-size: 17px;
    line-height: 1.9;
    color: #2a2a2a;
    max-width: 100%;
}

.kowsh-page__entry-content > *:first-child {
    margin-top: 0;
}

.kowsh-page__entry-content > *:last-child {
    margin-bottom: 0;
}

.kowsh-page__entry-content p {
    margin: 0 0 28px;
    font-weight: 400;
}

.kowsh-page__entry-content h1,
.kowsh-page__entry-content h2,
.kowsh-page__entry-content h3,
.kowsh-page__entry-content h4,
.kowsh-page__entry-content h5,
.kowsh-page__entry-content h6 {
    margin: 50px 0 24px;
    font-weight: 900;
    color: #0a0a0a;
    line-height: 1.2;
    letter-spacing: -0.8px;
    position: relative;
}

.kowsh-page__entry-content h1 {
    font-size: 42px;
}

.kowsh-page__entry-content h2 {
    font-size: 36px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f5f5f5;
}

.kowsh-page__entry-content h3 {
    font-size: 32px;
}

.kowsh-page__entry-content h4 {
    font-size: 28px;
}

.kowsh-page__entry-content h5 {
    font-size: 24px;
}

.kowsh-page__entry-content h6 {
    font-size: 20px;
}

.kowsh-page__entry-content ul,
.kowsh-page__entry-content ol {
    margin: 28px 0;
    padding-right: 40px;
}

.kowsh-page__entry-content li {
    margin: 14px 0;
    line-height: 1.9;
    color: #2a2a2a;
}

.kowsh-page__entry-content ul li {
    list-style-type: disc;
    list-style-position: outside;
}

.kowsh-page__entry-content ol li {
    list-style-type: decimal;
    list-style-position: outside;
}

.kowsh-page__entry-content a {
    color: #d41418;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 2px solid transparent;
    position: relative;
}

.kowsh-page__entry-content a:hover {
    color: #b01216;
    border-bottom-color: #d41418;
}

.kowsh-page__entry-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: #d41418;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kowsh-page__entry-content a:hover::after {
    width: 100%;
}

.kowsh-page__entry-content blockquote {
    margin: 40px 0;
    padding: 32px 40px;
    border-right: 4px solid #d41418;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 12px;
    font-style: italic;
    color: #4a4a4a;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.kowsh-page__entry-content blockquote::before {
    content: '"';
    font-size: 80px;
    color: #d41418;
    position: absolute;
    top: -10px;
    right: 30px;
    opacity: 0.15;
    font-family: serif;
    line-height: 1;
}

.kowsh-page__entry-content blockquote p {
    margin: 0;
    font-size: 19px;
    line-height: 1.8;
}

.kowsh-page__entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 40px 0;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    display: block;
}

.kowsh-page__entry-content img.aligncenter {
    margin: 40px auto;
}

.kowsh-page__entry-content img.alignleft {
    float: right;
    margin: 0 28px 28px 0;
}

.kowsh-page__entry-content img.alignright {
    float: left;
    margin: 0 0 28px 28px;
}

.kowsh-page__entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.kowsh-page__entry-content table th,
.kowsh-page__entry-content table td {
    padding: 18px 20px;
    text-align: right;
    border-bottom: 1px solid #f5f5f5;
}

.kowsh-page__entry-content table th {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    font-weight: 700;
    color: #0a0a0a;
    font-size: 15px;
    letter-spacing: -0.3px;
}

.kowsh-page__entry-content table td {
    color: #2a2a2a;
    font-size: 15px;
}

.kowsh-page__entry-content table tr:last-child td {
    border-bottom: none;
}

.kowsh-page__entry-content table tr:hover {
    background: #fafafa;
}

.kowsh-page__entry-content code {
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 14px;
    color: #d41418;
    font-weight: 600;
    border: 1px solid #e5e5e5;
}

.kowsh-page__entry-content pre {
    background: #1a1a1a;
    color: #e5e5e5;
    padding: 32px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 40px 0;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.7;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #2a2a2a;
}

.kowsh-page__entry-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    border: none;
    font-weight: 400;
}

/* Page Links (pagination) */
.kowsh-page__links {
    margin: 50px 0;
    padding: 32px 0;
    border-top: 2px solid #f5f5f5;
    font-weight: 600;
    color: #666666;
    text-align: center;
}

.kowsh-page__link {
    display: inline-block;
    margin: 0 6px;
    padding: 10px 20px;
    background: #fafafa;
    border-radius: 8px;
    color: #d41418;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
    font-size: 15px;
}

.kowsh-page__link:hover {
    background: linear-gradient(135deg, #d41418 0%, #ff4444 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 20, 24, 0.3);
    border-color: #d41418;
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 1199px) {
    .kowsh-page__header-content {
        margin: 0 32px;
        border-radius: 20px;
        min-height: 400px;
    }
    
    .kowsh-page__content {
        margin: 0 32px;
        padding: 60px 48px;
        border-radius: 20px;
    }
    
    .kowsh-page__title {
        font-size: 48px;
    }
    
    .kowsh-page__entry-title {
        font-size: 42px;
    }
}

@media (max-width: 991px) {
    .kowsh-page {
        padding-top: 100px;
    }
    
    .kowsh-page__header {
        margin-bottom: 60px;
    }
    
    .kowsh-page__header-content {
        min-height: 350px;
        margin: 0 24px;
        border-radius: 16px;
    }
    
    .kowsh-page__header-text {
        padding: 60px 32px;
    }
    
    .kowsh-page__title {
        font-size: 40px;
    }
    
    .kowsh-page__subtitle {
        font-size: 18px;
    }
    
    .kowsh-page__content {
        margin: 0 24px;
        padding: 48px 40px;
        border-radius: 16px;
    }
    
    .kowsh-page__entry-title {
        font-size: 36px;
    }
    
    .kowsh-page__entry-content {
        font-size: 16px;
    }
    
    .kowsh-page__entry-content h1 {
        font-size: 36px;
    }
    
    .kowsh-page__entry-content h2 {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .kowsh-page {
        padding-top: 80px;
    }
    
    .kowsh-page__header {
        margin-bottom: 40px;
    }
    
    .kowsh-page__header-content {
        min-height: 280px;
        margin: 0 16px;
        border-radius: 16px;
    }
    
    .kowsh-page__header-text {
        padding: 50px 24px;
    }
    
    .kowsh-page__title {
        font-size: 32px;
    }
    
    .kowsh-page__subtitle {
        font-size: 16px;
    }
    
    .kowsh-page__content {
        margin: 0 16px;
        padding: 40px 28px;
        border-radius: 16px;
    }
    
    .kowsh-page__entry-header {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }
    
    .kowsh-page__entry-title {
        font-size: 28px;
    }
    
    .kowsh-page__entry-subtitle {
        font-size: 17px;
    }
    
    .kowsh-page__entry-content {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .kowsh-page__entry-content p {
        margin: 0 0 22px;
    }
    
    .kowsh-page__entry-content h1 {
        font-size: 28px;
        margin: 40px 0 18px;
    }
    
    .kowsh-page__entry-content h2 {
        font-size: 24px;
        margin: 36px 0 18px;
    }
    
    .kowsh-page__entry-content h3 {
        font-size: 22px;
        margin: 32px 0 16px;
    }
    
    .kowsh-page__entry-content ul,
    .kowsh-page__entry-content ol {
        padding-right: 28px;
        margin: 24px 0;
    }
    
    .kowsh-page__entry-content blockquote {
        padding: 24px 28px;
        margin: 32px 0;
    }
    
    .kowsh-page__entry-content blockquote::before {
        font-size: 60px;
        right: 20px;
    }
    
    .kowsh-page__entry-content img {
        margin: 32px 0;
        border-radius: 12px;
    }
    
    .kowsh-page__entry-content table {
        font-size: 14px;
        margin: 32px 0;
    }
    
    .kowsh-page__entry-content table th,
    .kowsh-page__entry-content table td {
        padding: 14px 16px;
    }
    
    .kowsh-page__links {
        margin: 40px 0;
        padding: 24px 0;
    }
}
