:root {
    --primary: #8f7ed6;
    --primary-dark: #7260c2;
    --primary-darker: #5a4a9e;
    --primary-light: #a897e8;
    --secondary: #ff6b6b;
    --accent: #4ecdc4;
    --light: #ffffff;
    --text: #333333;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 12px 25px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.18);
    --transition: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    background: #8f7ed6;
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
    padding: 20px;
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    margin-bottom: 40px;
}

.main-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.title-text h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.title-text p {
    font-size: 1.3rem;
    opacity: 0.9;
}

.contacts-section {
    margin-top: 30px;
}

.contacts-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    transition: var(--transition);
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.contact-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* Content Sections */
.content-section {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    padding: 40px;
    margin-bottom: 40px;
    color: var(--text);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

/* Team card styles are shared in project-common.css. */

/* Subdivision Section */
.subdivision {
    background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.subdivision-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.subdivision-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.subdivision-title {
    font-size: 1.8rem;
    color: white;
    text-align: center;
}

/* Mission Section */
.mission {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
}

.mission::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(143, 126, 214, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.mission-content {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

.mission-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-left: 4px solid var(--primary);
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(143, 126, 214, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
}

.mission-card:hover {
    transform: translateY(-10px) rotateX(5deg) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.mission-card:hover::before {
    opacity: 1;
}

.mission-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
    display: inline-block;
}

.mission-card:hover i {
    transform: scale(1.2) rotate(10deg);
    color: var(--secondary);
}

.mission-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.mission-card p {
    color: var(--text);
    font-size: 1rem;
}

/* Directions Section */
.directions {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-strong);
}

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

.direction-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-align: center;
    border-top: 4px solid var(--primary);
}

.direction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(143, 126, 214, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
}

.direction-card:hover {
    transform: translateY(-10px) rotateX(5deg) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.direction-card:hover::before {
    opacity: 1;
}

.direction-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
    display: inline-block;
}

.direction-card:hover i {
    transform: scale(1.2) rotate(10deg);
    color: var(--secondary);
}

.direction-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.direction-card p {
    color: var(--text);
    font-size: 1rem;
}

/* Achievements Section */
.achievements {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-strong);
}

.achievements-container {
    max-width: 800px;
    margin: 0 auto;
}

.achievement-item {
    background: linear-gradient(to right, #f0eeff, #e6e4f7);
    border-left: 5px solid var(--accent);
    padding: 25px;
    margin: 20px 0;
    border-radius: 0 15px 15px 0;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.achievement-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(78, 205, 196, 0.1) 0%, transparent 100%);
    transform: translateX(-100%);
    transition: var(--transition-slow);
}

.achievement-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-hover);
}

.achievement-item:hover::before {
    transform: translateX(0);
}

.achievement-icon {
    margin-right: 20px;
    font-size: 2rem;
    color: var(--accent);
    transition: var(--transition);
    min-width: 50px;
    text-align: center;
}

.achievement-item:hover .achievement-icon {
    transform: scale(1.3);
}

.achievement-content strong {
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.achievement-content {
    color: var(--text);
    font-size: 1rem;
}

/* Supporters Section */
.supporters {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-strong);
}

.supporters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    align-items: center;
}

.supporter-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid rgba(143, 126, 214, 0.2);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.supporter-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(143, 126, 214, 0.05) 0%, rgba(255, 107, 107, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
}

.supporter-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.supporter-item:hover::before {
    opacity: 1;
}

.supporter-logo {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    transition: var(--transition);
    margin-bottom: 15px;
}

.supporter-item:hover .supporter-logo {
    transform: scale(1.1);
}

.supporter-name {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.9rem;
    line-height: 1.3;
    margin-top: 10px;
}

.movement-first .supporter-name {
    font-size: 0.85rem;
}

/* Стили для предупреждения внутри карточки партнёра */
.partner-warning {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(143, 126, 214, 0.98);
    border-radius: 15px;
    padding: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(5px);
    border: 2px solid var(--primary-light);
}

.partner-warning.active {
    display: flex;
    animation: warningFadeIn 0.3s ease;
}

.warning-content {
    text-align: center;
    max-width: 90%;
}

.warning-text {
    color: white;
    margin-bottom: 25px;
    line-height: 1.5;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.warning-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.warning-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: var(--transition);
    min-width: 100px;
    font-size: 0.85rem;
}

.warning-cancel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.warning-proceed {
    background: var(--accent);
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.warning-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
}

.warning-proceed:hover {
    background: #3db8ad;
    color: white;
}

@keyframes warningFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Map Section */
.map-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-strong);
    color: var(--text);
}

.map-block {
    margin-bottom: 30px;
}

.map-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.map-title {
    margin-bottom: 30px;
}

.map-title h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.map-title p {
    color: var(--text);
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Интерактивная карта ===== */
.map-canvas {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fbfcec;
    user-select: none;
    -webkit-user-select: none;
}

.map-canvas svg {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
    touch-action: none;
}

.map-canvas svg.dragging {
    cursor: grabbing;
}

.region {
    stroke: #ffffff;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
    transition: opacity 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.region:hover {
    filter: brightness(1.28) saturate(1.05);
}

.region.dimmed {
    opacity: 0.22;
    pointer-events: none;
}

#mapSvg .region, #worldSvg .region {
    cursor: pointer;
}

.map-tooltip {
    position: absolute;
    display: none;
    pointer-events: none;
    background: rgba(51, 51, 51, 0.92);
    color: #fff;
    padding: 8px 13px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.35;
    z-index: 20;
    max-width: 260px;
    text-align: left;
}

.map-tooltip .tt-cat {
    display: block;
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 2px;
}

.map-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 15;
}

.map-controls button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: var(--shadow);
    font-size: 1.25rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-dark);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.map-controls button:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.map-hint {
    margin-top: 15px;
    font-size: 0.92rem;
    color: #777;
}

.map-view[hidden] {
    display: none;
}

.country-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 0 16px;
    flex-wrap: wrap;
}

.back-btn {
    font-family: 'Raleway', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 22px;
    border: 2px solid #8f7ed6;
    border-radius: 30px;
    background: #f3f0fb;
    color: #5c5470;
    cursor: pointer;
    transition: all 0.25s ease;
}

.back-btn:hover {
    background: #e9e3fa;
}

.country-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #5c5470;
}

/* Legend Section */
.legend-section {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    padding: 30px;
    margin-bottom: 30px;
    color: var(--text);
}

.map-view > .legend-section:last-child,
.map-view > .info-section:last-child {
    margin-bottom: 0;
}

.legend-title {
    margin-bottom: 30px;
    text-align: center;
}

.legend-title h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.legend-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.legend-item.active {
    border-color: var(--primary);
    background: #f3f0fc;
}

.color-box {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    flex-shrink: 0;
}

.legend-text {
    font-weight: 500;
    color: var(--text);
}

.legend-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Info Section (внутри карты России) */
.info-section {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    padding: 30px;
    margin-bottom: 40px;
    color: var(--text);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.info-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.info-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card h3 i {
    color: var(--secondary);
}

.info-card p {
    color: var(--text);
    font-size: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes textShine {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }
}

@media (max-width: 992px) {
    .title-text h1 {
        font-size: 2rem;
    }

    .mission-card, .direction-card {
        min-width: 250px;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .header {
        padding: 30px 20px;
    }

    .title-text h1 {
        font-size: 1.8rem;
    }

    .title-text p {
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .mission-content {
        flex-direction: column;
        align-items: center;
    }

    .mission-card {
        max-width: 100%;
    }

    .directions-grid,
    .supporters-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .mission, .directions, .achievements, .supporters, .map-section {
        padding: 50px 0;
    }

    .achievement-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .achievement-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .supporter-item {
        height: 160px;
        padding: 20px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .content-section {
        padding: 25px;
    }

    .info-grid,
    .legend-grid {
        grid-template-columns: 1fr;
    }

    .warning-actions {
        flex-direction: column;
        gap: 8px;
    }

    .warning-btn {
        width: 100%;
        padding: 8px 16px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 0 15px;
    }

    .header {
        padding: 25px 15px;
    }

    .title-text h1 {
        font-size: 1.6rem;
    }

    .title-text p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .mission, .directions, .achievements, .supporters, .map-section {
        padding: 40px 0;
    }

    .mission-card, .direction-card {
        padding: 20px;
    }

    .mission-card i, .direction-card i {
        font-size: 2rem;
    }

    .directions-grid,
    .supporters-grid {
        grid-template-columns: 1fr;
    }

    .achievement-content strong {
        font-size: 1rem;
    }

    .achievement-content {
        font-size: 0.9rem;
    }

    .supporter-item {
        height: 140px;
        padding: 15px;
    }

    .supporter-name {
        font-size: 0.8rem;
    }

    .movement-first .supporter-name {
        font-size: 0.75rem;
    }

    .content-section {
        padding: 20px;
    }

    .map-container,
    .legend-section,
    .info-section {
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .title-text h1 {
        font-size: 1.4rem;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .mission-card h3, .direction-card h3 {
        font-size: 1.2rem;
    }

    .mission-card p, .direction-card p {
        font-size: 0.9rem;
    }

    .supporter-item {
        height: 130px;
    }

    .supporter-logo {
        max-height: 50px;
    }
}
