/* Chess Openings Page Styles */

.openings-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 60px 80px;
    min-height: 100vh;
}

.openings-header {
    text-align: center;
    margin-bottom: 80px;
    padding: 0 20px;
}

.openings-header h1 {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 3px;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.openings-header .subtitle {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: #666;
    letter-spacing: 1px;
    line-height: 1.8;
}

.openings-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.opening-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto auto;
    gap: 40px;
    padding: 40px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.opening-card:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.opening-image-placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.placeholder-text {
    font-size: 80px;
    color: #1a1a1a;
    opacity: 0.3;
}

.opening-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.opening-name {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 2px;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.opening-moves {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #fff;
    border-left: 3px solid #1a1a1a;
    display: inline-block;
    letter-spacing: 0.5px;
}

.opening-description {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    font-weight: 300;
    margin-bottom: 20px;
}

.view-opening-btn {
    padding: 12px 24px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
}

.view-opening-btn:hover {
    background: #333;
}

.toggle-arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.board-section {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.board-section.expanded {
    max-height: 600px;
    opacity: 1;
    padding: 30px 0 0 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

.board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.chess-board {
    width: 400px;
    max-width: 100%;
}

.board-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.move-info {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
    min-height: 24px;
    text-align: center;
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.control-btn:hover {
    background: #1a1a1a;
    color: #fff;
}

.control-btn:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .openings-page {
        padding: 100px 40px 60px;
    }

    .opening-card {
        grid-template-columns: 160px 1fr;
        gap: 30px;
        padding: 30px;
    }

    .opening-image-placeholder {
        width: 160px;
        height: 160px;
    }

    .placeholder-text {
        font-size: 64px;
    }

    .opening-name {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .openings-page {
        padding: 100px 20px 40px;
    }

    .openings-header h1 {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .openings-header .subtitle {
        font-size: 14px;
    }

    .openings-container {
        gap: 30px;
    }

    .opening-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 25px;
    }

    .opening-image-placeholder {
        width: 100%;
        max-width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    .opening-name {
        font-size: 22px;
        text-align: center;
    }

    .opening-moves {
        text-align: center;
        margin: 0 auto 20px;
    }

    .opening-description {
        font-size: 14px;
        text-align: justify;
    }

    .view-opening-btn {
        margin: 0 auto;
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }

    .chess-board {
        width: 100%;
        max-width: 350px;
    }

    .board-section.expanded {
        max-height: 700px;
    }
}

@media (max-width: 480px) {
    .openings-header h1 {
        font-size: 28px;
    }

    .opening-card {
        padding: 20px;
    }

    .opening-name {
        font-size: 20px;
    }

    .placeholder-text {
        font-size: 56px;
    }

    .opening-image-placeholder {
        height: 180px;
    }

    .chess-board {
        max-width: 300px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .move-info {
        font-size: 12px;
    }
}
