/* Стилі для сторінки кланів */

/* Hero заголовок */
.hero-title span {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(41, 98, 227, 0.5);
}

/* Великого заголовка сторінки більше немає — відступ під фіксовану шапку дає сама секція */
.clans-section {
    padding-top: 110px;
}

/* Вступний текст про клани */
.clan-intro {
    margin-bottom: 40px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.clan-intro p {
    font-size: 16px;
    color: #ddd;
}

/* Grid для карток кланів - 2 в рядок */
.clans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Велика картка клану */
.clan-card-large {
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}


/* Шапка клану з ембламою та статистикою */
.clan-header {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
}

.clan-emblem {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    background-color: #000;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin-right: 20px;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.clan-title {
    flex-grow: 1;
}

.clan-title h2 {
    font-size: 28px;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.clan-subtitle {
    font-size: 16px;
    color: #ccc;
}

.clan-stats {
    display: flex;
    margin-left: auto;
    gap: 20px;
}

.stat {
    text-align: center;
    min-width: 80px;
}

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #ccc;
}

/* Основний контент клану */
.clan-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.clan-details {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    flex: 1;
}

.clan-desc {
    flex: 2;
    min-width: 300px;
}

.clan-desc h3, .clan-requirements h3, .clan-commander h3 {
    font-size: 20px;
    color: var(--accent-color);
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-desc p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.clan-requirements {
    flex: 1;
    min-width: 250px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
}

.requirements-list {
    list-style: none;
}

.requirements-list li {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.requirements-list li i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* Секція командира клану */
.clan-commander {
    margin-bottom: 30px;
}

.commander-card {
    display: flex;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    align-items: center;
}

.commander-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.commander-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.commander-info h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.commander-stats {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
}

.commander-desc {
    font-size: 14px;
}

/* Кнопки дій */
.clan-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Стилі для компактних карток кланів */
.other-clans {
    margin-top: 60px;
}

.clan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.clan-card-small {
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.3s, box-shadow 0.3s;
}

.clan-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.clan-small-header {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-bottom: 1px solid #333;
}

.clan-small-emblem {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: #000;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    margin-right: 15px;
    border: 2px solid var(--primary-color);
}

.clan-small-title h3 {
    font-size: 18px;
    margin-bottom: 3px;
    color: var(--accent-color);
}

.clan-small-title p {
    font-size: 14px;
    color: #ccc;
}

.clan-small-content {
    padding: 15px;
}

.clan-small-content p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.clan-small-requirements {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 13px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Секція FAQ */
.faq-section {
    margin-top: 50px;
}

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

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.faq-question:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.faq-question h3 {
    font-size: 16px;
    margin: 0;
    color: var(--accent-color);
}

.faq-icon {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-answer.active {
    padding: 15px 20px;
    max-height: 500px;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid #333;
}

.faq-answer p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* Адаптивність */
@media (max-width: 768px) {
    .clan-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .clan-emblem {
        margin-bottom: 15px;
    }
    
    .clan-stats {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        justify-content: space-between;
    }
    
    .clan-details {
        flex-direction: column;
    }
    
    .commander-card {
        flex-direction: column;
        text-align: center;
    }
    
    .commander-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .clan-actions {
        flex-direction: column;
    }
    
    .faq-question h3 {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .clan-grid {
        grid-template-columns: 1fr;
    }
}

/* Зменшення розміру карток кланів - компактний режим */
.clan-card-large {
    margin-bottom: 20px;
}

.clan-header {
    padding: 12px 15px;
}

.clan-emblem {
    width: 60px;
    height: 60px;
    font-size: 20px;
    margin-right: 15px;
}

.clan-title h2 {
    font-size: 20px;
    margin-bottom: 3px;
}

.clan-subtitle {
    font-size: 13px;
}

.stat-value {
    font-size: 18px;
}

.stat-label {
    font-size: 12px;
}

.clan-content {
    padding: 15px;
}

.clan-details {
    gap: 15px;
}

.clan-desc,
.clan-requirements {
    flex: 1;
}

.clan-desc h3,
.clan-requirements h3,
.clan-commander h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.clan-desc p {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.requirements-list li {
    font-size: 13px;
    padding: 2px 0;
    margin-bottom: 2px;
}

.commander-card {
    padding: 12px;
}

.commander-avatar {
    width: 50px;
    height: 50px;
    font-size: 18px;
}

.commander-name {
    font-size: 15px;
}

.commander-role {
    font-size: 12px;
}

.commander-stat {
    font-size: 12px;
}

/* Модальне вікно для статистики */
.clan-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.clan-stats-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--secondary-color);
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10001;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-body {
    padding: 30px;
}

.modal-body h2 {
    font-size: 26px;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-align: center;
}

.stats-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.stat-group {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 165, 0, 0.1);
}

.stat-group h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-group h4 i {
    color: var(--accent-color);
}

.stat-description {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    font-style: italic;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-name {
    color: #ccc;
    font-size: 14px;
}

.stat-val {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 14px;
}

/* Кнопка статистики */
.stats-btn {
    margin-right: 10px;
}

/* Адаптивність для модального вікна */
@media (max-width: 1200px) {
    .clans-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Секція для подання заявки */
.apply-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), var(--gradient-dark);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3xl);
}

.apply-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(41, 98, 227, 0.3) 0%, transparent 70%);
    animation: pulse-opacity 3s infinite alternate;
}

@keyframes pulse-opacity {
    0% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

.apply-container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.apply-title {
    font-size: 32px;
    margin-bottom: var(--space-md);
}

.apply-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.apply-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

@media (max-width: 768px) {
    .stats-modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-body h2 {
        font-size: 22px;
    }

    .clan-details {
        flex-direction: column;
    }

    .clans-grid {
        grid-template-columns: 1fr;
    }

    .apply-title {
        font-size: 28px;
    }

    .apply-description {
        font-size: 16px;
    }

    .apply-actions {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto;
    }
}
