.leader-section {
    padding: 80px 0;
}

.leader-card {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.leader-card:nth-child(even) {
    grid-template-columns: 2fr 1fr;
}

.leader-card:nth-child(even) .leader-image {
    order: 2;
}

.leader-card:nth-child(even) .leader-content {
    order: 1;
    text-align: right;
}

.leader-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.leader-image img {
    width: 100%;
    display: block;
    height: auto;
    transition: transform 0.5s ease;
}

.leader-content {
    padding: 20px;
}

.leader-name {
    font-size: clamp(1.8rem, 4vw, 2.3rem);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.leader-name::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-orange);
    transition: width 0.3s ease;
}

.leader-name:hover::after {
    width: 100%;
}

.leader-card:nth-child(even) .leader-name::after {
    left: auto;
    right: 0;
}

.leader-years {
    font-style: italic;
    margin-bottom: 20px;
    opacity: 0.8;
}

.leader-bio {
    margin-bottom: 20px;
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.6;
}

.leader-quote {
    font-style: italic;
    border-left: 3px solid var(--accent-yellow);
    padding-left: 20px;
    margin: 30px 0;
    font-size: 1.1rem;
    position: relative;
}

.leader-quote::before {
    content: '"';
    font-size: 2.5rem;
    position: absolute;
    left: 10px;
    top: -10px;
    opacity: 0.3;
}

.leader-card:nth-child(even) .leader-quote {
    border-left: none;
    border-right: 3px solid var(--accent-yellow);
    padding-left: 0;
    padding-right: 20px;
}

.leader-card:nth-child(even) .leader-quote::before {
    left: auto;
    right: 10px;
}

/* legacy */
.legacy-section {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 80px 0;
    position: relative;
}

.legacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.legacy-text {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* image map */
#map-section {
    padding: 3rem 1rem;
    position: relative;
    overflow: hidden;
}

.map-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.map-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.kazakhstan-map {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.map-wrapper:hover .kazakhstan-map {
    transform: scale(1.02);
}

/* map markers */
.map-marker {
    position: absolute;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 10;
    transform: translate(-50%, -50%);
}

.marker-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: #e74c3c;
    border-radius: 50%;
    z-index: 2;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.map-marker:hover .marker-dot {
    transform: translate(-50%, -50%) scale(1.3);
    background-color: #ff6b5b;
}

.marker-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: rgba(231, 76, 60, 0.4);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.marker-info {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 280px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    color: #333;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.marker-info::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

.marker-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #222;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 5px;
}

.marker-info p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #444;
}

.marker-info p:first-of-type {
    font-weight: 600;
    font-style: italic;
}

.map-marker:hover .marker-info {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* legend */
.map-legend {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.map-legend h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-orange);
    padding-bottom: 8px;
    display: inline-block;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-left: 10px;
    transition: transform 0.2s ease;
}

.legend-item:hover {
    transform: translateX(5px);
}

.legend-dot {
    width: 14px;
    height: 14px;
    background-color: #e74c3c;
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.5);
}

.legend-polygon {
    width: 24px;
    height: 14px;
    background-color: rgba(41, 128, 185, 0.2);
    border: 1px dashed rgba(41, 128, 185, 0.7);
    display: inline-block;
    margin-right: 12px;
    border-radius: 3px;
}

.map-description {
    max-width: 800px;
    margin: 2.5rem auto 0;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #aaa;
    font-style: italic;
    padding: 0 20px;
}

.thematic-polygon {
    position: absolute;
    top: 61.5%;
    left: 60.8%;
    width: 38%;
    height: 30%;
    background-color: rgba(41, 128, 185, 0.15);
    border: 2px dashed rgba(41, 128, 185, 0.7);
    border-radius: 12px;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    transition: background-color 0.3s ease;
}

.map-wrapper:hover .thematic-polygon {
    background-color: rgba(41, 128, 185, 0.25);
}

/* responsive  */
@media screen and (max-width: 768px) {
    .leader-card,
    .leader-card:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .leader-card .leader-image,
    .leader-card:nth-child(even) .leader-image {
        order: 1;
    }

    .leader-card .leader-content,
    .leader-card:nth-child(even) .leader-content {
        order: 2;
        text-align: left;
    }

    .leader-card:nth-child(even) .leader-name::after {
        left: 0;
        right: auto;
    }

    .leader-card:nth-child(even) .leader-quote {
        border-right: none;
        border-left: 3px solid var(--accent-yellow);
        padding-right: 0;
        padding-left: 20px;
    }
    
    .leader-card:nth-child(even) .leader-quote::before {
        left: 10px;
        right: auto;
    }
    
    .map-marker {
        width: 30px;
        height: 30px;
    }
    
    .marker-dot {
        width: 10px;
        height: 10px;
    }
    
    .marker-info {
        width: 220px;
        padding: 12px;
        bottom: calc(100% + 12px);
    }
    
    .marker-info h3 {
        font-size: 1rem;
    }
    
    .marker-info p {
        font-size: 0.8rem;
    }
    
    .legacy-text {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .marker-info {
        width: 180px;
        left: 0;
        transform: translateX(0) translateY(10px);
    }
    
    .map-marker:hover .marker-info {
        transform: translateX(0) translateY(0);
    }
    
    .marker-info::after {
        left: 15px;
    }
    
    #marker-1 .marker-info, 
    #marker-6 .marker-info {
        left: auto;
        right: 0;
    }
    
    #marker-1 .marker-info::after, 
    #marker-6 .marker-info::after {
        left: auto;
        right: 15px;
    }
}