/* Partners Page Styles */
.cn-partners-page {
    color: var(--cn-text-dark, #1f2937);
    background-color: #ffffff;
    padding-bottom: 60px;
}
.cn-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Common Section Heading */
.cn-partners-page .cn-section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--cn-secondary, #061325);
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}
.cn-partners-page .cn-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--cn-primary-color, #c1121f);
    border-radius: 2px;
}
.cn-section-title-left {
    text-align: right;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--cn-secondary, #061325);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}
.cn-section-title-left::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--cn-primary-color, #c1121f);
    border-radius: 2px;
}

/* Colors */
.green { color: #10b981; }
.orange { color: #f59e0b; }
.purple { color: #8b5cf6; }
.yellow { color: #eab308; }
.blue { color: #3b82f6; }
.dark-blue { color: #1e3a8a; }

.green-bg { background-color: #10b981; }
.orange-bg { background-color: #f59e0b; }
.purple-bg { background-color: #8b5cf6; }
.yellow-bg { background-color: #eab308; }
.blue-bg { background-color: #3b82f6; }

/* Hero & Mindmap */
.cn-partners-hero {
    position: relative;
    padding: 80px 0;
    margin-bottom: 60px;
    border-bottom: 1px solid #f3f4f6;
    background-color: #fafbfc;
}
.cn-hero-bg-map {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(#e5e7eb 2px, transparent 2px);
    background-size: 30px 30px;
    opacity: 0.4;
    z-index: 1;
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 60%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 60%);
}
.cn-hero-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
}
.cn-phero-content {
    flex: 1;
    max-width: 450px;
}
.cn-phero-content p {
    font-size: 1.1rem;
    line-height: 2;
    color: #4b5563;
}

/* Mindmap */
.cn-pmindmap {
    flex: none;
    position: relative;
    height: 450px;
    width: 500px;
}
.cn-mindmap-svg {
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 1;
}
.cn-dotted-line {
    fill: none;
    stroke-width: 2;
    stroke-dasharray: 6, 6;
}
.cn-dotted-line.green-line { stroke: #10b981; }
.cn-dotted-line.orange-line { stroke: #f59e0b; }
.cn-dotted-line.purple-line { stroke: #8b5cf6; }
.cn-dotted-line.yellow-line { stroke: #eab308; }
.cn-dotted-line.blue-line { stroke: #3b82f6; }

.cn-pnode {
    position: absolute;
    width: 200px;
    margin-left: -100px;
    margin-top: -30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 2;
}
.cn-pnode-center {
    width: 140px;
    height: 140px;
    margin-left: -70px;
    margin-top: -70px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--cn-primary-color, #c1121f);
}
.cn-center-logo-icon {
    font-family: serif;
    font-size: 2.5rem;
    color: var(--cn-primary-color, #c1121f);
    line-height: 1;
}
.cn-center-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--cn-primary-color, #c1121f);
    margin-top: 5px;
}
.cn-pnode-center span {
    font-size: 0.75rem;
    color: #4b5563;
}

.cn-node-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.cn-dot-badge {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}
/* Position dot badges based on lines */
.cn-pnode-1 .cn-dot-badge { bottom: -5px; left: 50%; transform: translateX(-50%); }
.cn-pnode-2 .cn-dot-badge { top: -5px; left: 50%; transform: translateX(-50%); }
.cn-pnode-3 .cn-dot-badge { top: 50%; right: -5px; transform: translateY(-50%); }
.cn-pnode-4 .cn-dot-badge { top: 50%; right: -5px; transform: translateY(-50%); }
.cn-pnode-5 .cn-dot-badge { bottom: -5px; right: 10px; }

.cn-pnode-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--cn-secondary, #061325);
    margin-bottom: 5px;
}
.cn-pnode-text span {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    max-width: 150px;
}

/* Nodes position in RTL (Left column) */
.cn-pnode-1 { top: 10px; right: 10px; } /* مراکز علمی */
.cn-pnode-2 { bottom: 10px; right: 10px; } /* متخصصان */
.cn-pnode-3 { bottom: 10px; left: 10px; } /* رسانه ها */
.cn-pnode-4 { top: 10px; left: 10px; } /* مترجمان */
.cn-pnode-5 { top: 50%; right: 75%; transform: translateY(-50%); } /* پژوهشگران */

/* Steps Section */
.cn-partners-steps {
    margin-bottom: 80px;
}
.cn-steps-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}
.cn-step-item {
    flex: 1;
    min-width: 140px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cn-step-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 25px;
    color: var(--cn-secondary, #061325);
    font-size: 1.8rem;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.cn-step-num {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #fdf2f2;
    color: var(--cn-primary-color, #c1121f);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}
.cn-step-item h4 {
    font-size: 1.1rem;
    color: var(--cn-secondary, #061325);
    margin-bottom: 10px;
}
.cn-step-item p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
}
.cn-step-arrow {
    display: flex;
    align-items: center;
    height: 80px;
    color: #e5e7eb;
    font-size: 1.2rem;
}

/* Collaboration Types */
.cn-partners-collab-types {
    background: #fafbfc;
    padding: 80px 0;
    margin-bottom: 80px;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}
.cn-collab-slider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}
.cn-slider-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    color: #6b7280;
    transition: all 0.3s;
}
.cn-slider-btn:hover {
    color: var(--cn-primary-color, #c1121f);
    border-color: var(--cn-primary-color, #c1121f);
}
.cn-collab-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    flex: 1;
}
.cn-collab-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
}
.cn-collab-math {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}
.cn-math-item {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #fff;
}
.green-border { border: 2px solid #10b981; }
.orange-border { border: 2px solid #f59e0b; }
.purple-border { border: 2px solid #8b5cf6; }
.blue-border { border: 2px solid #3b82f6; }

.cn-logo-item {
    border: 2px solid var(--cn-primary-color, #c1121f);
    color: var(--cn-primary-color, #c1121f);
    flex-direction: column;
    font-size: 0.65rem;
    font-weight: 800;
}
.cn-mini-logo {
    font-family: serif;
    font-size: 1.2rem;
    margin-bottom: 2px;
}
.cn-math-cross {
    color: var(--cn-primary-color, #c1121f);
    font-size: 0.9rem;
}

.cn-collab-card h4 {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--cn-secondary, #061325);
    margin-bottom: 12px;
}
.cn-collab-card p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
}

/* Institutional Partners */
.cn-partners-institutions {
    margin-bottom: 80px;
}
.cn-inst-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.cn-inst-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    height: 100px;
    transition: all 0.3s;
    background: #fff;
}
.cn-inst-logo i {
    font-size: 2.2rem;
    margin-left: 15px;
}
.cn-inst-logo span {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: bold;
    line-height: 1.4;
    text-align: right;
}
.cn-view-all-link {
    color: var(--cn-primary-color, #c1121f);
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
}

/* Join Network */
.cn-partners-join {
    background: #fafbfc;
    position: relative;
    padding: 80px 20px;
    border-top: 1px solid #f3f4f6;
}
.cn-hero-overlay-light {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(to bottom, rgba(250,251,252,0.95), rgba(250,251,252,0.85));
    /* This assumes an underlying pattern, but for safety we just use a light gradient */
}
.cn-join-content {
    position: relative;
    z-index: 2;
}
.dark-title {
    color: var(--cn-secondary, #061325) !important;
}
.dark-text {
    color: #4b5563 !important;
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.1rem;
}
.cn-join-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.cn-join-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 20px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f3f4f6;
}
.cn-jc-icon {
    width: 70px;
    height: 70px;
    background: #fdf2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--cn-primary-color, #c1121f);
    margin: 0 auto 20px;
}
/* Override colors for specific cards to match wireframe if needed, or keep unified */
.cn-join-card:nth-child(1) .cn-jc-icon { color: #eab308; background: #fefce8; }
.cn-join-card:nth-child(2) .cn-jc-icon { color: #10b981; background: #ecfdf5; }
.cn-join-card:nth-child(3) .cn-jc-icon { color: #f59e0b; background: #fff7ed; }
.cn-join-card:nth-child(4) .cn-jc-icon { color: #3b82f6; background: #eff6ff; }

.cn-join-card h4 {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--cn-secondary, #061325);
    margin-bottom: 15px;
}
.cn-join-card p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 25px;
}
.cn-jc-arrow {
    display: block;
    color: var(--cn-primary-color, #c1121f);
    font-size: 1.2rem;
}
.cn-btn-join {
    background: var(--cn-primary-color, #c1121f);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: bold;
}
.cn-btn-join:hover {
    background: #9f0e19;
}

/* Responsive */
@media (max-width: 1024px) {
    .cn-hero-wrapper { flex-direction: column; text-align: center; }
    .cn-section-title-right { text-align: center; }
    .cn-section-title-right::after { left: 50%; transform: translateX(-50%); right: auto; }
    .cn-phero-content { max-width: 100%; margin-bottom: 40px; }
    .cn-pmindmap { margin: 0 auto; }
}

@media (max-width: 768px) {
    /* Stack Mindmap cleanly */
    .cn-mindmap-svg { display: none !important; }
    .cn-pmindmap { height: auto !important; display: flex !important; flex-wrap: wrap; justify-content: center; gap: 30px; margin-bottom: 30px; }
    .cn-pnode { position: static !important; margin: 0 !important; width: 45% !important; }
    .cn-pnode-center { width: 140px !important; height: 140px !important; margin: 0 auto 30px !important; }
    .cn-pnode-center .cn-center-logo-icon { margin: 0 auto; }
    .cn-pnode-center .cn-center-title { margin: 5px auto 0; }
    .cn-dot-badge { display: none !important; }

    .cn-collab-cards { grid-template-columns: 1fr; }
    .cn-inst-grid { grid-template-columns: repeat(2, 1fr); }
    .cn-join-grid { grid-template-columns: repeat(2, 1fr); }
    .cn-step-arrow { display: none; }
    .cn-steps-flex { flex-wrap: wrap; gap: 20px; }
    .cn-step-item { min-width: 45%; }
}

@media (max-width: 576px) {
    .cn-pnode { width: 100% !important; } /* Stack everything vertically on phones */
    .cn-inst-grid { grid-template-columns: 1fr; }
    .cn-join-grid { grid-template-columns: 1fr; }
    .cn-step-item { min-width: 100%; }
}
